瀏覽代碼

Btrfs has eliminated the BTRFS_BUILD_VERSION in latest version

They say we should only use the BTRFS_LIB_VERSION

They will no longer support this since it had to be managed manually

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Dan Walsh 10 年之前
父節點
當前提交
3c136333af

+ 0 - 3
daemon/graphdriver/btrfs/btrfs.go

@@ -61,9 +61,6 @@ func (d *Driver) String() string {
 
 
 func (d *Driver) Status() [][2]string {
 func (d *Driver) Status() [][2]string {
 	status := [][2]string{}
 	status := [][2]string{}
-	if bv := BtrfsBuildVersion(); bv != "-" {
-		status = append(status, [2]string{"Build Version", bv})
-	}
 	if lv := BtrfsLibVersion(); lv != -1 {
 	if lv := BtrfsLibVersion(); lv != -1 {
 		status = append(status, [2]string{"Library Version", fmt.Sprintf("%d", lv)})
 		status = append(status, [2]string{"Library Version", fmt.Sprintf("%d", lv)})
 	}
 	}

+ 0 - 3
daemon/graphdriver/btrfs/version.go

@@ -16,9 +16,6 @@ int my_btrfs_lib_version() {
 */
 */
 import "C"
 import "C"
 
 
-func BtrfsBuildVersion() string {
-	return string(C.BTRFS_BUILD_VERSION)
-}
 func BtrfsLibVersion() int {
 func BtrfsLibVersion() int {
 	return int(C.BTRFS_LIB_VERSION)
 	return int(C.BTRFS_LIB_VERSION)
 }
 }

+ 0 - 3
daemon/graphdriver/btrfs/version_none.go

@@ -5,9 +5,6 @@ package btrfs
 // TODO(vbatts) remove this work-around once supported linux distros are on
 // TODO(vbatts) remove this work-around once supported linux distros are on
 // btrfs utililties of >= 3.16.1
 // btrfs utililties of >= 3.16.1
 
 
-func BtrfsBuildVersion() string {
-	return "-"
-}
 func BtrfsLibVersion() int {
 func BtrfsLibVersion() int {
 	return -1
 	return -1
 }
 }

+ 3 - 3
daemon/graphdriver/btrfs/version_test.go

@@ -6,8 +6,8 @@ import (
 	"testing"
 	"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")
 	}
 	}
 }
 }