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

Trent Piepho tpiepho at kymetacorp.com
Tue Nov 10 10:44:38 PST 2015


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 at pengutronix.de>
> 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.



More information about the barebox mailing list