Add b2s method on pkg/disk/type_bsd.go (#5036)

This commit is contained in:
Julien Maitrehenry 2017-10-10 05:27:28 -04:00 committed by Harshavardhana
parent 4deefa3695
commit 02a5f1e96a

View file

@ -20,5 +20,9 @@ package disk
// getFSType returns the filesystem type of the underlying mounted filesystem
func getFSType(fstype [16]int8) string {
return b2s(fstype[:])
b := make([]byte, len(fstype[:]))
for i, v := range fstype[:] {
b[i] = byte(v)
}
return string(b)
}