disklabel_sun_to_bsd() will nicely set the disk size if it is zero, but it is
authormiod <miod@openbsd.org>
Fri, 16 Jan 2015 20:17:05 +0000 (20:17 +0000)
committermiod <miod@openbsd.org>
Fri, 16 Jan 2015 20:17:05 +0000 (20:17 +0000)
commitaf4e92ef158e8b3985680801d7c817543d8f43c7
tree58600530c47b73539d460eb868b3d47a5719e524
parent8e0291465a259d2fd77493645102631be704bf95
disklabel_sun_to_bsd() will nicely set the disk size if it is zero, but it is
usually invoked after initdisklabel() which proactively changes a zero disk
size to MAXDISKSIZE, causing this test to fail.

Allow for MAXDISKSIZE too in that test. This makes spoofed disklabels of SMD
disks have a proper `c' slice size.

luna88k disklabel_om_to_bsd() is modified accordingly, to keep diffability,
even though luna88k can't - to the best of my knowledge - sport SMD disk
controllers.

ok deraadt@ krw@
sys/arch/luna88k/luna88k/disksubr.c
sys/arch/sparc/sparc/disksubr.c
sys/arch/sparc64/sparc64/disksubr.c