Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Back out previous change: do not skip the test on r...



details:   https://anonhg.NetBSD.org/src/rev/62b77fbc33b9
branches:  trunk
changeset: 746906:62b77fbc33b9
user:      manu <manu%NetBSD.org@localhost>
date:      Sun Aug 23 12:10:50 2009 +0000

description:
Back out previous change: do not skip the test on rootspec, but make it
a simple attempt instead of an authoritative answer. The failure of the
rootspec test could me machine-dependant. Thanks to martin@ for pointing
that out.

diffstat:

 sys/kern/subr_tftproot.c |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r b6543173f3e2 -r 62b77fbc33b9 sys/kern/subr_tftproot.c
--- a/sys/kern/subr_tftproot.c  Sun Aug 23 12:08:56 2009 +0000
+++ b/sys/kern/subr_tftproot.c  Sun Aug 23 12:10:50 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_tftproot.c,v 1.9 2009/08/21 09:20:47 manu Exp $ */
+/*     $NetBSD: subr_tftproot.c,v 1.10 2009/08/23 12:10:50 manu Exp $ */
 
 /*-
  * Copyright (c) 2007 Emmanuel Dreyfus, all rights reserved.
@@ -39,7 +39,7 @@
 #include "opt_md.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_tftproot.c,v 1.9 2009/08/21 09:20:47 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_tftproot.c,v 1.10 2009/08/23 12:10:50 manu Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -129,7 +129,14 @@
        struct device *dv;
        int error = -1;
 
-       if ((bootdv != NULL && device_class(bootdv) == DV_IFNET)) {
+       if (rootspec != NULL) {
+               IFNET_FOREACH(ifp)
+                       if (strcmp(rootspec, ifp->if_xname) == 0)
+                               break;
+       } 
+
+       if ((ifp == NULL) &&
+           (bootdv != NULL && device_class(bootdv) == DV_IFNET)) {
                IFNET_FOREACH(ifp)
                        if (strcmp(device_xname(bootdv), ifp->if_xname) == 0)
                                break;



Home | Main Index | Thread Index | Old Index