Skip to content

Commit e1162a5

Browse files
ImSingeerobbat2
authored andcommitted
change default type to unknown
Note: rebased on top of master for reformatting Signed-off-by: Singee <[email protected]> Signed-off-by: Robin H. Johnson <[email protected]>
1 parent 2e01e40 commit e1162a5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mdstat.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func parseMDStat(mdStatData []byte) ([]MDStat, error) {
9999
mdName := deviceFields[0] // mdx
100100
state := deviceFields[2] // active or inactive
101101

102-
mdType := ""
102+
mdType := "unknown"
103103
if len(deviceFields) > 3 && isRaidType(deviceFields[3]) {
104104
mdType = deviceFields[3] // raid1, raid5, etc.
105105
} else if len(deviceFields) > 4 && isRaidType(deviceFields[4]) {

mdstat_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ func TestFS_MDStat(t *testing.T) {
238238
Devices: []string{"sdb", "sdc"}},
239239
"md219": {
240240
Name: "md219",
241-
Type: "",
241+
Type: "unknown",
242242
ActivityState: "inactive",
243243
DisksTotal: 0,
244244
DisksFailed: 0,

0 commit comments

Comments
 (0)