File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -339,6 +339,13 @@ func UdevSetSyncSupport(enable bool) bool {
339339 return UdevSyncSupported ()
340340}
341341
342+ // CookieSupported returns whether the version of device-mapper supports the
343+ // use of cookie's in the tasks.
344+ // This is largely a lower level call that other functions use.
345+ func CookieSupported () bool {
346+ return DmCookieSupported () != 0
347+ }
348+
342349// Useful helper for cleanup
343350func RemoveDevice (name string ) error {
344351 log .Debugf ("[devmapper] RemoveDevice START(%s)" , name )
Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ var (
110110 DmUdevWait = dmUdevWaitFct
111111 DmUdevSetSyncSupport = dmUdevSetSyncSupportFct
112112 DmUdevGetSyncSupport = dmUdevGetSyncSupportFct
113+ DmCookieSupported = dmCookieSupportedFct
113114 LogWithErrnoInit = logWithErrnoInitFct
114115)
115116
@@ -246,6 +247,10 @@ func dmUdevWaitFct(cookie uint) int {
246247 return int (C .dm_udev_wait (C .uint32_t (cookie )))
247248}
248249
250+ func dmCookieSupportedFct () int {
251+ return int (C .dm_cookie_supported ())
252+ }
253+
249254func dmLogInitVerboseFct (level int ) {
250255 C .dm_log_init_verbose (C .int (level ))
251256}
You can’t perform that action at this time.
0 commit comments