Module Name: src Committed By: martin Date: Mon Jun 24 18:48:08 UTC 2019
Modified Files: src/usr.sbin/sysinst: upgrade.c Log Message: If low on ram, mount the proper swap partition before doing the main upgrade work. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/sysinst/upgrade.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/upgrade.c diff -u src/usr.sbin/sysinst/upgrade.c:1.8 src/usr.sbin/sysinst/upgrade.c:1.9 --- src/usr.sbin/sysinst/upgrade.c:1.8 Thu Jun 20 00:43:55 2019 +++ src/usr.sbin/sysinst/upgrade.c Mon Jun 24 18:48:08 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: upgrade.c,v 1.8 2019/06/20 00:43:55 christos Exp $ */ +/* $NetBSD: upgrade.c,v 1.9 2019/06/24 18:48:08 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -67,11 +67,6 @@ do_upgrade(void) if (find_disks(msg_string(MSG_upgrade)) < 0) return; - /* XXX - build install_partition_desc from existing partitions - * and pass that here and below instead of NULL */ - if (set_swap_if_low_ram(NULL) < 0) - return; - if (pm->parts->pscheme->pre_update_verify) { if (pm->parts->pscheme->pre_update_verify(pm->parts)) pm->parts->pscheme->write_to_disk(pm->parts); @@ -79,6 +74,9 @@ do_upgrade(void) install_desc_from_parts(&install, pm->parts); + if (set_swap_if_low_ram(&install) < 0) + return; + if (md_pre_update(&install) < 0) goto free_install;