Module Name: src
Committed By: martin
Date: Mon Oct 12 16:27:24 UTC 2020
Modified Files:
src/usr.sbin/sysinst: bsddisklabel.c part_edit.c
Log Message:
Minor fix to previous: fix condition when we offer the partition type
switch - it makes sense even if the disk is partitioned but has no valid
partitions.
To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/usr.sbin/sysinst/bsddisklabel.c
cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/sysinst/part_edit.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.52 src/usr.sbin/sysinst/bsddisklabel.c:1.53
--- src/usr.sbin/sysinst/bsddisklabel.c:1.52 Mon Oct 12 16:14:32 2020
+++ src/usr.sbin/sysinst/bsddisklabel.c Mon Oct 12 16:27:23 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: bsddisklabel.c,v 1.52 2020/10/12 16:14:32 martin Exp $ */
+/* $NetBSD: bsddisklabel.c,v 1.53 2020/10/12 16:27:23 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -840,7 +840,7 @@ ask_layout(struct disk_partitions *parts
opt++;
num_opts++;
- if (have_existing && num_available_part_schemes > 1 &&
+ if (num_available_part_schemes > 1 &&
parts->parent == NULL) {
opt->opt_name = MSG_Use_Different_Part_Scheme;
opt->opt_flags = OPT_EXIT;
Index: src/usr.sbin/sysinst/part_edit.c
diff -u src/usr.sbin/sysinst/part_edit.c:1.23 src/usr.sbin/sysinst/part_edit.c:1.24
--- src/usr.sbin/sysinst/part_edit.c:1.23 Mon Oct 12 16:14:32 2020
+++ src/usr.sbin/sysinst/part_edit.c Mon Oct 12 16:27:23 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: part_edit.c,v 1.23 2020/10/12 16:14:32 martin Exp $ */
+/* $NetBSD: part_edit.c,v 1.24 2020/10/12 16:27:23 martin Exp $ */
/*
* Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -1054,7 +1054,6 @@ ask_fullpart(struct disk_partitions *par
size_t num_opts;
menu_ent options[4], *opt;
daddr_t start, size;
- bool have_existing = false;
args[0] = msg_string(pm->parts->pscheme->name);
args[1] = msg_string(pm->parts->pscheme->short_name);
@@ -1072,7 +1071,6 @@ ask_fullpart(struct disk_partitions *par
opt->opt_action = set_keep_existing;
opt++;
num_opts++;
- have_existing = true;
}
opt->opt_name = MSG_Use_only_part_of_the_disk;
opt->opt_flags = OPT_EXIT;
@@ -1086,7 +1084,7 @@ ask_fullpart(struct disk_partitions *par
opt++;
num_opts++;
- if (have_existing && num_available_part_schemes > 1) {
+ if (num_available_part_schemes > 1) {
opt->opt_name = MSG_Use_Different_Part_Scheme;
opt->opt_flags = OPT_EXIT;
opt->opt_action = set_switch_scheme;