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: v4.12-rc3~15^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=223220356d5ebc05ead9a8d697abb0c0a906fc81;p=platform%2Fkernel%2Flinux-exynos.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 93e7c1b..5610cd5 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;