From 5240c0cf19eed30a28f1814b5d998e296563a192 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Mon, 25 Apr 2022 18:52:16 +0200 Subject: [PATCH] Follow-up to a91e197: allow umount fail on EBUSY, skip error message Signed-off-by: Joachim Wiberg --- src/mount.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mount.c b/src/mount.c index 3c333d8d..32222c2b 100644 --- a/src/mount.c +++ b/src/mount.c @@ -96,8 +96,9 @@ static int unmount(const char *target) int rc; rc = umount(target); - if (rc && errno != EBUSY) { - print(2, "Failed unmounting %s, error %d: %s", target, errno, strerror(errno)); + if (rc) { + if (errno != EBUSY) + print(2, "Failed unmounting %s, error %d: %s", target, errno, strerror(errno)); return rc; } print(0, "Unmounting %s", target);