mirror of
https://github.com/ipxe/ipxe
synced 2026-01-01 00:07:27 +03:00
[sanboot] Extend the "keep-san" option to non-iSCSI SAN protocols
This disgustingly ugly hack just keeps getting worse.
This commit is contained in:
26
src/arch/i386/interface/pcbios/keepsan.c
Normal file
26
src/arch/i386/interface/pcbios/keepsan.c
Normal file
@@ -0,0 +1,26 @@
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <gpxe/settings.h>
|
||||
#include <gpxe/dhcp.h>
|
||||
#include <gpxe/init.h>
|
||||
#include <gpxe/sanboot.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,
|
||||
};
|
||||
|
||||
int keep_san ( void ) {
|
||||
int keep_san;
|
||||
|
||||
keep_san = fetch_intz_setting ( NULL, &keep_san_setting );
|
||||
if ( ! keep_san )
|
||||
return 0;
|
||||
|
||||
printf ( "Preserving connection to SAN disk\n" );
|
||||
shutdown_exit_flags |= SHUTDOWN_KEEP_DEVICES;
|
||||
return 1;
|
||||
}
|
||||
Reference in New Issue
Block a user