1 #include <stdint.h> 2 #include <stdio.h> 3 #include <gpxe/settings.h> 4 #include <gpxe/dhcp.h> 5 #include <gpxe/init.h> 6 #include <gpxe/sanboot.h> 7 #include <usr/autoboot.h> 8 9 struct setting keep_san_setting __setting = { 10 .name = "keep-san", 11 .description = "Preserve SAN connection", 12 .tag = DHCP_EB_KEEP_SAN, 13 .type = &setting_type_int8, 14 }; 15 keep_san(void)16int keep_san ( void ) { 17 int keep_san; 18 19 keep_san = fetch_intz_setting ( NULL, &keep_san_setting ); 20 if ( ! keep_san ) 21 return 0; 22 23 printf ( "Preserving connection to SAN disk\n" ); 24 shutdown_exit_flags |= SHUTDOWN_KEEP_DEVICES; 25 return 1; 26 } 27