aboutsummaryrefslogtreecommitdiffstats
path: root/src/core
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/core
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/core')
-rw-r--r--src/core/parseopt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/parseopt.c b/src/core/parseopt.c
index 7aff14851..8410e6e90 100644
--- a/src/core/parseopt.c
+++ b/src/core/parseopt.c
@@ -129,20 +129,21 @@ int parse_timeout ( char *text, unsigned long *value ) {
* Parse UUID
*
* @v text Text
- * @ret value UUID value
+ * @ret uuid UUID value
* @ret rc Return status code
*/
-int parse_uuid ( char *text, union uuid *value ) {
+int parse_uuid ( char *text, struct uuid_option *uuid ) {
int rc;
/* Sanity check */
assert ( text != NULL );
/* Parse UUID */
- if ( ( rc = uuid_aton ( text, value ) ) != 0 ) {
+ if ( ( rc = uuid_aton ( text, &uuid->buf ) ) != 0 ) {
printf ( "\"%s\": invalid UUID\n", text );
return rc;
}
+ uuid->value = &uuid->buf;
return 0;
}