2019-08-06 18:28:24 -04:00
|
|
|
// +build linux
|
2014-11-06 15:04:10 -05:00
|
|
|
|
2018-02-05 16:05:59 -05:00
|
|
|
package btrfs // import "github.com/docker/docker/daemon/graphdriver/btrfs"
|
2014-11-06 15:04:10 -05:00
|
|
|
|
|
|
|
/*
|
|
|
|
#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)
|
|
|
|
}
|