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 bin/54944: make the "explicit single wed...
details: https://anonhg.NetBSD.org/src/rev/9fc51c8befd6
branches: trunk
changeset: 744567:9fc51c8befd6
user: martin <martin%NetBSD.org@localhost>
date: Thu Feb 06 19:08:38 2020 +0000
description:
PR bin/54944: make the "explicit single wedge" selection also work for
upgrades.
diffstat:
usr.sbin/sysinst/disks.c | 14 ++++++++++----
usr.sbin/sysinst/upgrade.c | 8 ++++----
2 files changed, 14 insertions(+), 8 deletions(-)
diffs (69 lines):
diff -r b6af55895a4e -r 9fc51c8befd6 usr.sbin/sysinst/disks.c
--- a/usr.sbin/sysinst/disks.c Thu Feb 06 18:07:22 2020 +0000
+++ b/usr.sbin/sysinst/disks.c Thu Feb 06 19:08:38 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disks.c,v 1.64 2020/02/06 16:28:10 martin Exp $ */
+/* $NetBSD: disks.c,v 1.65 2020/02/06 19:08:38 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -1446,7 +1446,8 @@
* List has not been filled, only "pm" is valid - check
* that first.
*/
- if (pm->parts->pscheme->find_by_name != NULL) {
+ if (pm->parts != NULL &&
+ pm->parts->pscheme->find_by_name != NULL) {
id = pm->parts->pscheme->find_by_name(pm->parts, name);
if (id != NO_PART) {
*pno = id;
@@ -1840,10 +1841,15 @@
assert((size_t)(l - fstabbuf) == num_entries);
/* First the root device. */
- if (target_already_root())
+ if (target_already_root()) {
/* avoid needing to call target_already_root() again */
targetroot_mnt[0] = 0;
- else {
+ } else if (pm->no_part) {
+ snprintf(devdev, sizeof devdev, _PATH_DEV "%s", pm->diskdev);
+ error = mount_root(devdev, true, false, install);
+ if (error != 0 && error != EBUSY)
+ return -1;
+ } else {
for (i = 0; i < install->num; i++) {
if (is_root_part_mount(install->infos[i].mount))
break;
diff -r b6af55895a4e -r 9fc51c8befd6 usr.sbin/sysinst/upgrade.c
--- a/usr.sbin/sysinst/upgrade.c Thu Feb 06 18:07:22 2020 +0000
+++ b/usr.sbin/sysinst/upgrade.c Thu Feb 06 19:08:38 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: upgrade.c,v 1.14 2020/01/16 13:56:24 martin Exp $ */
+/* $NetBSD: upgrade.c,v 1.15 2020/02/06 19:08:38 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -65,19 +65,19 @@
if (find_disks(msg_string(MSG_upgrade), !root_is_read_only()) < 0)
return;
- if (pm->parts == NULL && !pm->cur_system) {
+ if (pm->parts == NULL && !pm->cur_system && !pm->no_part) {
hit_enter_to_continue(MSG_noroot, NULL);
return;
}
- if (!pm->cur_system) {
+ if (!pm->cur_system && pm->parts != NULL) {
if (pm->parts->pscheme->pre_update_verify) {
if (pm->parts->pscheme->pre_update_verify(pm->parts))
pm->parts->pscheme->write_to_disk(pm->parts);
}
install_desc_from_parts(&install, pm->parts);
- } else {
+ } else if (pm->cur_system) {
install.cur_system = true;
}
Home |
Main Index |
Thread Index |
Old Index