Module Name: src
Committed By: bouyer
Date: Sat Sep 5 13:04:26 UTC 2009
Modified Files:
src/sys/kern [netbsd-5]: subr_tftproot.c
Log Message:
Pull up following revision(s) (requested by manu in ticket #929):
sys/kern/subr_tftproot.c: revisions 1.9, 1.10
When netbooting, rootspec is now "md0a", and it has no chance to match
an interface name, so do not give it a try.
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.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.12.1 src/sys/kern/subr_tftproot.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/subr_tftproot.c
diff -u src/sys/kern/subr_tftproot.c:1.5 src/sys/kern/subr_tftproot.c:1.5.12.1
--- src/sys/kern/subr_tftproot.c:1.5 Thu Apr 24 11:38:36 2008
+++ src/sys/kern/subr_tftproot.c Sat Sep 5 13:04:26 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_tftproot.c,v 1.5 2008/04/24 11:38:36 ad Exp $ */
+/* $NetBSD: subr_tftproot.c,v 1.5.12.1 2009/09/05 13:04:26 bouyer 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.5 2008/04/24 11:38:36 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_tftproot.c,v 1.5.12.1 2009/09/05 13:04:26 bouyer Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -134,7 +134,10 @@
IFNET_FOREACH(ifp)
if (strcmp(rootspec, ifp->if_xname) == 0)
break;
- } else if ((bootdv != NULL && device_class(bootdv) == DV_IFNET)) {
+ }
+
+ if ((ifp == NULL) &&
+ (bootdv != NULL && device_class(bootdv) == DV_IFNET)) {
IFNET_FOREACH(ifp)
if (strcmp(device_xname(bootdv), ifp->if_xname) == 0)
break;