[parted-devel] [PATCH] sun: initialize basic label fields

Jim Meyering jim at meyering.net
Thu Feb 25 17:26:12 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.
>
>     Karel
>
>
>>From e43fa1aefae8f466ba8d4bb89392dca7e2f88ecf Mon Sep 17 00:00:00 2001
> From: Karel Zak <kzak at redhat.com>
> Date: Fri, 19 Feb 2010 16:12:52 +0100
> 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.

Thanks!
I add a few of our usual ChangeLog-style lines, too.
I also converted the test to the newer (preferred) style
in a separate commit.



More information about the parted-devel mailing list