devicemapper: API for checking cookie support

Signed-off-by: Vincent Batts <vbatts@redhat.com>
This commit is contained in:
Vincent Batts 2015-01-19 15:31:54 -05:00
parent 13fc8f758d
commit 650ca7d915
2 changed files with 12 additions and 0 deletions

View file

@ -339,6 +339,13 @@ func UdevSetSyncSupport(enable bool) bool {
return UdevSyncSupported()
}
// CookieSupported returns whether the version of device-mapper supports the
// use of cookie's in the tasks.
// This is largely a lower level call that other functions use.
func CookieSupported() bool {
return DmCookieSupported() != 0
}
// Useful helper for cleanup
func RemoveDevice(name string) error {
log.Debugf("[devmapper] RemoveDevice START")