mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
25154682a5
be default it is on, with build tags to disable the version info Signed-off-by: Vincent Batts <vbatts@redhat.com>
24 lines
411 B
Go
24 lines
411 B
Go
// +build linux,!btrfs_noversion
|
|
|
|
package btrfs
|
|
|
|
/*
|
|
#include <btrfs/version.h>
|
|
|
|
// because around version 3.16, they did not define lib version yet
|
|
int my_btrfs_lib_version() {
|
|
#ifdef BTRFS_LIB_VERSION
|
|
return BTRFS_LIB_VERSION;
|
|
#else
|
|
return -1;
|
|
#endif
|
|
}
|
|
*/
|
|
import "C"
|
|
|
|
func BtrfsBuildVersion() string {
|
|
return string(C.BTRFS_BUILD_VERSION)
|
|
}
|
|
func BtrfsLibVersion() int {
|
|
return int(C.BTRFS_LIB_VERSION)
|
|
}
|