Fill in partition 2 with with "whole disk" parameters.

This commit is contained in:
Poul-Henning Kamp 2002-11-01 16:28:19 +00:00
parent efbc63a783
commit 0514d63049
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=106303

View file

@ -72,6 +72,14 @@ Write_Disk(const struct disk *d1)
sl->sl_part[i].sdkp_nsectors = c1->size;
}
/*
* We need to fill in the "RAW" partition as well. Emperical data
* seems to indicate that this covers the "obviously" visible part
* of the disk, ie: sl->sl_ncylinders.
*/
sl->sl_part[2].sdkp_cyloffset = 0;
sl->sl_part[2].sdkp_nsectors = sl->sl_ncylinders * secpercyl;
sp1 = (u_short *)sl;
sp2 = (u_short *)(sl + 1);
sl->sl_cksum = cksum = 0;