Commit d9b23148 authored by Daniel P. Berrange's avatar Daniel P. Berrange

Avoid printing errors on unmount failure

In some cases we expect /proc/mounts to be missing, or for
unmount to fail - eg if the app already unmounted stuff,
or indeed if libvirt-sandbox-init-common has already run
unmount earlier.
Signed-off-by: default avatarDaniel P. Berrange <>
parent a4c62257
......@@ -735,8 +735,9 @@ static void umount_fs(void)
if (debug)
fprintf(stderr, "Unmounting all filesystems\n");
if (!(fp = setmntent ("/proc/mounts", "r"))) {
fprintf(stderr, "Failed to open /proc/mounts: %s\n",
if (debug)
fprintf(stderr, "Failed to open /proc/mounts: %s\n",
......@@ -764,7 +765,7 @@ static void umount_fs(void)
/* We expect some failures, so don't pollute
* logs with them uneccessarily
if (debug || errno != EBUSY)
if (debug)
fprintf(stderr, "cannot unmount %s: %s\n",
dir, strerror(errno));
/* ignore failure */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment