diff options
author | Michael Brown <mcb30@ipxe.org> | 2024-03-07 14:09:54 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2024-03-07 14:11:46 +0000 |
commit | 24a855f1fc8d97ad3ca6be3eaabdc1c8285e86e8 (patch) | |
tree | ec790a5fc8dd748fc35138819e5d6b7cf5288e9d /src/hci/commands/sanboot_cmd.c | |
parent | 62b6d363351fb5d8890cdcd36c949d6d8563b4e9 (diff) | |
download | ipxe-24a855f1fc8d97ad3ca6be3eaabdc1c8285e86e8.tar.gz |
[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/commands/sanboot_cmd.c')
-rw-r--r-- | src/hci/commands/sanboot_cmd.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/hci/commands/sanboot_cmd.c b/src/hci/commands/sanboot_cmd.c index add0756da..6ab9e8844 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 */ |