Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Shi, Crane <[email protected]>
  • Loading branch information
CraneShiEMC committed Aug 16, 2023
1 parent b2eee8a commit 26ccbe6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/base/linuxutils/fs/fs_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ func (h *WrapFSImpl) ReadLoopDevice(device string) (string, error) {
}

lines := strings.Split(stdout, "\n")
if len(lines) != 2 || len(lines[1]) == 0 {
if len(lines) < 2 || len(lines[1]) == 0 {
return "", fmt.Errorf("%s: invalid command stdout", errPrefix)
}
dataFields := strings.SplitN(lines[1], " ", 2)
Expand Down

0 comments on commit 26ccbe6

Please sign in to comment.