From eeb224b812bab6502db2e9ea31fd2b0f152ec7b1 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 3 Jun 2008 08:01:45 +0000 Subject: [PATCH] * src/xm_internal.c: If vcpu cpuset attribute is invalid then display an error instead of silently ignoring it (Hiroyuki Kaguchi). --- ChangeLog | 6 ++++++ src/xm_internal.c | 21 ++++++++------------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6ccfe02e97..491bc56964 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Tue Jun 3 08:58:00 BST 2008 Richard W.M. Jones + + * src/xm_internal.c: If vcpu cpuset attribute is invalid + then display an error instead of silently ignoring it + (Hiroyuki Kaguchi). + Mon Jun 2 12:52:00 BST 2008 Richard W.M. Jones General tips for contributing patches diff --git a/src/xm_internal.c b/src/xm_internal.c index 4c64b7dcca..bee178052e 100644 --- a/src/xm_internal.c +++ b/src/xm_internal.c @@ -2004,20 +2004,15 @@ virConfPtr xenXMParseXMLToConfig(virConnectPtr conn, const char *xml) { char *ranges; ranges = virConvertCpuSet(conn, cpus, 0); - if (ranges != NULL) { - VIR_FREE(cpus); - if (xenXMConfigSetString(conf, "cpus", ranges) < 0) { - VIR_FREE(ranges); - goto error; - } - VIR_FREE(ranges); - } else { - if (xenXMConfigSetString(conf, "cpus", cpus) < 0) { - VIR_FREE(cpus); - goto error; - } - VIR_FREE(cpus); + VIR_FREE(cpus); + if (ranges == NULL) { + goto error; } + if (xenXMConfigSetString(conf, "cpus", ranges) < 0) { + VIR_FREE(ranges); + goto error; + } + VIR_FREE(ranges); } obj = xmlXPathEval(BAD_CAST "string(/domain/os/type)", ctxt);