[block] Allow SAN boot device to be identified by UUID

Add a "--uuid" option which may be used to specify a boot device UUID,
to be matched against the GPT partition GUID.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2024-03-06 08:55:55 +00:00
parent c4471e3408
commit cea22d76e4
5 changed files with 41 additions and 7 deletions
+9 -1
View File
@@ -126,10 +126,18 @@ struct named_setting {
struct setting setting;
};
/** A UUID command-line option */
struct uuid_option {
/** UUID */
union uuid *value;
/** Storage buffer */
union uuid buf;
};
extern int parse_string ( char *text, char **value );
extern int parse_integer ( char *text, unsigned int *value );
extern int parse_timeout ( char *text, unsigned long *value );
extern int parse_uuid ( char *text, union uuid *value );
extern int parse_uuid ( char *text, struct uuid_option *uuid );
extern int parse_netdev ( char *text, struct net_device **netdev );
extern int
parse_netdev_configurator ( char *text,
+3
View File
@@ -19,6 +19,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <ipxe/process.h>
#include <ipxe/blockdev.h>
#include <ipxe/acpi.h>
#include <ipxe/uuid.h>
#include <config/sanboot.h>
/**
@@ -109,6 +110,8 @@ enum san_device_flags {
struct san_boot_config {
/** Boot filename (or NULL to use default) */
const char *filename;
/** UUID (or NULL to ignore UUID) */
union uuid *uuid;
};
/**