|
@@ -4,28 +4,16 @@
|
4
|
4
|
#include <stdio.h>
|
5
|
5
|
#include <errno.h>
|
6
|
6
|
#include <gpxe/iscsi.h>
|
7
|
|
-#include <gpxe/settings.h>
|
8
|
|
-#include <gpxe/dhcp.h>
|
9
|
7
|
#include <gpxe/netdevice.h>
|
10
|
8
|
#include <gpxe/ibft.h>
|
11
|
|
-#include <gpxe/init.h>
|
12
|
9
|
#include <gpxe/sanboot.h>
|
13
|
10
|
#include <int13.h>
|
14
|
|
-#include <usr/autoboot.h>
|
15
|
11
|
|
16
|
12
|
FILE_LICENCE ( GPL2_OR_LATER );
|
17
|
13
|
|
18
|
|
-struct setting keep_san_setting __setting = {
|
19
|
|
- .name = "keep-san",
|
20
|
|
- .description = "Preserve SAN connection",
|
21
|
|
- .tag = DHCP_EB_KEEP_SAN,
|
22
|
|
- .type = &setting_type_int8,
|
23
|
|
-};
|
24
|
|
-
|
25
|
14
|
static int iscsiboot ( const char *root_path ) {
|
26
|
15
|
struct scsi_device *scsi;
|
27
|
16
|
struct int13_drive *drive;
|
28
|
|
- int keep_san;
|
29
|
17
|
int rc;
|
30
|
18
|
|
31
|
19
|
scsi = zalloc ( sizeof ( *scsi ) );
|
|
@@ -67,12 +55,8 @@ static int iscsiboot ( const char *root_path ) {
|
67
|
55
|
printf ( "Boot failed\n" );
|
68
|
56
|
|
69
|
57
|
/* Leave drive registered, if instructed to do so */
|
70
|
|
- keep_san = fetch_intz_setting ( NULL, &keep_san_setting );
|
71
|
|
- if ( keep_san ) {
|
72
|
|
- printf ( "Preserving connection to SAN disk\n" );
|
73
|
|
- shutdown_exit_flags |= SHUTDOWN_KEEP_DEVICES;
|
|
58
|
+ if ( keep_san() )
|
74
|
59
|
return rc;
|
75
|
|
- }
|
76
|
60
|
|
77
|
61
|
printf ( "Unregistering BIOS drive %#02x\n", drive->drive );
|
78
|
62
|
unregister_int13_drive ( drive );
|