[PATCH 07/12] commands/umount: Return real error code if "umount" fail

Alexander Shiyan shc_work at mail.ru
Sat Apr 12 01:11:00 PDT 2014


Signed-off-by: Alexander Shiyan <shc_work at mail.ru>
---
 commands/umount.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/commands/umount.c b/commands/umount.c
index e6de1bc..8dcf7f0 100644
--- a/commands/umount.c
+++ b/commands/umount.c
@@ -28,11 +28,10 @@ static int do_umount(int argc, char *argv[])
 	if (argc != 2)
 		return COMMAND_ERROR_USAGE;
 
-	if ((ret = umount(argv[1]))) {
+	if ((ret = umount(argv[1])))
 		perror("umount");
-		return 1;
-	}
-	return 0;
+
+	return ret;
 }
 
 static const __maybe_unused char cmd_umount_help[] =
-- 
1.8.3.2




More information about the barebox mailing list