diff options
author | 2011-02-19 21:18:59 +0000 | |
---|---|---|
committer | 2011-02-19 21:18:59 +0000 | |
commit | da2bd3f5f48cc1a14253f27abe7d5891b5fbd4ae (patch) | |
tree | e481b5a59bb3653b2636add6eb05c6ad660020a0 | |
parent | Fix previous ``fix'' - since the hw.model sysctl does not return a number (diff) | |
download | wireguard-openbsd-da2bd3f5f48cc1a14253f27abe7d5891b5fbd4ae.tar.xz wireguard-openbsd-da2bd3f5f48cc1a14253f27abe7d5891b5fbd4ae.zip |
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.c | 4 |
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)); } /* |