Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sanboot] Extend the "keep-san" option to non-iSCSI SAN protocols
This disgustingly ugly hack just keeps getting worse.
- Loading branch information
Michael Brown
committed
Nov 4, 2009
1 parent
67015d1
commit be67084
Showing
5 changed files
with
37 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters