Browse code

pkg/devicemapper: comment nitpicks

1. devmapper_wrapper_{,no_}deferred_remove.go:
Comments about LibraryDeferredRemovalSupport were very totally
misleading to me. This thing has nothing to do with either static
or dynamic linking (but with build tags). Fix the comment accordingly.

2. devmapper.go:
Reveal the source of those magic device* constants.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>

Kir Kolyshkin authored on 2017/08/01 12:03:09
Showing 3 changed files
... ...
@@ -13,6 +13,7 @@ import (
13 13
 	"golang.org/x/sys/unix"
14 14
 )
15 15
 
16
+// Same as DM_DEVICE_* enum values from libdevmapper.h
16 17
 const (
17 18
 	deviceCreate TaskType = iota
18 19
 	deviceReload
... ...
@@ -8,7 +8,7 @@ package devicemapper
8 8
 */
9 9
 import "C"
10 10
 
11
-// LibraryDeferredRemovalSupport is supported when statically linked.
11
+// LibraryDeferredRemovalSupport tells if the feature is enabled in the build
12 12
 const LibraryDeferredRemovalSupport = true
13 13
 
14 14
 func dmTaskDeferredRemoveFct(task *cdmTask) int {
... ...
@@ -2,7 +2,7 @@
2 2
 
3 3
 package devicemapper
4 4
 
5
-// LibraryDeferredRemovalSupport is not supported when statically linked.
5
+// LibraryDeferredRemovalSupport tells if the feature is enabled in the build
6 6
 const LibraryDeferredRemovalSupport = false
7 7
 
8 8
 func dmTaskDeferredRemoveFct(task *cdmTask) int {