Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/sysinst Fix test for active root partition when boo...
details: https://anonhg.NetBSD.org/src/rev/beb38a9a27ef
branches: trunk
changeset: 445698:beb38a9a27ef
user: martin <martin%NetBSD.org@localhost>
date: Fri Nov 09 15:20:36 2018 +0000
description:
Fix test for active root partition when booting from a wedge
diffstat:
usr.sbin/sysinst/disks.c | 5 +++--
usr.sbin/sysinst/target.c | 8 ++++++--
2 files changed, 9 insertions(+), 4 deletions(-)
diffs (50 lines):
diff -r 126a339abb1e -r beb38a9a27ef usr.sbin/sysinst/disks.c
--- a/usr.sbin/sysinst/disks.c Fri Nov 09 14:39:51 2018 +0000
+++ b/usr.sbin/sysinst/disks.c Fri Nov 09 15:20:36 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disks.c,v 1.22 2018/11/08 20:29:37 martin Exp $ */
+/* $NetBSD: disks.c,v 1.23 2018/11/09 15:20:36 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -619,7 +619,8 @@
* Exclude a disk mounted as root partition,
* in case of install-image on a USB memstick.
*/
- if (is_active_rootpart(state->dd->dd_name, 0))
+ if (is_active_rootpart(state->dd->dd_name,
+ state->dd->dd_no_part ? -1 : 0))
return true;
if (!state->dd->dd_no_part) {
diff -r 126a339abb1e -r beb38a9a27ef usr.sbin/sysinst/target.c
--- a/usr.sbin/sysinst/target.c Fri Nov 09 14:39:51 2018 +0000
+++ b/usr.sbin/sysinst/target.c Fri Nov 09 15:20:36 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: target.c,v 1.3 2015/10/18 09:21:55 martin Exp $ */
+/* $NetBSD: target.c,v 1.4 2018/11/09 15:20:36 martin Exp $ */
/*
* Copyright 1997 Jonathan Stone
@@ -71,7 +71,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: target.c,v 1.3 2015/10/18 09:21:55 martin Exp $");
+__RCSID("$NetBSD: target.c,v 1.4 2018/11/09 15:20:36 martin Exp $");
#endif
/*
@@ -186,8 +186,12 @@
if (strcmp(dev, rootdev) != 0)
return 0;
+ if (ptn < 0)
+ return 1; /* device only check, or wedge */
+
mib[1] = KERN_ROOT_PARTITION;
varlen = sizeof rootptn;
+ rootptn = -1;
if (sysctl(mib, 2, &rootptn, &varlen, NULL, 0) < 0)
return 1;
Home |
Main Index |
Thread Index |
Old Index