Re: [PATCH] common: filetype: do not redetect MBR-type devices as a FAT-type

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

 



On Tue, 2015-11-10 at 09:04 +0100, Sascha Hauer wrote:

> From 98fb34f2aa271138eab28a36aec733fe6572339c Mon Sep 17 00:00:00 2001
> From: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
> Date: Tue, 10 Nov 2015 08:58:16 +0100
> Subject: [PATCH] ARM: omap: Use correct device to mount on /boot
> 
> The current code tests if a partition (i.e. disk0.0) exists and instead
> of mounting boot from this partition it uses the whole device (disk0).
> This only works because the the FAT code accepts a MBR as input and
> automatically skips it.

I agree, this should fix it.

> 
> Let the code use the partition to mount /boot instead as it was
> intended. We don't have to stat() the partition device, since this
> error will be caught by mount() anyway, so remove the unnecessary
> stat().

There are copies of this code in rpi.c and socfpga/generic.c.  They
don't suffer from the whole disk flaw, but they do stat() first as well.

_______________________________________________
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