mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 4/4] command/mount: add autodetection support
Date: Sun, 12 Aug 2012 14:43:43 +0200	[thread overview]
Message-ID: <20120812124343.GK1451@pengutronix.de> (raw)
In-Reply-To: <1344772179-13591-4-git-send-email-plagnioj@jcrosoft.com>

On Sun, Aug 12, 2012 at 01:49:39PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> ---
>  .../boards/crystalfontz-cfa10036/env/init/automount  |    2 +-
>  arch/arm/boards/mioa701/env/bin/sdcard_override      |    2 +-
>  arch/arm/boards/pcm049/env/bin/nand_bootstrap        |    2 +-
>  arch/arm/boards/phycard-a-xl2/env/bin/nand_bootstrap |    2 +-
>  commands/mount.c                                     |   18 +++++++++++++++---
>  5 files changed, 19 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/arm/boards/crystalfontz-cfa10036/env/init/automount b/arch/arm/boards/crystalfontz-cfa10036/env/init/automount
> index fe67e55..668775d 100644
> --- a/arch/arm/boards/crystalfontz-cfa10036/env/init/automount
> +++ b/arch/arm/boards/crystalfontz-cfa10036/env/init/automount
> @@ -6,4 +6,4 @@ if [ "$1" = menu ]; then
>  fi
>  
>  mkdir -p /mnt/disk0.1
> -automount -d /mnt/disk0.1 '[ -e /dev/disk0.1 ] && mount /dev/disk0.1 fat /mnt/disk0.1'
> +automount -d /mnt/disk0.1 '[ -e /dev/disk0.1 ] && mount /dev/disk0.1 /mnt/disk0.1'
> diff --git a/arch/arm/boards/mioa701/env/bin/sdcard_override b/arch/arm/boards/mioa701/env/bin/sdcard_override
> index 4b2ad51..ab83534 100644
> --- a/arch/arm/boards/mioa701/env/bin/sdcard_override
> +++ b/arch/arm/boards/mioa701/env/bin/sdcard_override
> @@ -8,7 +8,7 @@
>  mci0.probe=1
>  if [ $mci0.probe = 1 ]; then
>  	mkdir /sdcard
> -	mount /dev/disk0.0 fat /sdcard
> +	mount /dev/disk0.0 /sdcard
>  	if [ -f /sdcard/barebox.env ]; then
>  		loadenv /sdcard/barebox.env /env.sd
>  		/env.sd/bin/init
> diff --git a/arch/arm/boards/pcm049/env/bin/nand_bootstrap b/arch/arm/boards/pcm049/env/bin/nand_bootstrap
> index acd00dc..f8873fa 100644
> --- a/arch/arm/boards/pcm049/env/bin/nand_bootstrap
> +++ b/arch/arm/boards/pcm049/env/bin/nand_bootstrap
> @@ -4,7 +4,7 @@ echo "copying barebox to nand..."
>  mci0.probe=1
>  mkdir mnt
>  
> -mount /dev/disk0.0 fat /mnt
> +mount /dev/disk0.0 /mnt
>  if [ $? != 0 ]; then
>  	echo "failed to mount mmc card"
>  	exit 1
> diff --git a/arch/arm/boards/phycard-a-xl2/env/bin/nand_bootstrap b/arch/arm/boards/phycard-a-xl2/env/bin/nand_bootstrap
> index acd00dc..f8873fa 100644
> --- a/arch/arm/boards/phycard-a-xl2/env/bin/nand_bootstrap
> +++ b/arch/arm/boards/phycard-a-xl2/env/bin/nand_bootstrap
> @@ -4,7 +4,7 @@ echo "copying barebox to nand..."
>  mci0.probe=1
>  mkdir mnt
>  
> -mount /dev/disk0.0 fat /mnt
> +mount /dev/disk0.0 /mnt
>  if [ $? != 0 ]; then
>  	echo "failed to mount mmc card"
>  	exit 1
> diff --git a/commands/mount.c b/commands/mount.c
> index b32faef..ab49b6c 100644
> --- a/commands/mount.c
> +++ b/commands/mount.c
> @@ -29,11 +29,14 @@
>  #include <command.h>
>  #include <fs.h>
>  #include <errno.h>
> +#include <getopt.h>
>  
>  static int do_mount(int argc, char *argv[])
>  {
> +	int opt;
>  	int ret = 0;
>  	struct fs_device_d *fsdev;
> +	char *type = NULL;
>  
>  	if (argc == 1) {
>  		for_each_fs_device(fsdev) {
> @@ -45,10 +48,18 @@ static int do_mount(int argc, char *argv[])
>  		return 0;
>  	}
>  
> -	if (argc != 4)
> +	while ((opt = getopt(argc, argv, "t:")) > 0) {
> +		switch (opt) {
> +		case 'f':

'f'?

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

  reply	other threads:[~2012-08-12 12:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-12 11:46 [PATCH 0/4] fs/mount: " Jean-Christophe PLAGNIOL-VILLARD
2012-08-12 11:49 ` [PATCH 1/4] fs/mount: add autodetection type support Jean-Christophe PLAGNIOL-VILLARD
2012-08-12 11:49   ` [PATCH 2/4] filetype: add fat filesystem support Jean-Christophe PLAGNIOL-VILLARD
2012-08-12 11:49   ` [PATCH 3/4] fs/fat: add filetype Jean-Christophe PLAGNIOL-VILLARD
2012-08-12 11:49   ` [PATCH 4/4] command/mount: add autodetection support Jean-Christophe PLAGNIOL-VILLARD
2012-08-12 12:43     ` Sascha Hauer [this message]
2012-08-12 12:46   ` [PATCH 1/4] fs/mount: add autodetection type support Sascha Hauer
2012-08-13  7:08   ` Uwe Kleine-König
2012-08-13  7:30     ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-13  8:16       ` Uwe Kleine-König
2012-08-13 10:56         ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-12 18:05 [PATCH 0/4 v2] fs/mount: add autodetection support Jean-Christophe PLAGNIOL-VILLARD
2012-08-12 18:10 ` [PATCH 1/4] fs/mount: add autodetection type support Jean-Christophe PLAGNIOL-VILLARD
2012-08-12 18:10   ` [PATCH 4/4] command/mount: add autodetection support Jean-Christophe PLAGNIOL-VILLARD

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=20120812124343.GK1451@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=plagnioj@jcrosoft.com \
    /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