aboutsummaryrefslogtreecommitdiff
path: root/src/hci
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2024-03-07 14:09:54 +0000
committerMichael Brown <mcb30@ipxe.org>2024-03-07 14:11:46 +0000
commit24a855f1fc8d97ad3ca6be3eaabdc1c8285e86e8 (patch)
treeec790a5fc8dd748fc35138819e5d6b7cf5288e9d /src/hci
parent62b6d363351fb5d8890cdcd36c949d6d8563b4e9 (diff)
downloadipxe-24a855f1fc8d97ad3ca6be3eaabdc1c8285e86e8.zip
ipxe-24a855f1fc8d97ad3ca6be3eaabdc1c8285e86e8.tar.gz
ipxe-24a855f1fc8d97ad3ca6be3eaabdc1c8285e86e8.tar.bz2
[block] Allow SAN boot device to be identified by filesystem label
Add a "--label" option that can be used to specify a filesystem label, to be matched against the FAT volume label. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/hci')
-rw-r--r--src/hci/commands/sanboot_cmd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/hci/commands/sanboot_cmd.c b/src/hci/commands/sanboot_cmd.c
index add0756..6ab9e88 100644
--- a/src/hci/commands/sanboot_cmd.c
+++ b/src/hci/commands/sanboot_cmd.c
@@ -51,6 +51,8 @@ struct sanboot_options {
char *filename;
/** Required extra filename */
char *extra;
+ /** Volume label */
+ char *label;
/** UUID */
struct uuid_option uuid;
};
@@ -58,7 +60,7 @@ struct sanboot_options {
/** "sanboot" option list */
static union {
/* "sanboot" takes all options */
- struct option_descriptor sanboot[6];
+ struct option_descriptor sanboot[7];
/* "sanhook" takes only --drive and --no-describe */
struct option_descriptor sanhook[2];
/* "sanunhook" takes only --drive */
@@ -75,6 +77,8 @@ static union {
struct sanboot_options, filename, parse_string ),
OPTION_DESC ( "extra", 'e', required_argument,
struct sanboot_options, extra, parse_string ),
+ OPTION_DESC ( "label", 'l', required_argument,
+ struct sanboot_options, label, parse_string ),
OPTION_DESC ( "uuid", 'u', required_argument,
struct sanboot_options, uuid, parse_uuid ),
},
@@ -135,6 +139,7 @@ static int sanboot_core_exec ( int argc, char **argv,
/* Construct configuration parameters */
config.filename = opts.filename;
config.extra = opts.extra;
+ config.label = opts.label;
config.uuid = opts.uuid.value;
/* Construct flags */