summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2001-05-19 05:10:46 +0000
committermillert <millert@openbsd.org>2001-05-19 05:10:46 +0000
commitaffc027247c5a81ae0018db0d932d646cd987164 (patch)
treee8dd199399c03849961b3fd72b4768899984d40d
parentMake this actually compile (diff)
downloadwireguard-openbsd-affc027247c5a81ae0018db0d932d646cd987164.tar.xz
wireguard-openbsd-affc027247c5a81ae0018db0d932d646cd987164.zip
When zeroing out the parition table, make 'c' the entire disk, not just
the OpenBSD portion of the disk. This is conistent with the idea of 'c' throughout the program.
-rw-r--r--sbin/disklabel/editor.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c
index 7cd2ed849a3..bda80f1b775 100644
--- a/sbin/disklabel/editor.c
+++ b/sbin/disklabel/editor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: editor.c,v 1.75 2001/03/12 23:03:59 deraadt Exp $ */
+/* $OpenBSD: editor.c,v 1.76 2001/05/19 05:10:46 millert Exp $ */
/*
* Copyright (c) 1997-2000 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -28,7 +28,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: editor.c,v 1.75 2001/03/12 23:03:59 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: editor.c,v 1.76 2001/05/19 05:10:46 millert Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -2495,7 +2495,6 @@ zero_partitions(lp, freep)
for (i = 0; i < MAXPARTITIONS; i++)
memset(&lp->d_partitions[i], 0, sizeof(struct partition));
- lp->d_partitions[RAW_PART].p_offset = starting_sector;
- lp->d_partitions[RAW_PART].p_size = ending_sector - starting_sector;
+ lp->d_partitions[RAW_PART].p_size = lp->d_secperunit;
editor_countfree(lp, freep);
}