github.com/fcwu/docker@v1.4.2-0.20150115145920-2a69ca89f0df/daemon/graphdriver/btrfs/version.go (about)

     1  // +build linux,!btrfs_noversion
     2  
     3  package btrfs
     4  
     5  /*
     6  #include <btrfs/version.h>
     7  
     8  // because around version 3.16, they did not define lib version yet
     9  int my_btrfs_lib_version() {
    10  #ifdef BTRFS_LIB_VERSION
    11    return BTRFS_LIB_VERSION;
    12  #else
    13    return -1;
    14  #endif
    15  }
    16  */
    17  import "C"
    18  
    19  func BtrfsBuildVersion() string {
    20  	return string(C.BTRFS_BUILD_VERSION)
    21  }
    22  func BtrfsLibVersion() int {
    23  	return int(C.BTRFS_LIB_VERSION)
    24  }