mirror of
https://github.com/ipxe/ipxe
synced 2025-12-21 04:20:17 +03:00
[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>
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user