Re: [RFC] common: filetype: is_fat_or_mbr() considered harmful

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

 



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@xxxxxxxxxxxxxxxxxxx
> > 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@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