From db4a90d22542d3642b4a34fe6c2a9358c3414c69 Mon Sep 17 00:00:00 2001 From: Robert Swiecki Date: Wed, 23 Mar 2016 17:23:18 +0100 Subject: [PATCH] Print warning with failing umount --- mount.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/mount.c b/mount.c index 461aa7d..2960459 100644 --- a/mount.c +++ b/mount.c @@ -194,12 +194,14 @@ bool mountInitNs(struct nsjconf_t * nsjconf) } } - /* - * Remove the tmpfs from /tmp is we are mounting / as root - */ - if (0 == strcmp(nsjconf->chroot, "/")) { - umount2(destdir, MNT_DETACH); - } + /* + * Remove the tmpfs from /tmp is we are mounting / as root + */ + if (0 == strcmp(nsjconf->chroot, "/")) { + if (umount2(destdir, MNT_DETACH) == -1) { + PLOG_W("umount2('%s', MNT_DETACH) failed", destdir); + } + } return true; }