Module Name:    src
Committed By:   snj
Date:           Sat Dec 31 04:55:13 UTC 2022

Modified Files:
        src/usr.sbin/sysinst [netbsd-10]: bsddisklabel.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #30):
        usr.sbin/sysinst/bsddisklabel.c: revision 1.71
PR 57132: when calculation additional space available for the "expanded"
partition (typically /) do not forget the reserved space (that might
be required for the system/bootloader/other MD stuff).


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.69.2.1 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.69 src/usr.sbin/sysinst/bsddisklabel.c:1.69.2.1
--- src/usr.sbin/sysinst/bsddisklabel.c:1.69	Thu Dec 15 15:32:04 2022
+++ src/usr.sbin/sysinst/bsddisklabel.c	Sat Dec 31 04:55:12 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: bsddisklabel.c,v 1.69 2022/12/15 15:32:04 martin Exp $	*/
+/*	$NetBSD: bsddisklabel.c,v 1.69.2.1 2022/12/31 04:55:12 snj Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -1434,7 +1434,8 @@ apply_settings_to_partitions(struct disk
 	 * but check size limits.
 	 */
 	if (exp_ndx < wanted->num) {
-		daddr_t free_space = parts->free_space - planned_space;
+		daddr_t free_space = parts->free_space - planned_space -
+		    wanted->reserved_space;
 		daddr_t new_size = wanted->infos[exp_ndx].size;
 		if (free_space > 0)
 			new_size += roundup(free_space,align);

Reply via email to