aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/ipxe
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2024-03-06 08:55:55 +0000
committerMichael Brown <mcb30@ipxe.org>2024-03-06 16:11:29 +0000
commitcea22d76e4cfdbd2d5a3a29bd541346710760457 (patch)
tree989f3ba4e8c9a604ecf060ce5aa5ce53dd526cca /src/include/ipxe
parentc4471e3408d85c51a69991974985fe283d869eac (diff)
downloadipxe-cea22d76e4cfdbd2d5a3a29bd541346710760457.tar.gz
[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>
Diffstat (limited to 'src/include/ipxe')
-rw-r--r--src/include/ipxe/parseopt.h10
-rw-r--r--src/include/ipxe/sanboot.h3
2 files changed, 12 insertions, 1 deletions
diff --git a/src/include/ipxe/parseopt.h b/src/include/ipxe/parseopt.h
index ebd18804f..61010f22a 100644
--- a/src/include/ipxe/parseopt.h
+++ b/src/include/ipxe/parseopt.h
@@ -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,
diff --git a/src/include/ipxe/sanboot.h b/src/include/ipxe/sanboot.h
index d981226e9..9841edda5 100644
--- a/src/include/ipxe/sanboot.h
+++ b/src/include/ipxe/sanboot.h
@@ -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;
};
/**