Module Name: src Committed By: martin Date: Tue Jun 21 15:41:29 UTC 2022
Modified Files: src/usr.sbin/sysinst: disklabel.c Log Message: disklabel_can_add_partition() did not consider additional partitions (while there still is space in the disklabel). Part of PR 56886. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/usr.sbin/sysinst/disklabel.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/disklabel.c diff -u src/usr.sbin/sysinst/disklabel.c:1.45 src/usr.sbin/sysinst/disklabel.c:1.46 --- src/usr.sbin/sysinst/disklabel.c:1.45 Sat Jun 18 13:56:41 2022 +++ src/usr.sbin/sysinst/disklabel.c Tue Jun 21 15:41:29 2022 @@ -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 @@ disklabel_can_add_partition(const struct 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;