Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/sysinst PR 57132: when calculation additional space...



details:   https://anonhg.NetBSD.org/src/rev/6dbbac5c6fc9
branches:  trunk
changeset: 372801:6dbbac5c6fc9
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Dec 27 13:12:10 2022 +0000

description:
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).

diffstat:

 usr.sbin/sysinst/bsddisklabel.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r 17623fce8e93 -r 6dbbac5c6fc9 usr.sbin/sysinst/bsddisklabel.c
--- a/usr.sbin/sysinst/bsddisklabel.c   Tue Dec 27 09:36:29 2022 +0000
+++ b/usr.sbin/sysinst/bsddisklabel.c   Tue Dec 27 13:12:10 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bsddisklabel.c,v 1.70 2022/12/16 19:49:13 martin Exp $ */
+/*     $NetBSD: bsddisklabel.c,v 1.71 2022/12/27 13:12:10 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -1434,7 +1434,8 @@
         * 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);



Home | Main Index | Thread Index | Old Index