[PATCH 07/12] commands/umount: Return real error code if "umount" fail
Sascha Hauer
s.hauer at pengutronix.de
Wed Apr 23 02:54:58 PDT 2014
On Sat, Apr 12, 2014 at 12:11:00PM +0400, Alexander Shiyan wrote:
> 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;
> - }
Here perror() also should be removed.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list