You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

keepsan.c 577B

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