Browse code

quota: adjust build-tags to allow build without CGO

This is to allow quota package (without tests) to be built without cgo.
makeBackingFsDev was used in helpers but not defined in projectquota_unsupported.go

Also adjust some GoDoc to follow the standard format.

Signed-off-by: Tibor Vass <tibor@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 7cf079acdb88a5e66bf77e54b5dc30df859969bd)
Signed-off-by: Pete Woods <pete.woods@circleci.com>

Tibor Vass authored on 2021/03/20 00:31:46
Showing 2 changed files
... ...
@@ -396,9 +396,9 @@ func getDirFd(dir *C.DIR) uintptr {
396 396
 	return uintptr(C.dirfd(dir))
397 397
 }
398 398
 
399
-// Get the backing block device of the driver home directory
400
-// and create a block device node under the home directory
401
-// to be used by quotactl commands
399
+// makeBackingFsDev gets the backing block device of the driver home directory
400
+// and creates a block device node under the home directory to be used by
401
+// quotactl commands.
402 402
 func makeBackingFsDev(home string) (string, error) {
403 403
 	var stat unix.Stat_t
404 404
 	if err := unix.Stat(home, &stat); err != nil {
... ...
@@ -1,4 +1,4 @@
1
-// +build linux
1
+// +build linux,!exclude_disk_quota,cgo
2 2
 
3 3
 package quota // import "github.com/docker/docker/quota"
4 4