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>
This commit is contained in:
Kir Kolyshkin 2017-07-31 20:03:09 -07:00
parent aab2450e25
commit adce3ca48e
3 changed files with 3 additions and 2 deletions

View file

@ -13,6 +13,7 @@ import (
"golang.org/x/sys/unix"
)
// Same as DM_DEVICE_* enum values from libdevmapper.h
const (
deviceCreate TaskType = iota
deviceReload

View file

@ -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 {

View file

@ -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 {