From: Richard Date: Sun, 21 May 2017 19:27:00 +0000 (-0700) Subject: partitions/msdos: FreeBSD UFS2 file systems are not recognized X-Git-Tag: MMI-PSA29.97-13-9~5499^2~7 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=223220356d5ebc05ead9a8d697abb0c0a906fc81;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git partitions/msdos: FreeBSD UFS2 file systems are not recognized The code in block/partitions/msdos.c recognizes FreeBSD, OpenBSD and NetBSD partitions and does a reasonable job picking out OpenBSD and NetBSD UFS subpartitions. But for FreeBSD the subpartitions are always "bad". Kernel: Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe --- diff --git a/block/partitions/msdos.c b/block/partitions/msdos.c index 93e7c1b32edd..5610cd537da7 100644 --- a/block/partitions/msdos.c +++ b/block/partitions/msdos.c @@ -300,6 +300,8 @@ static void parse_bsd(struct parsed_partitions *state, continue; bsd_start = le32_to_cpu(p->p_offset); bsd_size = le32_to_cpu(p->p_size); + if (memcmp(flavour, "bsd\0", 4) == 0) + bsd_start += offset; if (offset == bsd_start && size == bsd_size) /* full parent partition, we have it already */ continue;