Browse Source

Merge pull request #42869 from pete-woods/backport-quota-package-cgo-fix

[20.10 backport] quota: adjust build-tags to allow build without CGO
Sebastiaan van Stijn 3 năm trước cách đây
mục cha
commit
1c2ca1f624
2 tập tin đã thay đổi với 4 bổ sung4 xóa
  1. 3 3
      quota/projectquota.go
  2. 1 1
      quota/testhelpers.go

+ 3 - 3
quota/projectquota.go

@@ -396,9 +396,9 @@ func getDirFd(dir *C.DIR) uintptr {
 	return uintptr(C.dirfd(dir))
 }
 
-// Get the backing block device of the driver home directory
-// and create a block device node under the home directory
-// to be used by quotactl commands
+// makeBackingFsDev gets the backing block device of the driver home directory
+// and creates a block device node under the home directory to be used by
+// quotactl commands.
 func makeBackingFsDev(home string) (string, error) {
 	var stat unix.Stat_t
 	if err := unix.Stat(home, &stat); err != nil {

+ 1 - 1
quota/testhelpers.go

@@ -1,4 +1,4 @@
-// +build linux
+// +build linux,!exclude_disk_quota,cgo
 
 package quota // import "github.com/docker/docker/quota"