diff options
author | Michael Brown <mcb30@etherboot.org> | 2008-11-21 19:45:05 +0000 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2008-11-21 19:45:05 +0000 |
commit | 8e8a348fd4139e2b9c6a3fa51d3fb35c4523795f (patch) | |
tree | 9a1bc70f6a6be8dbabf33eff585e279df5984fbf /src/arch/i386/image/pxe_image.c | |
parent | 246ddf5ee4fe0d95f056ad00c670a4a851097418 (diff) | |
download | ipxe-8e8a348fd4139e2b9c6a3fa51d3fb35c4523795f.tar.gz |
[pxe] Select the correct network device on multiport cards
When trying to find the "first open network device", it helps to
actually check the NETDEV_OPEN flag.
Diffstat (limited to 'src/arch/i386/image/pxe_image.c')
-rw-r--r-- | src/arch/i386/image/pxe_image.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/arch/i386/image/pxe_image.c b/src/arch/i386/image/pxe_image.c index 77fa0469..346d2048 100644 --- 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 */ |