diff options
author | Michael Brown <mcb30@ipxe.org> | 2024-03-07 13:31:29 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2024-03-07 13:31:29 +0000 |
commit | 62b6d363351fb5d8890cdcd36c949d6d8563b4e9 (patch) | |
tree | 52289625111e210c73a132470f3d31fe25eae125 /src/hci/commands/sanboot_cmd.c | |
parent | cea22d76e4cfdbd2d5a3a29bd541346710760457 (diff) | |
download | ipxe-62b6d363351fb5d8890cdcd36c949d6d8563b4e9.tar.gz |
[block] Allow SAN boot device to be identified by an extra filename
Add an "--extra" option that can be used to specify an extra
(non-boot) filename that must exist within the booted filesystem.
Note that only files within the FAT-formatted bootable partition will
be visible to this filter. Files within the operating system's root
disk (e.g. "/etc/redhat-release") are not generally accessible to the
firmware and so cannot be used as the existence check filter filename.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/hci/commands/sanboot_cmd.c')
-rw-r--r-- | src/hci/commands/sanboot_cmd.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/hci/commands/sanboot_cmd.c b/src/hci/commands/sanboot_cmd.c index b3d9ccad3..add0756da 100644 --- a/src/hci/commands/sanboot_cmd.c +++ b/src/hci/commands/sanboot_cmd.c @@ -47,8 +47,10 @@ struct sanboot_options { int no_describe; /** Keep SAN device */ int keep; - /** Filename */ + /** Boot filename */ char *filename; + /** Required extra filename */ + char *extra; /** UUID */ struct uuid_option uuid; }; @@ -56,7 +58,7 @@ struct sanboot_options { /** "sanboot" option list */ static union { /* "sanboot" takes all options */ - struct option_descriptor sanboot[5]; + struct option_descriptor sanboot[6]; /* "sanhook" takes only --drive and --no-describe */ struct option_descriptor sanhook[2]; /* "sanunhook" takes only --drive */ @@ -71,6 +73,8 @@ static union { struct sanboot_options, keep, parse_flag ), OPTION_DESC ( "filename", 'f', required_argument, struct sanboot_options, filename, parse_string ), + OPTION_DESC ( "extra", 'e', required_argument, + struct sanboot_options, extra, parse_string ), OPTION_DESC ( "uuid", 'u', required_argument, struct sanboot_options, uuid, parse_uuid ), }, @@ -130,6 +134,7 @@ static int sanboot_core_exec ( int argc, char **argv, /* Construct configuration parameters */ config.filename = opts.filename; + config.extra = opts.extra; config.uuid = opts.uuid.value; /* Construct flags */ |