diff --git a/src/tests/dhcptest.c b/src/tests/dhcptest.c index 15e39c8b..0a7ef074 100644 --- a/src/tests/dhcptest.c +++ b/src/tests/dhcptest.c @@ -14,7 +14,7 @@ static int test_dhcp_aoe_boot ( struct net_device *netdev, return test_aoeboot ( netdev, aoename, drivenum ); } -static int test_dhcp_iscsi_boot ( char *iscsiname ) { +static int test_dhcp_iscsi_boot ( struct net_device *netdev, char *iscsiname ) { char *initiator_iqn = "iqn.1900-01.localdomain.localhost:initiator"; char *target_iqn; union { @@ -33,7 +33,7 @@ static int test_dhcp_iscsi_boot ( char *iscsiname ) { } inet_aton ( iscsiname, &target.sin.sin_addr ); - return test_iscsiboot ( initiator_iqn, &target.st, target_iqn ); + return test_iscsiboot ( initiator_iqn, &target.st, target_iqn, netdev ); } static int test_dhcp_hello ( char *helloname ) { @@ -97,7 +97,7 @@ static int test_dhcp_boot ( struct net_device *netdev, char *filename ) { if ( strncmp ( filename, "aoe:", 4 ) == 0 ) { return test_dhcp_aoe_boot ( netdev, &filename[4] ); } else if ( strncmp ( filename, "iscsi:", 6 ) == 0 ) { - return test_dhcp_iscsi_boot ( &filename[6] ); + return test_dhcp_iscsi_boot ( netdev, &filename[6] ); } else if ( strncmp ( filename, "hello:", 6 ) == 0 ) { return test_dhcp_hello ( &filename[6] ); } else if ( strncmp ( filename, "http:", 5 ) == 0 ) { diff --git a/src/tests/iscsiboot.c b/src/tests/iscsiboot.c index a02deb00..30086262 100644 --- a/src/tests/iscsiboot.c +++ b/src/tests/iscsiboot.c @@ -3,14 +3,15 @@ #include #include #include +#include #include static struct iscsi_device test_iscsidev; int test_iscsiboot ( const char *initiator_iqn, struct sockaddr_tcpip *target, - const char *target_iqn ) { - struct sockaddr_in *sin; + const char *target_iqn, + struct net_device *netdev ) { struct int13_drive drive; int rc; @@ -26,6 +27,8 @@ int test_iscsiboot ( const char *initiator_iqn, return rc; } + ibft_fill_data ( netdev, initiator_iqn, target, target_iqn ); + memset ( &drive, 0, sizeof ( drive ) ); drive.blockdev = &test_iscsidev.scsi.blockdev; register_int13_drive ( &drive );