From faa6cb0066be325d467ca949aacd50d3e41b2f94 Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Thu, 18 Jul 2019 13:05:54 +0100 Subject: [PATCH] mount: Fix incorrect error return Fix error returned by `virtioBlkStorageHandler()` when the virt path is invalid. Signed-off-by: James O. D. Hunt --- mount.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mount.go b/mount.go index f0b323ce6..1776bdbdc 100644 --- a/mount.go +++ b/mount.go @@ -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 {