http://git.etherboot.org
/
people
/
asdlkf
/
gpxe.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
246ddf5
)
[pxe] Select the correct network device on multiport cards
author
Michael Brown
<mcb30@etherboot.org>
Fri, 21 Nov 2008 19:45:05 +0000
(19:45 +0000)
committer
Michael Brown
<mcb30@etherboot.org>
Fri, 21 Nov 2008 19:45:05 +0000
(19:45 +0000)
When trying to find the "first open network device", it helps to
actually check the NETDEV_OPEN flag.
src/arch/i386/image/pxe_image.c
patch
|
blob
|
history
diff --git
a/src/arch/i386/image/pxe_image.c
b/src/arch/i386/image/pxe_image.c
index
77fa046
..
346d204
100644
(file)
--- a/
src/arch/i386/image/pxe_image.c
+++ b/
src/arch/i386/image/pxe_image.c
@@
-51,8
+51,10
@@
static int pxe_exec ( struct image *image ) {
/* Arbitrarily pick the first open network device to use for PXE */
for_each_netdev ( netdev ) {
- pxe_set_netdev ( netdev );
- break;
+ if ( netdev->state & NETDEV_OPEN ) {
+ pxe_set_netdev ( netdev );
+ break;
+ }
}
/* Many things will break if pxe_netdev is NULL */