mirror of
https://github.com/clearlinux/docker.git
synced 2026-05-17 20:23:49 +00:00
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) Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <princess@docker.com> (github: jfrazelle) Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)
This commit is contained in:
committed by
Jessica Frazelle
parent
bf1829459f
commit
ea9b357be2
@@ -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)})
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user