aboutsummaryrefslogtreecommitdiffstats
path: root/gpxe/src/arch/i386/interface/pcbios/iscsiboot.c
diff options
context:
space:
mode:
Diffstat (limited to 'gpxe/src/arch/i386/interface/pcbios/iscsiboot.c')
-rw-r--r--gpxe/src/arch/i386/interface/pcbios/iscsiboot.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/gpxe/src/arch/i386/interface/pcbios/iscsiboot.c b/gpxe/src/arch/i386/interface/pcbios/iscsiboot.c
index 02aec4ba..00efd8ff 100644
--- a/gpxe/src/arch/i386/interface/pcbios/iscsiboot.c
+++ b/gpxe/src/arch/i386/interface/pcbios/iscsiboot.c
@@ -4,26 +4,16 @@
#include <stdio.h>
#include <errno.h>
#include <gpxe/iscsi.h>
-#include <gpxe/settings.h>
-#include <gpxe/dhcp.h>
#include <gpxe/netdevice.h>
#include <gpxe/ibft.h>
-#include <gpxe/init.h>
#include <gpxe/sanboot.h>
#include <int13.h>
-#include <usr/autoboot.h>
-struct setting keep_san_setting __setting = {
- .name = "keep-san",
- .description = "Preserve SAN connection",
- .tag = DHCP_EB_KEEP_SAN,
- .type = &setting_type_int8,
-};
+FILE_LICENCE ( GPL2_OR_LATER );
static int iscsiboot ( const char *root_path ) {
struct scsi_device *scsi;
struct int13_drive *drive;
- int keep_san;
int rc;
scsi = zalloc ( sizeof ( *scsi ) );
@@ -37,8 +27,6 @@ static int iscsiboot ( const char *root_path ) {
goto err_alloc_drive;
}
- printf ( "iSCSI booting from %s\n", root_path );
-
if ( ( rc = iscsi_attach ( scsi, root_path ) ) != 0 ) {
printf ( "Could not attach iSCSI device: %s\n",
strerror ( rc ) );
@@ -65,12 +53,8 @@ static int iscsiboot ( const char *root_path ) {
printf ( "Boot failed\n" );
/* Leave drive registered, if instructed to do so */
- keep_san = fetch_intz_setting ( NULL, &keep_san_setting );
- if ( keep_san ) {
- printf ( "Preserving connection to SAN disk\n" );
- shutdown_exit_flags |= SHUTDOWN_KEEP_DEVICES;
+ if ( keep_san() )
return rc;
- }
printf ( "Unregistering BIOS drive %#02x\n", drive->drive );
unregister_int13_drive ( drive );