From c1e6cc196969e960dd2c668a8d67cbd745589d77 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Fri, 25 Jul 2008 09:01:25 +0000 Subject: [PATCH] =?UTF-8?q?*=20src/qemu=5Fdriver.c:=20some=20uuid=20to=20s?= =?UTF-8?q?tring=20conversion=20were=20missing=20=20=20patch=20from=20Guid?= =?UTF-8?q?o=20G=C3=BCnther=20Daniel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ChangeLog | 5 +++++ src/qemu_driver.c | 26 +++++++++++++++++++++----- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 67d13bad16..2ec026eb84 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Jul 25 11:00:27 CEST 2008 Daniel Veillard + + * src/qemu_driver.c: some uuid to string conversion were missing + patch from Guido Günther + Fri Jul 25 10:46:25 CEST 2008 Daniel Veillard * include/libvirt/libvirt.h include/libvirt/libvirt.h.in: diff --git a/src/qemu_driver.c b/src/qemu_driver.c index 9bd059a45e..127e2d57ae 100644 --- a/src/qemu_driver.c +++ b/src/qemu_driver.c @@ -63,6 +63,7 @@ #include "stats_linux.h" #include "capabilities.h" #include "memory.h" +#include "uuid.h" /* For storing short-lived temporary files. */ #define TEMPDIR LOCAL_STATE_DIR "/cache/libvirt" @@ -2155,8 +2156,11 @@ static unsigned long qemudDomainGetMaxMemory(virDomainPtr dom) { virDomainObjPtr vm = virDomainFindByUUID(driver->domains, dom->uuid); if (!vm) { + char uuidstr[VIR_UUID_STRING_BUFLEN]; + + virUUIDFormat(dom->uuid, uuidstr); qemudReportError(dom->conn, dom, NULL, VIR_ERR_INVALID_DOMAIN, - _("no domain with matching uuid '%s'"), dom->uuid); + _("no domain with matching uuid '%s'"), uuidstr); return 0; } @@ -2168,8 +2172,11 @@ static int qemudDomainSetMaxMemory(virDomainPtr dom, unsigned long newmax) { virDomainObjPtr vm = virDomainFindByUUID(driver->domains, dom->uuid); if (!vm) { + char uuidstr[VIR_UUID_STRING_BUFLEN]; + + virUUIDFormat(dom->uuid, uuidstr); qemudReportError(dom->conn, dom, NULL, VIR_ERR_INVALID_DOMAIN, - _("no domain with matching uuid '%s'"), dom->uuid); + _("no domain with matching uuid '%s'"), uuidstr); return -1; } @@ -2188,8 +2195,11 @@ static int qemudDomainSetMemory(virDomainPtr dom, unsigned long newmem) { virDomainObjPtr vm = virDomainFindByUUID(driver->domains, dom->uuid); if (!vm) { + char uuidstr[VIR_UUID_STRING_BUFLEN]; + + virUUIDFormat(dom->uuid, uuidstr); qemudReportError(dom->conn, dom, NULL, VIR_ERR_INVALID_DOMAIN, - _("no domain with matching uuid '%s'"), dom->uuid); + _("no domain with matching uuid '%s'"), uuidstr); return -1; } @@ -2458,8 +2468,11 @@ static int qemudDomainSetVcpus(virDomainPtr dom, unsigned int nvcpus) { int max; if (!vm) { + char uuidstr[VIR_UUID_STRING_BUFLEN]; + + virUUIDFormat(dom->uuid, uuidstr); qemudReportError(dom->conn, dom, NULL, VIR_ERR_INVALID_DOMAIN, - _("no domain with matching uuid '%s'"), dom->uuid); + _("no domain with matching uuid '%s'"), uuidstr); return -1; } @@ -2617,8 +2630,11 @@ static int qemudDomainGetMaxVcpus(virDomainPtr dom) { int ret; if (!vm) { + char uuidstr[VIR_UUID_STRING_BUFLEN]; + + virUUIDFormat(dom->uuid, uuidstr); qemudReportError(dom->conn, dom, NULL, VIR_ERR_INVALID_DOMAIN, - _("no domain with matching uuid '%s'"), dom->uuid); + _("no domain with matching uuid '%s'"), uuidstr); return -1; }