mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Alexander Shiyan <shc_work@mail.ru>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/2] commands/mount: Return real error code if "mount" fail
Date: Sun, 27 Apr 2014 08:42:40 +0200	[thread overview]
Message-ID: <20140427064240.GG5858@pengutronix.de> (raw)
In-Reply-To: <1398508810-19974-1-git-send-email-shc_work@mail.ru>

On Sat, Apr 26, 2014 at 02:40:09PM +0400, Alexander Shiyan wrote:
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>

Applied, thanks

Sascha

> ---
>  commands/mount.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/commands/mount.c b/commands/mount.c
> index 691bc29..8629bac 100644
> --- a/commands/mount.c
> +++ b/commands/mount.c
> @@ -31,8 +31,7 @@
>  
>  static int do_mount(int argc, char *argv[])
>  {
> -	int opt;
> -	int ret = 0, verbose = 0;
> +	int opt, verbose = 0;
>  	struct driver_d *drv;
>  	const char *type = NULL;
>  	const char *mountpoint, *dev;
> @@ -113,11 +112,7 @@ static int do_mount(int argc, char *argv[])
>  		mountpoint = argv[optind + 1];
>  	}
>  
> -	if ((ret = mount(dev, type, mountpoint, fsoptions))) {
> -		perror("mount");
> -		return 1;
> -	}
> -	return 0;
> +	return mount(dev, type, mountpoint, fsoptions);
>  }
>  
>  BAREBOX_CMD_HELP_START(mount)
> -- 
> 1.8.3.2
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      parent reply	other threads:[~2014-04-27  6:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-26 10:40 Alexander Shiyan
2014-04-26 10:40 ` [PATCH 2/2] commands/umount: Return real error code if "umount" fail Alexander Shiyan
2014-04-27  6:42 ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140427064240.GG5858@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=shc_work@mail.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox