diff --git a/daemon/graphdriver/btrfs/btrfs.go b/daemon/graphdriver/btrfs/btrfs.go index 1830ad4e8f..ef51bac83f 100644 --- a/daemon/graphdriver/btrfs/btrfs.go +++ b/daemon/graphdriver/btrfs/btrfs.go @@ -61,9 +61,6 @@ func (d *Driver) String() string { func (d *Driver) Status() [][2]string { status := [][2]string{} - if bv := BtrfsBuildVersion(); bv != "-" { - status = append(status, [2]string{"Build Version", bv}) - } if lv := BtrfsLibVersion(); lv != -1 { status = append(status, [2]string{"Library Version", fmt.Sprintf("%d", lv)}) } diff --git a/daemon/graphdriver/btrfs/version.go b/daemon/graphdriver/btrfs/version.go index 89ed85749d..8a96305b5a 100644 --- a/daemon/graphdriver/btrfs/version.go +++ b/daemon/graphdriver/btrfs/version.go @@ -16,9 +16,6 @@ int my_btrfs_lib_version() { */ import "C" -func BtrfsBuildVersion() string { - return string(C.BTRFS_BUILD_VERSION) -} func BtrfsLibVersion() int { return int(C.BTRFS_LIB_VERSION) } diff --git a/daemon/graphdriver/btrfs/version_none.go b/daemon/graphdriver/btrfs/version_none.go index 69a4e51cf8..d191d36f38 100644 --- a/daemon/graphdriver/btrfs/version_none.go +++ b/daemon/graphdriver/btrfs/version_none.go @@ -5,9 +5,6 @@ package btrfs // TODO(vbatts) remove this work-around once supported linux distros are on // btrfs utililties of >= 3.16.1 -func BtrfsBuildVersion() string { - return "-" -} func BtrfsLibVersion() int { return -1 } diff --git a/daemon/graphdriver/btrfs/version_test.go b/daemon/graphdriver/btrfs/version_test.go index d96e33f3df..02fb131553 100644 --- a/daemon/graphdriver/btrfs/version_test.go +++ b/daemon/graphdriver/btrfs/version_test.go @@ -1,4 +1,4 @@ -// +build linux +// +build linux,!btrfs_noversion package btrfs @@ -6,8 +6,8 @@ import ( "testing" ) -func TestBuildVersion(t *testing.T) { - if len(BtrfsBuildVersion()) == 0 { - t.Errorf("expected output from btrfs build version, but got empty string") +func TestLibVersion(t *testing.T) { + if BtrfsLibVersion() <= 0 { + t.Errorf("expected output from btrfs lib version > 0") } }