summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2011-02-19 21:19:00 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2011-02-19 21:19:00 +0000
commitf0f9595e74c58aea49e16a63bfaf21232b0540f8 (patch)
tree59fca1f8944516f9f0d74311f7a2d3cd77e56c96
parenta2f881fe3ecbf1502925d3afee0a32d1cd0b3272 (diff)
If the user screws up adding a partition, don't keep partial bits
of the partition info around to confuse disklabel, newfs, fsck, etc. From Pedro Martelletto. ok miod@
-rw-r--r--sbin/disklabel/editor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c
index cf02875663d..6855682e7e0 100644
--- a/sbin/disklabel/editor.c
+++ b/sbin/disklabel/editor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: editor.c,v 1.247 2010/12/13 01:01:41 marco Exp $ */
+/* $OpenBSD: editor.c,v 1.248 2011/02/19 21:18:59 krw Exp $ */
/*
* Copyright (c) 1997-2000 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -901,7 +901,7 @@ editor_add(struct disklabel *lp, char *p)
return;
}
/* Bailed out at some point, so effectively delete the partition. */
- DL_SETPSIZE(pp, 0);
+ memset(pp, 0, sizeof(*pp));
}
/*