mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Franck Jullien <franck.jullien@gmail.com>
Cc: barebox <barebox@lists.infradead.org>,
	Peter Mamonov <pmamonov@gmail.com>
Subject: Re: [RFC] common: filetype: is_fat_or_mbr() considered harmful
Date: Tue, 13 Oct 2015 10:32:17 +0200	[thread overview]
Message-ID: <20151013083217.GE7858@pengutronix.de> (raw)
In-Reply-To: <CAJfOKBxKz5K865kE-6yo2kb+G-E_9yu3j9J32122w0YXx=+YTQ@mail.gmail.com>

On Mon, Oct 12, 2015 at 04:37:18PM +0200, Franck Jullien wrote:
> >> > > > According to the patch message it was introduced to workaround FAT
> >> > > > detection. However, after deletion of the code I'm still able to
> >> > > > detect and mount FAT-containig partiotions.
> >> > >
> >> > > But can you mount /dev/disk0 if this disk contains a partition table
> >> > > and the FAT is on /dev/disk0.0?
> >> >
> >> > No. This is actually the purpose of my patch, since I don't want
> >> > "mount -a" to mount the same partition (FAT on /dev/disk0.0) twice.
> >>
> >> I know, and this is valid. It just conflicts with what Franck wants. He
> >> just wants to mount a USB device without having to know if the FAT is on
> >> the raw device or on the first partition.
> >>
> >> >
> >> > > This is what the patch is about. The
> >> > > problem the patches solved is that when you plug in a USB drive then
> >> > > you don't know whether a FAT is directly on the device or if the
> >> > > device is partitioned. You want to be able to mount both ways with
> >> > > the same command, so no matter if the FAT is on /dev/disk0
> >> > > or /dev/disk0.0 you can mount both using /dev/disk0.
> >> >
> >> > Ok. So what is the preferred way to prevent "mount -a" from mounting
> >> > /dev/disk0 and /dev/disk0.0 at the same time?
> >>
> >> Sorry, I do not have a solution currently. I'll have a look into it.
> >
> > Can we just add a .config option for disabling "Frank mode"?
> >
> > --
> > Best regards,
> >   Antony Pavlov
> >
> > _______________________________________________
> > barebox mailing list
> > barebox@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/barebox
> 
> This is not important for me.
> I faced this situation when I was playing with SD cards controllers.
> 
> However, if I had a problem it may arise for someone else.
> 
> Feel free to remove this detection or, as Antony suggested, add a config option.

The desired behaviour can be reached with a:

mount /dev/disk0 /fat || mount /dev/disk0.0 /fat || echo "Mounting failed"

So I tend to say that we should remove the is_fat_or_mbr detection and
everything around it.

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:[~2015-10-13  8:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-07 18:03 Peter Mamonov
2015-10-09  8:06 ` Sascha Hauer
2015-10-09 12:40   ` Peter Mamonov
2015-10-09 16:11     ` Sascha Hauer
2015-10-12 10:27       ` Peter Mamonov
2015-10-12 13:51         ` Sascha Hauer
2015-10-12 14:21           ` Antony Pavlov
2015-10-12 14:37             ` Franck Jullien
2015-10-13  8:32               ` 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=20151013083217.GE7858@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=franck.jullien@gmail.com \
    --cc=pmamonov@gmail.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