Source-Changes-HG archive

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

[src/trunk]: src/distrib/utils/sysinst Stop (attempted) coredump when ftp/nfs...



details:   https://anonhg.NetBSD.org/src/rev/92f39284678c
branches:  trunk
changeset: 550008:92f39284678c
user:      dsl <dsl%NetBSD.org@localhost>
date:      Sun Jul 27 21:09:57 2003 +0000

description:
Stop (attempted) coredump when ftp/nfs install attempted.
(incorrect empty strings check for active interfaces)

diffstat:

 distrib/utils/sysinst/net.c |  21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diffs (42 lines):

diff -r 40ae895854b7 -r 92f39284678c distrib/utils/sysinst/net.c
--- a/distrib/utils/sysinst/net.c       Sun Jul 27 20:42:41 2003 +0000
+++ b/distrib/utils/sysinst/net.c       Sun Jul 27 21:09:57 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: net.c,v 1.91 2003/07/25 08:26:22 dsl Exp $     */
+/*     $NetBSD: net.c,v 1.92 2003/07/27 21:09:57 dsl Exp $     */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -459,7 +459,16 @@
                return (1);
 
        get_ifconfig_info();
-       if (net_devices[0] == 0) {
+
+       if (net_up != NULL) {
+               /* active interfaces found */
+               msg_display(MSG_netup, net_up);
+               process_menu(MENU_yesno, NULL);
+               if (yesno)
+                       return 1;
+       }
+
+       if (net_devices == NULL) {
                /* No network interfaces found! */
                msg_display(MSG_nonet);
                process_menu(MENU_ok, NULL);
@@ -467,14 +476,6 @@
        }
        network_up = 1;
 
-       if (net_up[0] != 0) {
-               /* active interfaces found */
-               msg_display(MSG_netup, net_up);
-               process_menu(MENU_yesno, NULL);
-               if (yesno)
-                       return 1;
-       }
-
 again:
        tp = strchr(net_devices, ' ');
        asprintf(&defname, "%.*s", (int)(tp - net_devices), net_devices);



Home | Main Index | Thread Index | Old Index