From cea22d76e4cfdbd2d5a3a29bd541346710760457 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 6 Mar 2024 08:55:55 +0000 Subject: [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 --- src/core/parseopt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/core') 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; } -- cgit