Update validate-lint to find go files by itself

… and fixes the last bits that were missing :3.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester 2015-09-04 14:56:45 +02:00
parent 2161f321f9
commit bb4dd7d26b
2 changed files with 4 additions and 3 deletions

View file

@ -25,7 +25,7 @@ func getWalkRoot(srcPath string, include string) string {
return filepath.Join(srcPath, include) 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 // to canonical posix-style path for tar archival. p is relative
// path. // path.
func CanonicalTarNameForPath(p string) (string, error) { func CanonicalTarNameForPath(p string) (string, error) {

View file

@ -11,8 +11,9 @@ import (
// Due to the way cgo works this has to be in a separate file, as devmapper.go has // 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" // definitions in the cgo block, which is incompatible with using "//export"
// DevmapperLogCallback exports the devmapper log callback for cgo. (?)
//export DevmapperLogCallback //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) msg := C.GoString(message)
if level < 7 { if level < 7 {
if strings.Contains(msg, "busy") { 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 { 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)
} }
} }