While compiling on F15 build crashed (probably because of new GCC).
---
AUTHORS | 1 +
src/qemu/qemu_driver.c | 7 ++++---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/AUTHORS b/AUTHORS
index 4b16a2c..636fa63 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -185,6 +185,7 @@ Patches have also been contributed by:
Michael Santos <michael.santos(a)gmail.com>
Alex Jia <ajia(a)redhat.com>
Oskari Saarenmaa <os(a)ohmu.fi>
+ Peter Krempa <pkrempa(a)redhat.com>
[....send patches to get your name here....]
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 0a6b48e..5c9c7bc 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -1498,7 +1498,9 @@ static int qemuDomainReboot(virDomainPtr dom, unsigned int flags) {
struct qemud_driver *driver = dom->conn->privateData;
virDomainObjPtr vm;
int ret = -1;
+#if HAVE_YAJL
qemuDomainObjPrivatePtr priv;
+#endif
virCheckFlags(0, -1);
@@ -1513,9 +1515,10 @@ static int qemuDomainReboot(virDomainPtr dom, unsigned int flags)
{
_("no domain with matching uuid '%s'"),
uuidstr);
goto cleanup;
}
- priv = vm->privateData;
#if HAVE_YAJL
+ priv = vm->privateData;
+
if (qemuCapsGet(priv->qemuCaps, QEMU_CAPS_MONITOR_JSON)) {
if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
goto cleanup;
@@ -2598,7 +2601,6 @@ static int qemudDomainCoreDump(virDomainPtr dom,
int resume = 0, paused = 0;
int ret = -1;
virDomainEventPtr event = NULL;
- qemuDomainObjPrivatePtr priv;
virCheckFlags(VIR_DUMP_LIVE | VIR_DUMP_CRASH, -1);
@@ -2612,7 +2614,6 @@ static int qemudDomainCoreDump(virDomainPtr dom,
_("no domain with matching uuid '%s'"),
uuidstr);
goto cleanup;
}
- priv = vm->privateData;
if (qemuDomainObjBeginAsyncJobWithDriver(driver, vm,
QEMU_ASYNC_JOB_DUMP) < 0)
--
1.7.6