X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=fish%2Finspect.c;h=f93367b309ebf84854127b3afc9f6507d17263ae;hp=7d4401e2732707f5d15e608b439b9b03fccd69e1;hb=HEAD;hpb=7d3848ddc046f79cc1112809bd9970eea8060018 diff --git a/fish/inspect.c b/fish/inspect.c index 7d4401e..f93367b 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);