aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown <mcb30@etherboot.org>2006-11-29 00:27:10 +0000
committerMichael Brown <mcb30@etherboot.org>2006-11-29 00:27:10 +0000
commit70d4b4f7cf457ca89659fba75ebad17dcbd5878f (patch)
tree21bc8f4cfa20fc3184a4bcd8f14c28f25d20e7e6
parent3234ef1b0b67e647ef23bba906b2ef8003119c4b (diff)
downloadipxe-70d4b4f7cf457ca89659fba75ebad17dcbd5878f.tar.gz
Make the "drive number" option apply to iSCSI as well as AoE
-rw-r--r--src/tests/dhcptest.c7
-rw-r--r--src/tests/iscsiboot.c4
2 files changed, 8 insertions, 3 deletions
diff --git a/src/tests/dhcptest.c b/src/tests/dhcptest.c
index a6e3ff802..d1e7a6cbb 100644
--- a/src/tests/dhcptest.c
+++ b/src/tests/dhcptest.c
@@ -23,7 +23,8 @@ static int test_dhcp_iscsi_boot ( struct net_device *netdev, char *iscsiname ) {
struct sockaddr_in sin;
struct sockaddr_tcpip st;
} target;
-
+ unsigned int drivenum;
+
memset ( &target, 0, sizeof ( target ) );
target.sin.sin_family = AF_INET;
target.sin.sin_port = htons ( ISCSI_PORT );
@@ -40,8 +41,10 @@ static int test_dhcp_iscsi_boot ( struct net_device *netdev, char *iscsiname ) {
dhcp_snprintf ( password, sizeof ( password ),
find_global_dhcp_option ( DHCP_EB_PASSWORD ) );
+ drivenum = find_global_dhcp_num_option ( DHCP_EB_BIOS_DRIVE );
+
return test_iscsiboot ( initiator_iqn, &target.st, target_iqn,
- username, password, netdev );
+ username, password, netdev, drivenum );
}
static int test_dhcp_hello ( char *helloname ) {
diff --git a/src/tests/iscsiboot.c b/src/tests/iscsiboot.c
index 59837564a..2152016fb 100644
--- a/src/tests/iscsiboot.c
+++ b/src/tests/iscsiboot.c
@@ -15,7 +15,8 @@ int test_iscsiboot ( const char *initiator_iqn,
const char *target_iqn,
const char *username,
const char *password,
- struct net_device *netdev ) {
+ struct net_device *netdev,
+ unsigned int drivenum ) {
struct int13_drive drive;
int rc;
@@ -36,6 +37,7 @@ int test_iscsiboot ( const char *initiator_iqn,
ibft_fill_data ( netdev, initiator_iqn, target, target_iqn );
#endif
memset ( &drive, 0, sizeof ( drive ) );
+ drive.drive = drivenum;
drive.blockdev = &test_iscsidev.scsi.blockdev;
register_int13_drive ( &drive );
printf ( "Registered %s as BIOS drive %#02x\n",