mirror of
https://github.com/ipxe/ipxe
synced 2025-12-23 05:21:49 +03:00
[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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user