Module Name: src Committed By: martin Date: Tue May 12 06:23:07 UTC 2020
Modified Files: src/usr.sbin/sysinst: bsddisklabel.c Log Message: Minor tweak to previous: when forcing a /usr partition just to have an arbitrary extendable partition, still use its default size initially. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/usr.sbin/sysinst/bsddisklabel.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/sysinst/bsddisklabel.c diff -u src/usr.sbin/sysinst/bsddisklabel.c:1.41 src/usr.sbin/sysinst/bsddisklabel.c:1.42 --- src/usr.sbin/sysinst/bsddisklabel.c:1.41 Mon May 11 17:40:50 2020 +++ src/usr.sbin/sysinst/bsddisklabel.c Tue May 12 06:23:07 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: bsddisklabel.c,v 1.41 2020/05/11 17:40:50 martin Exp $ */ +/* $NetBSD: bsddisklabel.c,v 1.42 2020/05/12 06:23:07 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1147,7 +1147,8 @@ fill_defaults(struct partition_usage_set wanted->infos[usr].size = wanted->infos[root].size - wanted->infos[root].limit; if (wanted->infos[usr].size <= 0) - wanted->infos[usr].size = 1; + wanted->infos[usr].size = max(1, + wanted->infos[usr].def_size); wanted->infos[root].size = wanted->infos[root].limit; if (wanted->infos[root].flags & PUIFLAG_EXTEND) {