2014-11-06 15:56:13 -05:00
|
|
|
// +build linux,!btrfs_noversion
|
2014-11-06 15:04:10 -05:00
|
|
|
|
|
|
|
package btrfs
|
|
|
|
|
|
|
|
/*
|
|
|
|
#include <btrfs/version.h>
|
2014-11-06 15:56:13 -05:00
|
|
|
|
2015-03-25 13:26:41 -04:00
|
|
|
// around version 3.16, they did not define lib version yet
|
|
|
|
#ifndef BTRFS_LIB_VERSION
|
|
|
|
#define BTRFS_LIB_VERSION -1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// upstream had removed it, but now it will be coming back
|
|
|
|
#ifndef BTRFS_BUILD_VERSION
|
|
|
|
#define BTRFS_BUILD_VERSION "-"
|
2014-11-06 15:56:13 -05:00
|
|
|
#endif
|
2014-11-06 15:04:10 -05:00
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
2015-07-22 16:51:35 -04:00
|
|
|
func btrfsBuildVersion() string {
|
2015-03-25 13:26:41 -04:00
|
|
|
return string(C.BTRFS_BUILD_VERSION)
|
|
|
|
}
|
|
|
|
|
2015-07-22 16:51:35 -04:00
|
|
|
func btrfsLibVersion() int {
|
2014-11-06 15:04:10 -05:00
|
|
|
return int(C.BTRFS_LIB_VERSION)
|
|
|
|
}
|