Browse code

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 authored on 2015/03/17 03:53:41
Showing 4 changed files
... ...
@@ -61,9 +61,6 @@ func (d *Driver) String() string {
61 61
 
62 62
 func (d *Driver) Status() [][2]string {
63 63
 	status := [][2]string{}
64
-	if bv := BtrfsBuildVersion(); bv != "-" {
65
-		status = append(status, [2]string{"Build Version", bv})
66
-	}
67 64
 	if lv := BtrfsLibVersion(); lv != -1 {
68 65
 		status = append(status, [2]string{"Library Version", fmt.Sprintf("%d", lv)})
69 66
 	}
... ...
@@ -16,9 +16,6 @@ int my_btrfs_lib_version() {
16 16
 */
17 17
 import "C"
18 18
 
19
-func BtrfsBuildVersion() string {
20
-	return string(C.BTRFS_BUILD_VERSION)
21
-}
22 19
 func BtrfsLibVersion() int {
23 20
 	return int(C.BTRFS_LIB_VERSION)
24 21
 }
... ...
@@ -5,9 +5,6 @@ package btrfs
5 5
 // TODO(vbatts) remove this work-around once supported linux distros are on
6 6
 // btrfs utililties of >= 3.16.1
7 7
 
8
-func BtrfsBuildVersion() string {
9
-	return "-"
10
-}
11 8
 func BtrfsLibVersion() int {
12 9
 	return -1
13 10
 }
... ...
@@ -6,8 +6,8 @@ import (
6 6
 	"testing"
7 7
 )
8 8
 
9
-func TestBuildVersion(t *testing.T) {
10
-	if len(BtrfsBuildVersion()) == 0 {
11
-		t.Errorf("expected output from btrfs build version, but got empty string")
9
+func TestLibVersion(t *testing.T) {
10
+	if BtrfsLibVersion() <= 0 {
11
+		t.Errorf("expected output from btrfs lib version > 0")
12 12
 	}
13 13
 }