[parted-devel] [PATCH] sun: initialize basic label fields
Jim Meyering
jim at meyering.net
Thu Feb 25 10:02:44 UTC 2010
Karel Zak wrote:
> On Fri, Feb 19, 2010 at 05:20:21PM +0100, Jim Meyering wrote:
>> Would you please add a NEWS entry?
>> If it's not too much to ask, would you also add a test
>
> Fixed, see below.
>
>> Good timing, by the way.
>> I'm expecting to make the parted-2.2 release early next week.
>
> Sorry for delay, I was busy with some other work.
Thanks! Good timing.
I'm hoping to release parted-2.2 RSN.
> Subject: [PATCH] sun: initialize basic label fields
>
> libparted completely ignores basic fields (version, nparts and sanity)
> in the sun VTOC, then for example fdisk prints warnings for such
> labels:
>
> # fdisk -lu /dev/sdb
> Detected sun disklabel with wrong version [0x00000000].
> Detected sun disklabel with wrong sanity [0x00000000].
> Detected sun disklabel with wrong num_partitions [0].
>
> It seems that the current libparted sun support follows old Linux
> kernel code, but the code was changed 3 years ago (see kernel commit
> 3961bae0ac030a70ae2e0578270203889021f1a1).
>
> Note that the number of partitions (nparts) is optional for Linux
> kernel, but fdisk(8) strictly requires SUN_DISK_MAXPARTITIONS (=8)
> there. This patch sets nparts to SUN_DISK_MAXPARTITIONS rather then
> use a real number of partitions.
>
> The patch includes a new regression test for Sun label.
I'll review it later today.
More information about the parted-devel
mailing list