Skip to content

Commit

Permalink
fix(crash): fix the crash in parsing the device (#55)
Browse files Browse the repository at this point in the history
Signed-off-by: Pawan <[email protected]>
  • Loading branch information
pawanpraka1 authored Jun 27, 2022
1 parent 7aa0f38 commit 0a6d02c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/device/device-util.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ func getDiskList() ([]diskDetail, error) {
// a sample blockDeviceEntry entry look like
// sdb 8:16 0 17179869184 0 disk
tmp := strings.Fields(blockDeviceEntry)
if len(tmp) == 0 {
if len(tmp) <= lsblkDevTypeIndex {
continue
}

Expand Down

0 comments on commit 0a6d02c

Please sign in to comment.