Subject: [i386] disklabel snafu
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: Tim Chase <tim@introl.introl.com>
List: current-users
Date: 07/16/1994 00:06:38
Hello,

It seems that there's a little problem in disklabel for i386 machines.
There's some conditional code that finds the proper BIOS partition
and seeks to it.  The code is:

	(void)lseek(f, (off_t)(lbl_off * lp->d_secsize), L_SET);

on line 412 of disklabel.c.  Only problem is that a few lines later,
it does:

	(void)lseek(f, (off_t)0, SEEK_SET);

which causes the stuff to clobber the beginning of the disk.  It seems that the
second lseek ought to be enlosed in an #ifndef i386/#endif pair.

I discovered this after trying to change my partition table an finding out
that the BIOS partition table was always being overwritten.

					- Tim Chase
					  tim@introl.com

------------------------------------------------------------------------------