Skip to content

Commit

Permalink
mount: Fix incorrect error return
Browse files Browse the repository at this point in the history
Fix error returned by `virtioBlkStorageHandler()` when the virt path
is invalid.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
  • Loading branch information
jodh-intel committed Jul 18, 2019
1 parent 2d95c36 commit faa6cb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ func virtioBlkStorageHandler(storage pb.Storage, s *sandbox) (string, error) {
}
// Make sure the virt path is valid
if FileInfo.Mode()&os.ModeDevice == 0 {
return "", err
return "", fmt.Errorf("invalid device %s", storage.Source)
}

} else {
Expand Down

0 comments on commit faa6cb0

Please sign in to comment.