aboutsummaryrefslogtreecommitdiffstats
path: root/src/arch/i386/interface
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/i386/interface')
-rw-r--r--src/arch/i386/interface/pcbios/aoeboot.c19
-rw-r--r--src/arch/i386/interface/pcbios/iscsiboot.c19
2 files changed, 2 insertions, 36 deletions
diff --git a/src/arch/i386/interface/pcbios/aoeboot.c b/src/arch/i386/interface/pcbios/aoeboot.c
index e977b10f..6e1e51cb 100644
--- a/src/arch/i386/interface/pcbios/aoeboot.c
+++ b/src/arch/i386/interface/pcbios/aoeboot.c
@@ -10,23 +10,6 @@
#include <gpxe/abft.h>
#include <int13.h>
-/**
- * Guess boot network device
- *
- * @ret netdev Boot network device
- */
-static struct net_device * guess_boot_netdev ( void ) {
- struct net_device *netdev;
-
- /* Just use the first network device */
- for_each_netdev ( netdev ) {
- if ( netdev->state & NETDEV_OPEN )
- return netdev;
- }
-
- return NULL;
-}
-
static int aoeboot ( const char *root_path ) {
struct ata_device ata;
struct int13_drive drive;
@@ -38,7 +21,7 @@ static int aoeboot ( const char *root_path ) {
printf ( "AoE booting from %s\n", root_path );
/* FIXME: ugly, ugly hack */
- struct net_device *netdev = guess_boot_netdev();
+ struct net_device *netdev = last_opened_netdev();
if ( ( rc = aoe_attach ( &ata, netdev, root_path ) ) != 0 ) {
printf ( "Could not attach AoE device: %s\n",
diff --git a/src/arch/i386/interface/pcbios/iscsiboot.c b/src/arch/i386/interface/pcbios/iscsiboot.c
index cdf7790b..02aec4ba 100644
--- a/src/arch/i386/interface/pcbios/iscsiboot.c
+++ b/src/arch/i386/interface/pcbios/iscsiboot.c
@@ -20,23 +20,6 @@ struct setting keep_san_setting __setting = {
.type = &setting_type_int8,
};
-/**
- * Guess boot network device
- *
- * @ret netdev Boot network device
- */
-static struct net_device * guess_boot_netdev ( void ) {
- struct net_device *netdev;
-
- /* Just use the first network device */
- for_each_netdev ( netdev ) {
- if ( netdev->state & NETDEV_OPEN )
- return netdev;
- }
-
- return NULL;
-}
-
static int iscsiboot ( const char *root_path ) {
struct scsi_device *scsi;
struct int13_drive *drive;
@@ -70,7 +53,7 @@ static int iscsiboot ( const char *root_path ) {
drive->blockdev = &scsi->blockdev;
/* FIXME: ugly, ugly hack */
- struct net_device *netdev = guess_boot_netdev();
+ struct net_device *netdev = last_opened_netdev();
struct iscsi_session *iscsi =
container_of ( scsi->backend, struct iscsi_session, refcnt );
ibft_fill_data ( netdev, iscsi );