Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6-0]: src/distrib/utils/sysinst Pull up revision 1.127 (requested...



details:   https://anonhg.NetBSD.org/src/rev/23d38ec26291
branches:  netbsd-6-0
changeset: 774703:23d38ec26291
user:      jdc <jdc%NetBSD.org@localhost>
date:      Sun Nov 25 10:12:14 2012 +0000

description:
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.

diffstat:

 distrib/utils/sysinst/disks.c |  10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diffs (24 lines):

diff -r 0a6e9fe97757 -r 23d38ec26291 distrib/utils/sysinst/disks.c
--- a/distrib/utils/sysinst/disks.c     Sun Nov 25 10:10:02 2012 +0000
+++ b/distrib/utils/sysinst/disks.c     Sun Nov 25 10:12:14 2012 +0000
@@ -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.2.4.1 2012/11/25 10:12:14 jdc Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -377,6 +377,14 @@
                                        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;



Home | Main Index | Thread Index | Old Index