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>
Upstream-commit: adce3ca48e306a6117ce5677b8d9437551e98a26
Component: engine
This commit is contained in:
Kir Kolyshkin
2017-07-31 20:05:26 -07:00
parent 970fea45e3
commit 13250b8fde
3 changed files with 3 additions and 2 deletions
@@ -13,6 +13,7 @@ import (
"golang.org/x/sys/unix"
)
// Same as DM_DEVICE_* enum values from libdevmapper.h
const (
deviceCreate TaskType = iota
deviceReload
@@ -8,7 +8,7 @@ package devicemapper
*/
import "C"
// LibraryDeferredRemovalSupport is supported when statically linked.
// LibraryDeferredRemovalSupport tells if the feature is enabled in the build
const LibraryDeferredRemovalSupport = true
func dmTaskDeferredRemoveFct(task *cdmTask) int {
@@ -2,7 +2,7 @@
package devicemapper
// LibraryDeferredRemovalSupport is not supported when statically linked.
// LibraryDeferredRemovalSupport tells if the feature is enabled in the build
const LibraryDeferredRemovalSupport = false
func dmTaskDeferredRemoveFct(task *cdmTask) int {