Follow-up to a91e197: allow umount fail on EBUSY, skip error message

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2022-04-25 18:52:16 +02:00
parent a02f369a89
commit 5240c0cf19
+3 -2
View File
@@ -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);