summaryrefslogtreecommitdiffstats
path: root/src/usr/aoeboot.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/aoeboot.c')
-rw-r--r--src/usr/aoeboot.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/usr/aoeboot.c b/src/usr/aoeboot.c
index 08d21c4e..e977b10f 100644
--- a/src/usr/aoeboot.c
+++ b/src/usr/aoeboot.c
@@ -16,11 +16,12 @@
* @ret netdev Boot network device
*/
static struct net_device * guess_boot_netdev ( void ) {
- struct net_device *boot_netdev;
+ struct net_device *netdev;
/* Just use the first network device */
- for_each_netdev ( boot_netdev ) {
- return boot_netdev;
+ for_each_netdev ( netdev ) {
+ if ( netdev->state & NETDEV_OPEN )
+ return netdev;
}
return NULL;