aboutsummaryrefslogtreecommitdiff
path: root/sbin/bsdlabel/bsdlabel.c
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2003-08-27 22:34:57 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2003-08-27 22:34:57 +0000
commitd44088794334409e8357bc9a1cb6cf5edc80e72d (patch)
treef97ecb3b9d30fb2b6e87d41c6bc78bcb49a77972 /sbin/bsdlabel/bsdlabel.c
parent3a47a99d78722cf543c0e90caf157f8b22d9db12 (diff)
downloadsrc-d44088794334409e8357bc9a1cb6cf5edc80e72d.tar.gz
src-d44088794334409e8357bc9a1cb6cf5edc80e72d.zip
When we initialize a disk with a virgin label, create also an 'a'
partition which starts after the bootstrap area and fills the entire disk.
Notes
Notes: svn path=/head/; revision=119510
Diffstat (limited to 'sbin/bsdlabel/bsdlabel.c')
-rw-r--r--sbin/bsdlabel/bsdlabel.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c
index e2c84fe97e64..d1670635007d 100644
--- a/sbin/bsdlabel/bsdlabel.c
+++ b/sbin/bsdlabel/bsdlabel.c
@@ -1377,6 +1377,10 @@ getvirginlabel(void)
strncpy(loclab.d_typename, "amnesiac",
sizeof(loclab.d_typename));
+ dp = &loclab.d_partitions[0];
+ dp->p_offset = BBSIZE / secsize;
+ dp->p_size = loclab.d_secperunit - dp->p_offset;
+
dp = &loclab.d_partitions[RAW_PART];
dp->p_size = loclab.d_secperunit;
loclab.d_checksum = dkcksum(&loclab);