scsi: prefer UUID to VM name for the initiator name

The UUID is unique even across multiple hosts, thus it is
better than a VM name even if it is less user-friendly.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2013-08-02 17:02:01 +02:00
parent 2d1fe1873a
commit 5accc8408f
4 changed files with 31 additions and 7 deletions

View file

@ -22,6 +22,7 @@ stub-obj-y += reset.o
stub-obj-y += set-fd-handler.o
stub-obj-y += slirp.o
stub-obj-y += sysbus.o
stub-obj-y += uuid.o
stub-obj-y += vm-stop.o
stub-obj-y += vmstate.o
stub-obj-$(CONFIG_WIN32) += fd-register.o

12
stubs/uuid.c Normal file
View file

@ -0,0 +1,12 @@
#include "qemu-common.h"
#include "sysemu/sysemu.h"
#include "qmp-commands.h"
UuidInfo *qmp_query_uuid(Error **errp)
{
UuidInfo *info = g_malloc0(sizeof(*info));
info->UUID = g_strdup(UUID_NONE);
return info;
}