summaryrefslogtreecommitdiffstats
path: root/src/hci/commands/sanboot_cmd.c
diff options
context:
space:
mode:
authorMichael Brown2024-03-05 21:20:10 +0100
committerMichael Brown2024-03-06 13:19:22 +0100
commit636ccb4ca55c73841e634f9d5986087fb3565da4 (patch)
tree31a788498a6a03bfead3a7df5c8da9ef13eab8b9 /src/hci/commands/sanboot_cmd.c
parent[efi] Allow booting from local disks via the "sanboot" command (diff)
downloadipxe-636ccb4ca55c73841e634f9d5986087fb3565da4.tar.gz
ipxe-636ccb4ca55c73841e634f9d5986087fb3565da4.tar.xz
ipxe-636ccb4ca55c73841e634f9d5986087fb3565da4.zip
[block] Allow for additional SAN boot parameters alongside filename
The drive specification alone does not necessarily contain enough information to perform a SAN boot (or local disk boot) under UEFI. If the next-stage bootloader is installed in the EFI system partition under a non-standard name (e.g. "\EFI\debian\grubx64.efi") then this explicit boot filename must also be specified. Generalise this concept to use a "SAN boot configuration parameters" structure (currently containing only the optional explicit boot filename), to allow for easy expansion to provide other parameters such as the partition UUID or volume label. 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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/hci/commands/sanboot_cmd.c b/src/hci/commands/sanboot_cmd.c
index 3907276a..9c7e9ab7 100644
--- a/src/hci/commands/sanboot_cmd.c
+++ b/src/hci/commands/sanboot_cmd.c
@@ -100,6 +100,7 @@ static int sanboot_core_exec ( int argc, char **argv,
struct command_descriptor *cmd,
int default_flags, int no_root_path_flags ) {
struct sanboot_options opts;
+ struct san_boot_config config;
struct uri *uris[argc];
int count;
int flags;
@@ -124,6 +125,9 @@ static int sanboot_core_exec ( int argc, char **argv,
}
}
+ /* Construct configuration parameters */
+ config.filename = opts.filename;
+
/* Construct flags */
flags = default_flags;
if ( opts.no_describe )
@@ -134,7 +138,7 @@ static int sanboot_core_exec ( int argc, char **argv,
flags |= no_root_path_flags;
/* Boot from root path */
- if ( ( rc = uriboot ( NULL, uris, count, opts.drive, opts.filename,
+ if ( ( rc = uriboot ( NULL, uris, count, opts.drive, &config,
flags ) ) != 0 )
goto err_uriboot;