diff options
author | 2009-05-13 17:02:46 +0000 | |
---|---|---|
committer | 2009-05-13 17:02:46 +0000 | |
commit | 0a7398ce9f1f4db5d2eec08a85ec5bab78f21ed4 (patch) | |
tree | 9b7e53b2d85cdd70199c8fe8a0d16dc7299959a3 /sbin/disklabel/editor.c | |
parent | Support setting a different MAC address from the one in EEPROM (diff) | |
download | wireguard-openbsd-0a7398ce9f1f4db5d2eec08a85ec5bab78f21ed4.tar.xz wireguard-openbsd-0a7398ce9f1f4db5d2eec08a85ec5bab78f21ed4.zip |
The auto-allocator does not remember to increase the d_npartitions field
as it adds partitions. What the heck. Set it to MAXPARTITIONS. That is
the new way we are treating d_npartitions everywhere in any case. It is the
max a label can support. partitions which are not there mark themselves off.
ok krw
Diffstat (limited to 'sbin/disklabel/editor.c')
-rw-r--r-- | sbin/disklabel/editor.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index 6039a04d8aa..c42544a636c 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: editor.c,v 1.208 2009/05/13 01:31:58 krw Exp $ */ +/* $OpenBSD: editor.c,v 1.209 2009/05/13 17:02:46 deraadt Exp $ */ /* * Copyright (c) 1997-2000 Todd C. Miller <Todd.Miller@courtesan.com> @@ -17,7 +17,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: editor.c,v 1.208 2009/05/13 01:31:58 krw Exp $"; +static char rcsid[] = "$OpenBSD: editor.c,v 1.209 2009/05/13 17:02:46 deraadt Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -531,6 +531,7 @@ editor_allocspace(struct disklabel *lp_org) again: lp = &label; memcpy(lp, lp_org, sizeof(struct disklabel)); + lp->d_npartitions = MAXPARTITIONS; lastalloc = alloc_table[index].sz; alloc = malloc(lastalloc * sizeof(struct space_allocation)); if (alloc == NULL) |