From bb4dd7d26b37bdc2e1cc7fe100dec6e74d3d79d3 Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Fri, 4 Sep 2015 14:56:45 +0200 Subject: [PATCH] Update validate-lint to find go files by itself MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … and fixes the last bits that were missing :3. Signed-off-by: Vincent Demeester --- archive/archive_windows.go | 2 +- devicemapper/devmapper_log.go | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/archive/archive_windows.go b/archive/archive_windows.go index 2500785..ea93160 100644 --- a/archive/archive_windows.go +++ b/archive/archive_windows.go @@ -25,7 +25,7 @@ func getWalkRoot(srcPath string, include string) string { return filepath.Join(srcPath, include) } -// canonicalTarNameForPath returns platform-specific filepath +// CanonicalTarNameForPath returns platform-specific filepath // to canonical posix-style path for tar archival. p is relative // path. func CanonicalTarNameForPath(p string) (string, error) { diff --git a/devicemapper/devmapper_log.go b/devicemapper/devmapper_log.go index f66a208..c71a6ec 100644 --- a/devicemapper/devmapper_log.go +++ b/devicemapper/devmapper_log.go @@ -11,8 +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, dm_errno_or_class C.int, message *C.char) { +func DevmapperLogCallback(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") { @@ -29,6 +30,6 @@ func DevmapperLogCallback(level C.int, file *C.char, line C.int, dm_errno_or_cla } if dmLogger != nil { - dmLogger.DMLog(int(level), C.GoString(file), int(line), int(dm_errno_or_class), msg) + dmLogger.DMLog(int(level), C.GoString(file), int(line), int(dmErrnoOrClass), msg) } }