Module Name: src
Committed By: jdc
Date: Sat Nov 24 19:32:28 UTC 2012
Modified Files:
src/distrib/utils/sysinst [netbsd-6]: disks.c
Log Message:
Pull up revision 1.127 (requested by tsutsui in ticket #706).
Don't show a disk which is mounted as root partition
in the "Available disks" list during sysinst procedure
to prevent users from shooting their foot in case of
installation using install-image on a USB stick.
Per suggestion in PR/47195.
To generate a diff of this commit:
cvs rdiff -u -r1.123.2.2 -r1.123.2.3 src/distrib/utils/sysinst/disks.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/distrib/utils/sysinst/disks.c
diff -u src/distrib/utils/sysinst/disks.c:1.123.2.2 src/distrib/utils/sysinst/disks.c:1.123.2.3
--- src/distrib/utils/sysinst/disks.c:1.123.2.2 Thu Jul 5 17:29:15 2012
+++ src/distrib/utils/sysinst/disks.c Sat Nov 24 19:32:28 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: disks.c,v 1.123.2.2 2012/07/05 17:29:15 riz Exp $ */
+/* $NetBSD: disks.c,v 1.123.2.3 2012/11/24 19:32:28 jdc Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -377,6 +377,14 @@ get_disks(struct disk_desc *dd)
break;
continue;
}
+
+ /*
+ * Exclude a disk mounted as root partition,
+ * in case of install-image on a USB memstick.
+ */
+ if (is_active_rootpart(dd->dd_name, 0))
+ continue;
+
dd->dd_cyl = l.d_ncylinders;
dd->dd_head = l.d_ntracks;
dd->dd_sec = l.d_nsectors;