Fix readdpmelabel() so it doesn't corrupt a disklabel about to be
authorkrw <krw@openbsd.org>
Sun, 24 Aug 2008 12:56:17 +0000 (12:56 +0000)
committerkrw <krw@openbsd.org>
Sun, 24 Aug 2008 12:56:17 +0000 (12:56 +0000)
commitade0baa163d6133e4fe8026609911d585f4f983e
tree8e58e0e8187dfdd0e22d26ce45a702cf383aa255
parentf00f92e57637cca4f6468c7ff65a424fac3228c1
Fix readdpmelabel() so it doesn't corrupt a disklabel about to be
written (i.e. partoff != NULL), and doesn't corrupt a disklabel
with more than eight (8) dpme partitions.

Problems reported by Josh Elsasser via PR#5904. Testing by Josh,
otto@, drahn@, maja@, kettenis@. Most of the diff from otto@.

ok drahn@
sys/arch/macppc/macppc/disksubr.c
sys/arch/socppc/socppc/disksubr.c