diff --git a/devicemapper/devmapper_log.go b/devicemapper/devmapper_log.go index 8477e36..76c9756 100644 --- a/devicemapper/devmapper_log.go +++ b/devicemapper/devmapper_log.go @@ -11,9 +11,9 @@ import ( // Due to the way cgo works this has to be in a separate file, as devmapper.go has // definitions in the cgo block, which is incompatible with using "//export" -// DevmapperLogCallback exports the devmapper log callback for cgo. -//export DevmapperLogCallback -func DevmapperLogCallback(level C.int, file *C.char, line C.int, dmErrnoOrClass C.int, message *C.char) { +// StorageDevmapperLogCallback exports the devmapper log callback for cgo. +//export StorageDevmapperLogCallback +func StorageDevmapperLogCallback(level C.int, file *C.char, line C.int, dmErrnoOrClass C.int, message *C.char) { msg := C.GoString(message) if level < 7 { if strings.Contains(msg, "busy") { diff --git a/devicemapper/devmapper_wrapper.go b/devicemapper/devmapper_wrapper.go index 91fbc85..e37e020 100644 --- a/devicemapper/devmapper_wrapper.go +++ b/devicemapper/devmapper_wrapper.go @@ -8,7 +8,7 @@ package devicemapper #include // FIXME: present only for BLKGETSIZE64, maybe we can remove it? // FIXME: Can't we find a way to do the logging in pure Go? -extern void DevmapperLogCallback(int level, char *file, int line, int dm_errno_or_class, char *str); +extern void StorageDevmapperLogCallback(int level, char *file, int line, int dm_errno_or_class, char *str); static void log_cb(int level, const char *file, int line, int dm_errno_or_class, const char *f, ...) { @@ -19,7 +19,7 @@ static void log_cb(int level, const char *file, int line, int dm_errno_or_class, vsnprintf(buffer, 256, f, ap); va_end(ap); - DevmapperLogCallback(level, (char *)file, line, dm_errno_or_class, buffer); + StorageDevmapperLogCallback(level, (char *)file, line, dm_errno_or_class, buffer); } static void log_with_errno_init()