diff options
-rw-r--r-- | fish/inspect.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fish/inspect.c b/fish/inspect.c index 7d4401e2..f93367b3 100644 --- a/fish/inspect.c +++ b/fish/inspect.c @@ -154,8 +154,14 @@ inspect_mount_root (const char *root) r = guestfs_mount_options (g, "", mountpoints[i+1], mountpoints[i]); else r = guestfs_mount_ro (g, mountpoints[i+1], mountpoints[i]); - if (r == -1) + if (r == -1) { + /* If the "/" filesystem could not be mounted, give up, else + * just count the errors and print a warning. + */ + if (STREQ (mountpoints[i], "/")) + exit (EXIT_FAILURE); mount_errors++; + } } free_strings (mountpoints); |