Browse Source

Make the "drive number" option apply to iSCSI as well as AoE

tags/v0.9.3
Michael Brown 18 years ago
parent
commit
70d4b4f7cf
2 changed files with 8 additions and 3 deletions
  1. 5
    2
      src/tests/dhcptest.c
  2. 3
    1
      src/tests/iscsiboot.c

+ 5
- 2
src/tests/dhcptest.c View File

23
 		struct sockaddr_in sin;
23
 		struct sockaddr_in sin;
24
 		struct sockaddr_tcpip st;
24
 		struct sockaddr_tcpip st;
25
 	} target;
25
 	} target;
26
-
26
+	unsigned int drivenum;
27
+	
27
 	memset ( &target, 0, sizeof ( target ) );
28
 	memset ( &target, 0, sizeof ( target ) );
28
 	target.sin.sin_family = AF_INET;
29
 	target.sin.sin_family = AF_INET;
29
 	target.sin.sin_port = htons ( ISCSI_PORT );
30
 	target.sin.sin_port = htons ( ISCSI_PORT );
40
 	dhcp_snprintf ( password, sizeof ( password ),
41
 	dhcp_snprintf ( password, sizeof ( password ),
41
 			find_global_dhcp_option ( DHCP_EB_PASSWORD ) );
42
 			find_global_dhcp_option ( DHCP_EB_PASSWORD ) );
42
 
43
 
44
+	drivenum = find_global_dhcp_num_option ( DHCP_EB_BIOS_DRIVE );
45
+
43
 	return test_iscsiboot ( initiator_iqn, &target.st, target_iqn,
46
 	return test_iscsiboot ( initiator_iqn, &target.st, target_iqn,
44
-				username, password, netdev );
47
+				username, password, netdev, drivenum );
45
 }
48
 }
46
 
49
 
47
 static int test_dhcp_hello ( char *helloname ) {
50
 static int test_dhcp_hello ( char *helloname ) {

+ 3
- 1
src/tests/iscsiboot.c View File

15
 		     const char *target_iqn,
15
 		     const char *target_iqn,
16
 		     const char *username,
16
 		     const char *username,
17
 		     const char *password,
17
 		     const char *password,
18
-		     struct net_device *netdev ) {
18
+		     struct net_device *netdev,
19
+		     unsigned int drivenum ) {
19
 	struct int13_drive drive;
20
 	struct int13_drive drive;
20
 	int rc;
21
 	int rc;
21
 
22
 
36
 	ibft_fill_data ( netdev, initiator_iqn, target, target_iqn );
37
 	ibft_fill_data ( netdev, initiator_iqn, target, target_iqn );
37
 #endif
38
 #endif
38
 	memset ( &drive, 0, sizeof ( drive ) );
39
 	memset ( &drive, 0, sizeof ( drive ) );
40
+	drive.drive = drivenum;
39
 	drive.blockdev = &test_iscsidev.scsi.blockdev;
41
 	drive.blockdev = &test_iscsidev.scsi.blockdev;
40
 	register_int13_drive ( &drive );
42
 	register_int13_drive ( &drive );
41
 	printf ( "Registered %s as BIOS drive %#02x\n",
43
 	printf ( "Registered %s as BIOS drive %#02x\n",

Loading…
Cancel
Save