Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/sysinst disklabel_can_add_partition() did not consi...



details:   https://anonhg.NetBSD.org/src/rev/e889b68d0a4f
branches:  trunk
changeset: 367675:e889b68d0a4f
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Jun 21 15:41:29 2022 +0000

description:
disklabel_can_add_partition() did not consider additional partitions
(while there still is space in the disklabel). Part of PR 56886.

diffstat:

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

diffs (19 lines):

diff -r ad997eacecfb -r e889b68d0a4f usr.sbin/sysinst/disklabel.c
--- a/usr.sbin/sysinst/disklabel.c      Tue Jun 21 15:40:20 2022 +0000
+++ b/usr.sbin/sysinst/disklabel.c      Tue Jun 21 15:41:29 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disklabel.c,v 1.45 2022/06/18 13:56:41 martin Exp $    */
+/*     $NetBSD: disklabel.c,v 1.46 2022/06/21 15:41:29 martin Exp $    */
 
 /*
  * Copyright 2018 The NetBSD Foundation, Inc.
@@ -940,7 +940,8 @@
        if (disklabel_get_free_spaces_internal(parts, &space, 1,
            parts->ptn_alignment, parts->ptn_alignment, 0, -1) < 1)
                return false;
-
+       if (parts->l.d_npartitions < dl_maxpart)
+               return true;
        for (i = 0; i < parts->l.d_npartitions; i++) {
                if (i == RAW_PART)
                        continue;



Home | Main Index | Thread Index | Old Index