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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Apr 12, 2014 at 12:11:00PM +0400, Alexander Shiyan wrote:
> Signed-off-by: Alexander Shiyan <shc_work@xxxxxxx>
> ---
>  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 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux