From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: Date: Thu, 25 May 2017 21:52:50 -0700 (PDT) From: Richard Narron To: linux-block@vger.kernel.org cc: Christoph Hellwig , Jens Axboe , Andries Brouwer Subject: [PATCH v3 1/1] partitions/msdos: FreeBSD UFS2 file systems are not recognized Message-ID: MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII List-ID: 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: Cc: Andries Brouwer Cc: linux-block@vger.kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Richard Narron --- Changelog v2->v3: - Add Cc: Changelog v1->v2: - Improve style, use += --- block/partitions/msdos.c | 2 ++ 1 file changed, 2 insertions(+) --- a/block/partitions/msdos.c 2015-12-27 18:17:37.000000000 -0800 +++ b/block/partitions/msdos.c 2015-12-29 10:44:25.813773357 -0800 @@ -300,6 +300,8 @@ static void parse_bsd(struct parsed_part 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;