mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
vl: Switch qemu_uuid to QemuUUID
Update all qemu_uuid users as well, especially get rid of the duplicated low level g_strdup_printf, sscanf and snprintf calls with QEMU UUID API. Since qemu_uuid_parse is quite tangled with qemu_uuid, its switching to QemuUUID is done here too to keep everything in sync and avoid code churn. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Jeff Cody <jcody@redhat.com> Message-Id: <1474432046-325-10-git-send-email-famz@redhat.com>
This commit is contained in:
6
vl.c
6
vl.c
@@ -183,10 +183,10 @@ uint8_t qemu_extra_params_fw[2];
|
||||
|
||||
int icount_align_option;
|
||||
|
||||
/* The bytes in qemu_uuid[] are in the order specified by RFC4122, _not_ in the
|
||||
/* The bytes in qemu_uuid are in the order specified by RFC4122, _not_ in the
|
||||
* little-endian "wire format" described in the SMBIOS 2.6 specification.
|
||||
*/
|
||||
uint8_t qemu_uuid[16];
|
||||
QemuUUID qemu_uuid;
|
||||
bool qemu_uuid_set;
|
||||
|
||||
static NotifierList exit_notifiers =
|
||||
@@ -3780,7 +3780,7 @@ int main(int argc, char **argv, char **envp)
|
||||
cursor_hide = 0;
|
||||
break;
|
||||
case QEMU_OPTION_uuid:
|
||||
if(qemu_uuid_parse(optarg, qemu_uuid) < 0) {
|
||||
if (qemu_uuid_parse(optarg, &qemu_uuid) < 0) {
|
||||
error_report("failed to parse UUID string: wrong format");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user