bhyve: Report an error for invalid UUIDs.

Reviewed by:	rgrimes, grehan, jhb
Differential Revision:	https://reviews.freebsd.org/D30050
This commit is contained in:
James Mintram 2022-06-16 13:17:44 -07:00 committed by John Baldwin
parent f22068d91b
commit e16b709e2d
2 changed files with 5 additions and 2 deletions

View File

@ -1536,7 +1536,8 @@ main(int argc, char *argv[])
}
error = smbios_build(ctx);
assert(error == 0);
if (error != 0)
exit(4);
if (get_config_bool("acpi_tables")) {
error = acpi_build(ctx, guest_ncpus);

View File

@ -666,8 +666,10 @@ smbios_type1_initializer(struct smbios_structure *template_entry,
uint32_t status;
uuid_from_string(guest_uuid_str, &uuid, &status);
if (status != uuid_s_ok)
if (status != uuid_s_ok) {
EPRINTLN("Invalid UUID");
return (-1);
}
uuid_enc_le(&type1->uuid, &uuid);
} else {