summaryrefslogtreecommitdiff
path: root/runtime/graphdriver/devmapper/devmapper_log.go
blob: 18dde7cca5dcedd7e0a22338929cc6e9c00960c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// +build linux,amd64

package devmapper

import "C"

// 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"

//export DevmapperLogCallback
func DevmapperLogCallback(level C.int, file *C.char, line C.int, dm_errno_or_class C.int, message *C.char) {
	if dmLogger != nil {
		dmLogger.log(int(level), C.GoString(file), int(line), int(dm_errno_or_class), C.GoString(message))
	}
}