diff options
author | 2009-04-11 15:17:11 +0000 | |
---|---|---|
committer | 2009-04-11 15:17:11 +0000 | |
commit | e4faa41ecaa61fe40bde6abd5de33379ca135b8a (patch) | |
tree | 1a80ab6e84d8f50bd3192f90c571e8248af9ee5d | |
parent | There is no support for building multi-socket machines in AMD Family 11h (diff) | |
download | wireguard-openbsd-e4faa41ecaa61fe40bde6abd5de33379ca135b8a.tar.xz wireguard-openbsd-e4faa41ecaa61fe40bde6abd5de33379ca135b8a.zip |
Treat the list of auto-allocation partitions as a priority list and
stop auto-allocation as soon as a partition can't fit. Eliminate
the 'no space to allocate ...' messages.
-rw-r--r-- | sbin/disklabel/editor.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index 68b6b16413e..02378a6ece1 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: editor.c,v 1.188 2009/04/10 21:16:51 deraadt Exp $ */ +/* $OpenBSD: editor.c,v 1.189 2009/04/11 15:17:11 krw 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.188 2009/04/10 21:16:51 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: editor.c,v 1.189 2009/04/11 15:17:11 krw Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -548,13 +548,9 @@ editor_allocspace(struct disklabel *lp) secs = chunksize; } if (secs < ap->minsz) { + /* If this one doesn't fit, ignore subsequent ones. */ totsecs += secs; - fprintf(stderr, "no space to auto allocate %s\n", - ap->mp); - if (i == 0) - break; - else - continue; + break; } /* Everything seems ok so configure the partition. */ |