[libvirt] [PATCH] qemu: Don't fail driver startup with ancient qemu
by Jiri Denemark
Failure to extract version info (e.g., because qemu binary is so ancient
that it doesn't even support -help) shouldn't be considered fatal since
we only need it to detect whether qemu supports bootindex option.
---
src/qemu/qemu_capabilities.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index f86e7f5..6d2a3f6 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -554,9 +554,10 @@ qemuCapsInitGuest(virCapsPtr caps,
!virCapabilitiesAddGuestFeature(guest, "cpuselection", 1, 0))
goto error;
- if (qemuCapsExtractVersionInfo(binary, info->arch, NULL, &qemuCaps) < 0 ||
- (qemuCapsGet(qemuCaps, QEMU_CAPS_BOOTINDEX) &&
- !virCapabilitiesAddGuestFeature(guest, "deviceboot", 1, 0)))
+ if (qemuCapsExtractVersionInfo(binary, info->arch,
+ NULL, &qemuCaps) == 0 &&
+ qemuCapsGet(qemuCaps, QEMU_CAPS_BOOTINDEX) &&
+ !virCapabilitiesAddGuestFeature(guest, "deviceboot", 1, 0))
goto error;
if (hvm) {
--
1.7.4.1
13 years, 7 months
[libvirt] [PATCH] build: detect potentential uninitialized variables
by Eric Blake
Even with -Wuninitialized (which is part of autobuild.sh
--enable-compile-warnings=error), gcc does NOT catch this
use of an uninitialized variable:
{
if (cond)
goto error;
int a = 1;
error:
printf("%d", a);
}
which prints 0 (if the stack was previously wiped) if cond
was true. Clang will catch it, but we dont' use clang as
often. Using gcc -Wjump-misses-init gives false positives:
{
if (cond)
goto error;
int a = 1;
return a;
error:
return 0;
}
Here, a was never used in the scope of the error block, so
declaring it after goto is technically fine (and clang agrees);
however, given that our HACKING already documents a preference
to C89 decl-before-statement, the false positive warning is
enough of a prod to comply with HACKING.
[Personally, I'd _really_ rather use C99 decl-after-statement
to minimize scope, but until gcc can efficiently and reliably
catch scoping and uninitialized usage bugs, I'll settle with
the compromise of enforcing a coding standard that rejects
false positives.]
* acinclude.m4 (LIBVIRT_COMPILE_WARNINGS): Add -Wjump-misses-init.
* src/util/util.c (__virExec): Adjust offenders.
* src/conf/domain_conf.c (virDomainTimerDefParseXML): Likewise.
* src/remote/remote_driver.c (doRemoteOpen): Likewise.
* src/phyp/phyp_driver.c (phypGetLparNAME, phypGetLparProfile)
(phypGetVIOSFreeSCSIAdapter, phypVolumeGetKey)
(phypGetStoragePoolDevice)
(phypVolumeGetPhysicalVolumeByStoragePool)
(phypVolumeGetPath): Likewise.
* src/vbox/vbox_tmpl.c (vboxNetworkUndefineDestroy)
(vboxNetworkCreate, vboxNetworkDumpXML)
(vboxNetworkDefineCreateXML): Likewise.
* src/xenapi/xenapi_driver.c (getCapsObject)
(xenapiDomainDumpXML): Likewise.
* src/xenapi/xenapi_utils.c (createVMRecordFromXml): Likewise.
* src/security/security_selinux.c (SELinuxGenNewContext):
Likewise.
* src/qemu/qemu_command.c (qemuBuildCommandLine): Likewise.
* src/qemu/qemu_hotplug.c (qemuDomainChangeEjectableMedia):
Likewise.
* src/qemu/qemu_process.c (qemuProcessWaitForMonitor): Likewise.
* src/qemu/qemu_monitor_text.c (qemuMonitorTextGetPtyPaths):
Likewise.
* src/qemu/qemu_driver.c (qemudDomainShutdown)
(qemudDomainBlockStats, qemudDomainMemoryPeek): Likewise.
* src/storage/storage_backend_iscsi.c
(virStorageBackendCreateIfaceIQN): Likewise.
* src/node_device/node_device_udev.c (udevProcessPCI): Likewise.
---
acinclude.m4 | 1 +
src/conf/domain_conf.c | 6 ++++--
src/node_device/node_device_udev.c | 3 ++-
src/phyp/phyp_driver.c | 24 ++++++++++++++++--------
src/qemu/qemu_command.c | 6 ++++--
src/qemu/qemu_driver.c | 9 ++++++---
src/qemu/qemu_hotplug.c | 4 ++--
src/qemu/qemu_monitor_text.c | 2 +-
src/qemu/qemu_process.c | 3 ++-
src/remote/remote_driver.c | 12 +++++++-----
src/security/security_selinux.c | 3 ++-
src/storage/storage_backend_iscsi.c | 25 ++++++++++++-------------
src/util/util.c | 3 ++-
src/vbox/vbox_tmpl.c | 28 ++++++++++++++--------------
src/xenapi/xenapi_driver.c | 24 ++++++++++++++----------
src/xenapi/xenapi_utils.c | 10 ++++++----
16 files changed, 95 insertions(+), 68 deletions(-)
diff --git a/acinclude.m4 b/acinclude.m4
index 838ec46..22eb7af 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -49,6 +49,7 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
try_compiler_flags="$try_compiler_flags -Wredundant-decls"
try_compiler_flags="$try_compiler_flags -Wno-sign-compare"
try_compiler_flags="$try_compiler_flags -Wlogical-op"
+ try_compiler_flags="$try_compiler_flags -Wjump-misses-init"
try_compiler_flags="$try_compiler_flags $common_flags"
if test "$enable_compile_warnings" = "error" ; then
try_compiler_flags="$try_compiler_flags -Werror"
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index b6aaf33..90a1317 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -3557,6 +3557,8 @@ virDomainTimerDefParseXML(const xmlNodePtr node,
virDomainTimerDefPtr def;
xmlNodePtr oldnode = ctxt->node;
+ xmlNodePtr catchup;
+ int ret;
if (VIR_ALLOC(def) < 0) {
virReportOOMError();
@@ -3610,7 +3612,7 @@ virDomainTimerDefParseXML(const xmlNodePtr node,
}
}
- int ret = virXPathULong("string(./frequency)", ctxt, &def->frequency);
+ ret = virXPathULong("string(./frequency)", ctxt, &def->frequency);
if (ret == -1) {
def->frequency = 0;
} else if (ret < 0) {
@@ -3629,7 +3631,7 @@ virDomainTimerDefParseXML(const xmlNodePtr node,
}
}
- xmlNodePtr catchup = virXPathNode("./catchup", ctxt);
+ catchup = virXPathNode("./catchup", ctxt);
if (catchup != NULL) {
ret = virXPathULong("string(./catchup/@threshold)", ctxt,
&def->catchup.threshold);
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index 44df16e..372f1d1 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -415,6 +415,7 @@ static int udevProcessPCI(struct udev_device *device,
const char *syspath = NULL;
union _virNodeDevCapData *data = &def->caps->data;
int ret = -1;
+ char *p;
syspath = udev_device_get_syspath(device);
@@ -425,7 +426,7 @@ static int udevProcessPCI(struct udev_device *device,
goto out;
}
- char *p = strrchr(syspath, '/');
+ p = strrchr(syspath, '/');
if ((p == NULL) || (udevStrToLong_ui(p+1,
&p,
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index 51f9ff6..b17d90b 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -1337,6 +1337,7 @@ phypGetLparNAME(LIBSSH2_SESSION * session, const char *managed_system,
char *ret = NULL;
int exit_status = 0;
virBuffer buf = VIR_BUFFER_INITIALIZER;
+ char *char_ptr;
virBufferAddLit(&buf, "lssyscfg -r lpar");
if (system_type == HMC)
@@ -1354,7 +1355,7 @@ phypGetLparNAME(LIBSSH2_SESSION * session, const char *managed_system,
if (exit_status < 0 || ret == NULL)
goto err;
- char *char_ptr = strchr(ret, '\n');
+ char_ptr = strchr(ret, '\n');
if (char_ptr)
*char_ptr = '\0';
@@ -1675,6 +1676,7 @@ phypGetLparProfile(virConnectPtr conn, int lpar_id)
char *cmd = NULL;
char *ret = NULL;
virBuffer buf = VIR_BUFFER_INITIALIZER;
+ char *char_ptr;
virBufferAddLit(&buf, "lssyscfg");
if (system_type == HMC)
@@ -1694,7 +1696,7 @@ phypGetLparProfile(virConnectPtr conn, int lpar_id)
if (exit_status < 0 || ret == NULL)
goto err;
- char *char_ptr = strchr(ret, '\n');
+ char_ptr = strchr(ret, '\n');
if (char_ptr)
*char_ptr = '\0';
@@ -1892,6 +1894,7 @@ phypGetVIOSFreeSCSIAdapter(virConnectPtr conn)
char *cmd = NULL;
char *ret = NULL;
virBuffer buf = VIR_BUFFER_INITIALIZER;
+ char *char_ptr;
if (system_type == HMC)
virBufferVSprintf(&buf, "viosvrcmd -m %s --id %d -c '",
@@ -1916,7 +1919,7 @@ phypGetVIOSFreeSCSIAdapter(virConnectPtr conn)
if (exit_status < 0 || ret == NULL)
goto err;
- char *char_ptr = strchr(ret, '\n');
+ char_ptr = strchr(ret, '\n');
if (char_ptr)
*char_ptr = '\0';
@@ -2154,6 +2157,7 @@ phypVolumeGetKey(virConnectPtr conn, char *key, const char *name)
char *cmd = NULL;
char *ret = NULL;
virBuffer buf = VIR_BUFFER_INITIALIZER;
+ char *char_ptr;
if (system_type == HMC)
virBufferVSprintf(&buf, "viosvrcmd -m %s --id %d -c '",
@@ -2178,7 +2182,7 @@ phypVolumeGetKey(virConnectPtr conn, char *key, const char *name)
if (exit_status < 0 || ret == NULL)
goto err;
- char *char_ptr = strchr(ret, '\n');
+ char_ptr = strchr(ret, '\n');
if (char_ptr)
*char_ptr = '\0';
@@ -2209,6 +2213,7 @@ phypGetStoragePoolDevice(virConnectPtr conn, char *name)
char *cmd = NULL;
char *ret = NULL;
virBuffer buf = VIR_BUFFER_INITIALIZER;
+ char *char_ptr;
if (system_type == HMC)
virBufferVSprintf(&buf, "viosvrcmd -m %s --id %d -c '",
@@ -2233,7 +2238,7 @@ phypGetStoragePoolDevice(virConnectPtr conn, char *name)
if (exit_status < 0 || ret == NULL)
goto err;
- char *char_ptr = strchr(ret, '\n');
+ char_ptr = strchr(ret, '\n');
if (char_ptr)
*char_ptr = '\0';
@@ -2474,6 +2479,7 @@ phypVolumeGetPhysicalVolumeByStoragePool(virStorageVolPtr vol, char *sp)
char *cmd = NULL;
char *ret = NULL;
virBuffer buf = VIR_BUFFER_INITIALIZER;
+ char *char_ptr;
if (system_type == HMC)
virBufferVSprintf(&buf, "viosvrcmd -m %s --id %d -c '",
@@ -2498,7 +2504,7 @@ phypVolumeGetPhysicalVolumeByStoragePool(virStorageVolPtr vol, char *sp)
if (exit_status < 0 || ret == NULL)
goto err;
- char *char_ptr = strchr(ret, '\n');
+ char_ptr = strchr(ret, '\n');
if (char_ptr)
*char_ptr = '\0';
@@ -2723,6 +2729,8 @@ phypVolumeGetPath(virStorageVolPtr vol)
char *sp = NULL;
char *path = NULL;
virBuffer buf = VIR_BUFFER_INITIALIZER;
+ char *char_ptr;
+ char *pv;
if (system_type == HMC)
virBufferVSprintf(&buf, "viosvrcmd -m %s --id %d -c '",
@@ -2748,12 +2756,12 @@ phypVolumeGetPath(virStorageVolPtr vol)
if (exit_status < 0 || sp == NULL)
goto err;
- char *char_ptr = strchr(sp, '\n');
+ char_ptr = strchr(sp, '\n');
if (char_ptr)
*char_ptr = '\0';
- char *pv = phypVolumeGetPhysicalVolumeByStoragePool(vol, sp);
+ pv = phypVolumeGetPhysicalVolumeByStoragePool(vol, sp);
if (pv) {
if (virAsprintf(&path, "/%s/%s/%s", pv, sp, vol->name) < 0) {
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 3138943..3d25ba4 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3727,6 +3727,8 @@ qemuBuildCommandLine(virConnectPtr conn,
for (i = 0 ; i < def->nchannels ; i++) {
virDomainChrDefPtr channel = def->channels[i];
char *devstr;
+ char *addr;
+ int port;
switch(channel->targetType) {
case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_GUESTFWD:
@@ -3745,10 +3747,10 @@ qemuBuildCommandLine(virConnectPtr conn,
virCommandAddArg(cmd, devstr);
VIR_FREE(devstr);
- char *addr = virSocketFormatAddr(channel->target.addr);
+ addr = virSocketFormatAddr(channel->target.addr);
if (!addr)
goto error;
- int port = virSocketGetPort(channel->target.addr);
+ port = virSocketGetPort(channel->target.addr);
virCommandAddArg(cmd, "-netdev");
virCommandAddArgFormat(cmd,
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 5aa715e..48fe266 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -1426,6 +1426,7 @@ static int qemudDomainShutdown(virDomainPtr dom) {
struct qemud_driver *driver = dom->conn->privateData;
virDomainObjPtr vm;
int ret = -1;
+ qemuDomainObjPrivatePtr priv;
qemuDriverLock(driver);
vm = virDomainFindByUUID(&driver->domains, dom->uuid);
@@ -1448,7 +1449,7 @@ static int qemudDomainShutdown(virDomainPtr dom) {
goto endjob;
}
- qemuDomainObjPrivatePtr priv = vm->privateData;
+ priv = vm->privateData;
qemuDomainObjEnterMonitor(vm);
ret = qemuMonitorSystemPowerdown(priv->mon);
qemuDomainObjExitMonitor(vm);
@@ -4748,6 +4749,7 @@ qemudDomainBlockStats (virDomainPtr dom,
int i, ret = -1;
virDomainObjPtr vm;
virDomainDiskDefPtr disk = NULL;
+ qemuDomainObjPrivatePtr priv;
qemuDriverLock(driver);
vm = virDomainFindByUUID(&driver->domains, dom->uuid);
@@ -4788,7 +4790,7 @@ qemudDomainBlockStats (virDomainPtr dom,
goto endjob;
}
- qemuDomainObjPrivatePtr priv = vm->privateData;
+ priv = vm->privateData;
qemuDomainObjEnterMonitor(vm);
ret = qemuMonitorGetBlockStatsInfo(priv->mon,
disk->info.alias,
@@ -4995,6 +4997,7 @@ qemudDomainMemoryPeek (virDomainPtr dom,
virDomainObjPtr vm;
char *tmp = NULL;
int fd = -1, ret = -1;
+ qemuDomainObjPrivatePtr priv;
qemuDriverLock(driver);
vm = virDomainFindByUUID(&driver->domains, dom->uuid);
@@ -5035,7 +5038,7 @@ qemudDomainMemoryPeek (virDomainPtr dom,
goto endjob;
}
- qemuDomainObjPrivatePtr priv = vm->privateData;
+ priv = vm->privateData;
qemuDomainObjEnterMonitor(vm);
if (flags == VIR_MEMORY_VIRTUAL) {
if (qemuMonitorSaveVirtualMemory(priv->mon, offset, size, tmp) < 0) {
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 9082515..b03f774 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -51,8 +51,8 @@ int qemuDomainChangeEjectableMedia(struct qemud_driver *driver,
int i;
int ret;
char *driveAlias = NULL;
+ qemuDomainObjPrivatePtr priv;
- origdisk = NULL;
for (i = 0 ; i < vm->def->ndisks ; i++) {
if (vm->def->disks[i]->bus == disk->bus &&
STREQ(vm->def->disks[i]->dst, disk->dst)) {
@@ -90,7 +90,7 @@ int qemuDomainChangeEjectableMedia(struct qemud_driver *driver,
if (!(driveAlias = qemuDeviceDriveHostAlias(origdisk, qemuCaps)))
goto error;
- qemuDomainObjPrivatePtr priv = vm->privateData;
+ priv = vm->privateData;
qemuDomainObjEnterMonitorWithDriver(driver, vm);
if (disk->src) {
const char *format = NULL;
diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
index 168c60f..53781c8 100644
--- a/src/qemu/qemu_monitor_text.c
+++ b/src/qemu/qemu_monitor_text.c
@@ -1873,7 +1873,7 @@ int qemuMonitorTextGetPtyPaths(qemuMonitorPtr mon,
if (qemuMonitorHMPCommand(mon, "info chardev", &reply) < 0) {
qemuReportError(VIR_ERR_OPERATION_FAILED, "%s",
_("failed to retrieve chardev info in qemu with 'info chardev'"));
- goto cleanup;
+ return -1;
}
char *pos; /* The current start of searching */
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 2fc2b6c..870d942 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -1017,6 +1017,7 @@ qemuProcessWaitForMonitor(struct qemud_driver* driver,
int logfd;
int ret = -1;
virHashTablePtr paths = NULL;
+ qemuDomainObjPrivatePtr priv;
if ((logfd = qemuProcessLogReadFD(driver->logDir, vm->def->name, pos)) < 0)
return -1;
@@ -1039,7 +1040,7 @@ qemuProcessWaitForMonitor(struct qemud_driver* driver,
if (paths == NULL)
goto cleanup;
- qemuDomainObjPrivatePtr priv = vm->privateData;
+ priv = vm->privateData;
qemuDomainObjEnterMonitorWithDriver(driver, vm);
ret = qemuMonitorGetPtyPaths(priv->mon, paths);
qemuDomainObjExitMonitorWithDriver(driver, vm);
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index bf94e70..166968a 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -869,12 +869,14 @@ doRemoteOpen (virConnectPtr conn,
goto failed;
/* Finally we can call the remote side's open function. */
- remote_open_args args = { &name, flags };
+ {
+ remote_open_args args = { &name, flags };
- if (call (conn, priv, REMOTE_CALL_IN_OPEN, REMOTE_PROC_OPEN,
- (xdrproc_t) xdr_remote_open_args, (char *) &args,
- (xdrproc_t) xdr_void, (char *) NULL) == -1)
- goto failed;
+ if (call (conn, priv, REMOTE_CALL_IN_OPEN, REMOTE_PROC_OPEN,
+ (xdrproc_t) xdr_remote_open_args, (char *) &args,
+ (xdrproc_t) xdr_void, (char *) NULL) == -1)
+ goto failed;
+ }
/* Now try and find out what URI the daemon used */
if (conn->uri == NULL) {
diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
index 587b3b5..d870616 100644
--- a/src/security/security_selinux.c
+++ b/src/security/security_selinux.c
@@ -95,8 +95,9 @@ SELinuxGenNewContext(const char *oldcontext, const char *mcs)
{
char *newcontext = NULL;
char *scontext = strdup(oldcontext);
+ context_t con;
if (!scontext) goto err;
- context_t con = context_new(scontext);
+ con = context_new(scontext);
if (!con) goto err;
context_range_set(con, mcs);
newcontext = strdup(context_str(con));
diff --git a/src/storage/storage_backend_iscsi.c b/src/storage/storage_backend_iscsi.c
index 6eff5f5..f554537 100644
--- a/src/storage/storage_backend_iscsi.c
+++ b/src/storage/storage_backend_iscsi.c
@@ -1,7 +1,7 @@
/*
* storage_backend_iscsi.c: storage backend for iSCSI handling
*
- * Copyright (C) 2007-2008, 2010 Red Hat, Inc.
+ * Copyright (C) 2007-2008, 2010-2011 Red Hat, Inc.
* Copyright (C) 2007-2008 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
@@ -269,6 +269,15 @@ virStorageBackendCreateIfaceIQN(const char *initiatoriqn,
{
int ret = -1, exitstatus = -1;
char temp_ifacename[32];
+ const char *const cmdargv1[] = {
+ ISCSIADM, "--mode", "iface", "--interface",
+ temp_ifacename, "--op", "new", NULL
+ };
+ const char *const cmdargv2[] = {
+ ISCSIADM, "--mode", "iface", "--interface", temp_ifacename,
+ "--op", "update", "--name", "iface.initiatorname", "--value",
+ initiatoriqn, NULL
+ };
if (virRandomInitialize(time(NULL) ^ getpid()) == -1) {
virStorageReportError(VIR_ERR_INTERNAL_ERROR, "%s",
@@ -277,12 +286,8 @@ virStorageBackendCreateIfaceIQN(const char *initiatoriqn,
goto out;
}
- snprintf(temp_ifacename, sizeof(temp_ifacename), "libvirt-iface-%08x", virRandom(1024 * 1024 * 1024));
-
- const char *const cmdargv1[] = {
- ISCSIADM, "--mode", "iface", "--interface",
- &temp_ifacename[0], "--op", "new", NULL
- };
+ snprintf(temp_ifacename, sizeof(temp_ifacename), "libvirt-iface-%08x",
+ virRandom(1024 * 1024 * 1024));
VIR_DEBUG("Attempting to create interface '%s' with IQN '%s'",
&temp_ifacename[0], initiatoriqn);
@@ -298,12 +303,6 @@ virStorageBackendCreateIfaceIQN(const char *initiatoriqn,
goto out;
}
- const char *const cmdargv2[] = {
- ISCSIADM, "--mode", "iface", "--interface", &temp_ifacename[0],
- "--op", "update", "--name", "iface.initiatorname", "--value",
- initiatoriqn, NULL
- };
-
/* Note that we ignore the exitstatus. Older versions of iscsiadm tools
* returned an exit status of > 0, even if they succeeded. We will just
* rely on whether iface file got updated properly. */
diff --git a/src/util/util.c b/src/util/util.c
index 43794b1..7384517 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -467,6 +467,7 @@ __virExec(const char *const*argv,
int childerr = -1;
int tmpfd;
const char *binary = NULL;
+ int forkRet;
if (argv[0][0] != '/') {
if (!(binary = virFindFileInPath(argv[0]))) {
@@ -544,7 +545,7 @@ __virExec(const char *const*argv,
childerr = null;
}
- int forkRet = virFork(&pid);
+ forkRet = virFork(&pid);
if (pid < 0) {
goto cleanup;
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 8bd27dd..0fbfba5 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -7186,12 +7186,15 @@ static virNetworkPtr vboxNetworkDefineCreateXML(virConnectPtr conn, const char *
}
}
#else /* VBOX_API_VERSION != 2002 */
- IProgress *progress = NULL;
- host->vtbl->CreateHostOnlyNetworkInterface(host, &networkInterface, &progress);
+ {
+ IProgress *progress = NULL;
+ host->vtbl->CreateHostOnlyNetworkInterface(host, &networkInterface,
+ &progress);
- if (progress) {
- progress->vtbl->WaitForCompletion(progress, -1);
- VBOX_RELEASE(progress);
+ if (progress) {
+ progress->vtbl->WaitForCompletion(progress, -1);
+ VBOX_RELEASE(progress);
+ }
}
#endif /* VBOX_API_VERSION != 2002 */
@@ -7342,6 +7345,8 @@ static virNetworkPtr vboxNetworkDefineXML(virConnectPtr conn, const char *xml) {
static int vboxNetworkUndefineDestroy(virNetworkPtr network, bool removeinterface) {
VBOX_OBJECT_HOST_CHECK(network->conn, int, -1);
char *networkNameUtf8 = NULL;
+ PRUnichar *networkInterfaceNameUtf16 = NULL;
+ IHostNetworkInterface *networkInterface = NULL;
/* Current limitation of the function for VirtualBox 2.2.* is
* that you can't delete the default hostonly adaptor namely:
@@ -7356,9 +7361,6 @@ static int vboxNetworkUndefineDestroy(virNetworkPtr network, bool removeinterfac
goto cleanup;
}
- PRUnichar *networkInterfaceNameUtf16 = NULL;
- IHostNetworkInterface *networkInterface = NULL;
-
VBOX_UTF8_TO_UTF16(network->name, &networkInterfaceNameUtf16);
host->vtbl->FindHostNetworkInterfaceByName(host, networkInterfaceNameUtf16, &networkInterface);
@@ -7433,6 +7435,8 @@ static int vboxNetworkUndefine(virNetworkPtr network) {
static int vboxNetworkCreate(virNetworkPtr network) {
VBOX_OBJECT_HOST_CHECK(network->conn, int, -1);
char *networkNameUtf8 = NULL;
+ PRUnichar *networkInterfaceNameUtf16 = NULL;
+ IHostNetworkInterface *networkInterface = NULL;
/* Current limitation of the function for VirtualBox 2.2.* is
* that the default hostonly network "vboxnet0" is always active
@@ -7446,9 +7450,6 @@ static int vboxNetworkCreate(virNetworkPtr network) {
goto cleanup;
}
- PRUnichar *networkInterfaceNameUtf16 = NULL;
- IHostNetworkInterface *networkInterface = NULL;
-
VBOX_UTF8_TO_UTF16(network->name, &networkInterfaceNameUtf16);
host->vtbl->FindHostNetworkInterfaceByName(host, networkInterfaceNameUtf16, &networkInterface);
@@ -7509,6 +7510,8 @@ static char *vboxNetworkDumpXML(virNetworkPtr network, int flags ATTRIBUTE_UNUSE
virNetworkDefPtr def = NULL;
virNetworkIpDefPtr ipdef = NULL;
char *networkNameUtf8 = NULL;
+ PRUnichar *networkInterfaceNameUtf16 = NULL;
+ IHostNetworkInterface *networkInterface = NULL;
if (VIR_ALLOC(def) < 0) {
virReportOOMError();
@@ -7526,9 +7529,6 @@ static char *vboxNetworkDumpXML(virNetworkPtr network, int flags ATTRIBUTE_UNUSE
goto cleanup;
}
- PRUnichar *networkInterfaceNameUtf16 = NULL;
- IHostNetworkInterface *networkInterface = NULL;
-
VBOX_UTF8_TO_UTF16(network->name, &networkInterfaceNameUtf16);
host->vtbl->FindHostNetworkInterfaceByName(host, networkInterfaceNameUtf16, &networkInterface);
diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c
index 27206a0..60b23c7 100644
--- a/src/xenapi/xenapi_driver.c
+++ b/src/xenapi/xenapi_driver.c
@@ -56,21 +56,24 @@
static virCapsPtr
getCapsObject (void)
{
+ virCapsGuestPtr guest1, guest2;
+ virCapsGuestDomainPtr domain1, domain2;
virCapsPtr caps = virCapabilitiesNew("x86_64", 0, 0);
+
if (!caps) {
virReportOOMError();
return NULL;
}
- virCapsGuestPtr guest1 = virCapabilitiesAddGuest(caps, "hvm", "x86_64", 0, "", "", 0, NULL);
+ guest1 = virCapabilitiesAddGuest(caps, "hvm", "x86_64", 0, "", "", 0, NULL);
if (!guest1)
goto error_cleanup;
- virCapsGuestDomainPtr domain1 = virCapabilitiesAddGuestDomain(guest1, "xen", "", "", 0, NULL);
+ domain1 = virCapabilitiesAddGuestDomain(guest1, "xen", "", "", 0, NULL);
if (!domain1)
goto error_cleanup;
- virCapsGuestPtr guest2 = virCapabilitiesAddGuest(caps, "xen", "x86_64", 0, "", "", 0, NULL);
+ guest2 = virCapabilitiesAddGuest(caps, "xen", "x86_64", 0, "", "", 0, NULL);
if (!guest2)
goto error_cleanup;
- virCapsGuestDomainPtr domain2 = virCapabilitiesAddGuestDomain(guest2, "xen", "", "", 0, NULL);
+ domain2 = virCapabilitiesAddGuestDomain(guest2, "xen", "", "", 0, NULL);
if (!domain2)
goto error_cleanup;
@@ -1234,6 +1237,12 @@ xenapiDomainDumpXML (virDomainPtr dom, int flags ATTRIBUTE_UNUSED)
xen_string_string_map *result=NULL;
xen_session *session = ((struct _xenapiPrivate *)(dom->conn->privateData))->session;
virDomainDefPtr defPtr = NULL;
+ char *boot_policy = NULL;
+ unsigned long memory=0;
+ int64_t dynamic_mem=0;
+ char *val = NULL;
+ struct xen_vif_set *vif_set = NULL;
+ char *xml;
if (!xen_vm_get_by_name_label(session, &vms, dom->name)) return NULL;
if (vms->size != 1) {
@@ -1253,7 +1262,6 @@ xenapiDomainDumpXML (virDomainPtr dom, int flags ATTRIBUTE_UNUSED)
memcpy(defPtr->uuid, dom->uuid, VIR_UUID_BUFLEN);
if (!(defPtr->name = strdup(dom->name)))
goto error_cleanup;
- char *boot_policy = NULL;
xen_vm_get_hvm_boot_policy(session, &boot_policy, vm);
if (STREQ(boot_policy,"BIOS order")) {
if (!(defPtr->os.type = strdup("hvm"))) {
@@ -1318,7 +1326,6 @@ xenapiDomainDumpXML (virDomainPtr dom, int flags ATTRIBUTE_UNUSED)
if (!(defPtr->os.bootloader = strdup("pygrub")))
goto error_cleanup;
}
- char *val = NULL;
xen_vm_get_pv_bootloader_args(session, &val, vm);
if (STRNEQ(val, "")) {
if (!(defPtr->os.bootloaderArgs = strdup(val))) {
@@ -1327,10 +1334,8 @@ xenapiDomainDumpXML (virDomainPtr dom, int flags ATTRIBUTE_UNUSED)
}
VIR_FREE(val);
}
- unsigned long memory=0;
memory = xenapiDomainGetMaxMemory(dom);
defPtr->mem.max_balloon = memory;
- int64_t dynamic_mem=0;
if (xen_vm_get_memory_dynamic_max(session, &dynamic_mem, vm)) {
defPtr->mem.cur_balloon = (unsigned long) (dynamic_mem / 1024);
} else {
@@ -1365,7 +1370,6 @@ xenapiDomainDumpXML (virDomainPtr dom, int flags ATTRIBUTE_UNUSED)
}
xen_string_string_map_free(result);
}
- struct xen_vif_set *vif_set = NULL;
xen_vm_get_vifs(session, &vif_set, vm);
if (vif_set) {
int i;
@@ -1403,7 +1407,7 @@ xenapiDomainDumpXML (virDomainPtr dom, int flags ATTRIBUTE_UNUSED)
xen_vif_set_free(vif_set);
}
if (vms) xen_vm_set_free(vms);
- char *xml = virDomainDefFormat(defPtr, 0);
+ xml = virDomainDefFormat(defPtr, 0);
virDomainDefFree(defPtr);
return xml;
diff --git a/src/xenapi/xenapi_utils.c b/src/xenapi/xenapi_utils.c
index 2ec5f9e..f50610a 100644
--- a/src/xenapi/xenapi_utils.c
+++ b/src/xenapi/xenapi_utils.c
@@ -1,5 +1,6 @@
/*
* xenapi_utils.c: Xen API driver -- utils parts.
+ * Copyright (C) 2011 Red Hat, Inc.
* Copyright (C) 2009, 2010 Citrix Ltd.
*
* This library is free software; you can redistribute it and/or
@@ -462,6 +463,11 @@ createVMRecordFromXml (virConnectPtr conn, virDomainDefPtr def,
xen_vm_record **record, xen_vm *vm)
{
char uuidStr[VIR_UUID_STRING_BUFLEN];
+ xen_string_string_map *strings = NULL;
+ int device_number = 0;
+ char *bridge = NULL, *mac = NULL;
+ int i;
+
*record = xen_vm_record_alloc();
if (!((*record)->name_label = strdup(def->name)))
goto error_cleanup;
@@ -521,7 +527,6 @@ createVMRecordFromXml (virConnectPtr conn, virDomainDefPtr def,
if (def->onCrash)
(*record)->actions_after_crash = actionCrashLibvirt2XenapiEnum(def->onCrash);
- xen_string_string_map *strings = NULL;
if (def->features) {
if (def->features & (1 << VIR_DOMAIN_FEATURE_ACPI))
allocStringMap(&strings, (char *)"acpi", (char *)"true");
@@ -546,9 +551,6 @@ createVMRecordFromXml (virConnectPtr conn, virDomainDefPtr def,
return -1;
}
- int device_number = 0;
- char *bridge = NULL, *mac = NULL;
- int i;
for (i = 0; i < def->nnets; i++) {
if (def->nets[i]->type == VIR_DOMAIN_NET_TYPE_BRIDGE) {
if (def->nets[i]->data.bridge.brname)
--
1.7.4
13 years, 7 months
[libvirt] [PATCH v2] Improve SCSI volume key generation
by Daniel P. Berrange
An update of patch 10 from:
http://www.redhat.com/archives/libvir-list/2010-November/msg00555.html
The SCSI volumes get a better 'key' field based on the fully
qualified volume path. All SCSI volumes have a unique serial
available in hardware which can be obtained by sending a
suitable SCSI command. Call out to udev's 'scsi_id' command
to fetch this value
In v2:
- Only use scsi_id if HAVE_UDEV is defined. This ensures
use only on udev >= 145 and thus avoids problem of
different semantics on RHEL-5 vintage udev
- Use virCommandPtr instead of virExec
- Use VIR_FDOPEN instead of fdopen
* src/storage/storage_backend_scsi.c: Improve volume key
field value stability and uniqueness
---
src/storage/storage_backend_scsi.c | 65 +++++++++++++++++++++++++++++++++--
1 files changed, 61 insertions(+), 4 deletions(-)
diff --git a/src/storage/storage_backend_scsi.c b/src/storage/storage_backend_scsi.c
index d880d65..ed91703 100644
--- a/src/storage/storage_backend_scsi.c
+++ b/src/storage/storage_backend_scsi.c
@@ -33,6 +33,7 @@
#include "memory.h"
#include "logging.h"
#include "files.h"
+#include "command.h"
#define VIR_FROM_THIS VIR_FROM_STORAGE
@@ -160,6 +161,65 @@ cleanup:
return ret;
}
+
+static char *
+virStorageBackendSCSISerial(const char *dev)
+{
+ char *serial = NULL;
+#ifdef HAVE_UDEV
+ int fd = -1;
+ FILE *list = NULL;
+ char line[1024];
+ virCommandPtr cmd = virCommandNewArgList(
+ "/lib/udev/scsi_id",
+ "--replace-whitespace",
+ "--whitelisted",
+ "--device", dev,
+ NULL
+ );
+
+ /* Run the program and capture its output */
+ virCommandSetOutputFD(cmd, &fd);
+ if (virCommandRunAsync(cmd, NULL) < 0)
+ goto cleanup;
+
+ if ((list = VIR_FDOPEN(fd, "r")) == NULL) {
+ virStorageReportError(VIR_ERR_INTERNAL_ERROR,
+ "%s", _("cannot read fd"));
+ goto cleanup;
+ }
+
+ if (fgets(line, sizeof(line), list)) {
+ char *nl = strchr(line, '\n');
+ if (nl)
+ *nl = '\0';
+ VIR_ERROR("GOT ID %s\n", line);
+ serial = strdup(line);
+ } else {
+ VIR_ERROR("NO ID %s\n", dev);
+ serial = strdup(dev);
+ }
+
+ if (!serial) {
+ virReportOOMError();
+ goto cleanup;
+ }
+
+cleanup:
+ if (list)
+ fclose(list);
+ else
+ VIR_FORCE_CLOSE(fd);
+
+ virCommandFree(cmd);
+#else
+ if (!(serial = strdup(dev)))
+ virReportOOMError();
+#endif
+ return serial;
+}
+
+
static int
virStorageBackendSCSINewLun(virStoragePoolObjPtr pool,
uint32_t host ATTRIBUTE_UNUSED,
@@ -233,10 +293,7 @@ virStorageBackendSCSINewLun(virStoragePoolObjPtr pool,
goto free_vol;
}
- /* XXX should use logical unit's UUID instead */
- vol->key = strdup(vol->target.path);
- if (vol->key == NULL) {
- virReportOOMError();
+ if (!(vol->key = virStorageBackendSCSISerial(vol->target.path))) {
retval = -1;
goto free_vol;
}
--
1.7.4
13 years, 7 months
[libvirt] [PATCH] Use gnulib's manywarnings & warnings modules
by Daniel P. Berrange
Remove custom code for checking compiler warnings, using
gl_WARN_ADD instead. Don't list all flags ourselves, use
gnulib's gl_MANYWARN_ALL_GCC to get all possible GCC flags,
then turn off the ones we don't want yet.
This patch alone doesn't buy us much. What we want is some
more followup patches, which remove entries from the
'dontwarn' list, fixing up the corresponding code problems.
We also need to fix our stack usage in many places so we can
lower the ridiculous size of -Wframe-larger-than=20480
* acinclude.m4: Rewrite to use gl_WARN_ADD and gl_MANYWARN_ALL_GCC
* bootstrap.conf: Add warnings & manywarnings
* configure.ac: Switch to gl_WARN_ADD
* m4/compiler-flags.m4: Obsoleted by gl_WARN_ADD
---
acinclude.m4 | 153 ++++++++++++++++++++++++++------------------------
bootstrap.conf | 2 +
configure.ac | 15 +++--
m4/compiler-flags.m4 | 48 ----------------
4 files changed, 91 insertions(+), 127 deletions(-)
delete mode 100644 m4/compiler-flags.m4
diff --git a/acinclude.m4 b/acinclude.m4
index 838ec46..63bfec7 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1,11 +1,6 @@
dnl
-dnl Taken from gnome-common/macros2/gnome-compiler-flags.m4
-dnl
-dnl We've added:
-dnl -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls
-dnl We've removed
-dnl CFLAGS="$realsave_CFLAGS"
-dnl to avoid clobbering user-specified CFLAGS
+dnl Enable all known GCC compiler warnings, except for those
+dnl we can't yet cope with
dnl
AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
dnl ******************************
@@ -13,90 +8,102 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
dnl ******************************
AC_ARG_ENABLE(compile-warnings,
- [AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
+ [AC_HELP_STRING([--enable-compile-warnings=@<:@no/yes/error@:>@],
[Turn on compiler warnings])],,
- [enable_compile_warnings="m4_default([$1],[maximum])"])
-
- warnCFLAGS=
-
- common_flags=
- common_flags="$common_flags -Wp,-D_FORTIFY_SOURCE=2"
- common_flags="$common_flags -fexceptions"
- common_flags="$common_flags -fasynchronous-unwind-tables"
- common_flags="$common_flags -fdiagnostics-show-option"
+ [enable_compile_warnings="m4_default([$1],[yes])"])
case "$enable_compile_warnings" in
no)
try_compiler_flags=""
;;
- minimum)
- try_compiler_flags="-Wall -Wformat -Wformat-security $common_flags"
- ;;
- yes)
- try_compiler_flags="-Wall -Wformat -Wformat-security -Wmissing-prototypes $common_flags"
- ;;
- maximum|error)
- try_compiler_flags="-Wall -Wformat -Wformat-security"
- try_compiler_flags="$try_compiler_flags -Wmissing-prototypes"
- try_compiler_flags="$try_compiler_flags -Wnested-externs "
- try_compiler_flags="$try_compiler_flags -Wpointer-arith"
- try_compiler_flags="$try_compiler_flags -Wextra -Wshadow"
- try_compiler_flags="$try_compiler_flags -Wcast-align"
- try_compiler_flags="$try_compiler_flags -Wwrite-strings"
- try_compiler_flags="$try_compiler_flags -Waggregate-return"
- try_compiler_flags="$try_compiler_flags -Wstrict-prototypes"
- try_compiler_flags="$try_compiler_flags -Winline"
- try_compiler_flags="$try_compiler_flags -Wredundant-decls"
- try_compiler_flags="$try_compiler_flags -Wno-sign-compare"
- try_compiler_flags="$try_compiler_flags -Wlogical-op"
- try_compiler_flags="$try_compiler_flags $common_flags"
- if test "$enable_compile_warnings" = "error" ; then
- try_compiler_flags="$try_compiler_flags -Werror"
- fi
+ yes|minimum|maximum|error)
+
+ # List of warnings that are not relevant / wanted
+ dontwarn="$dontwarn -Wc++-compat" # Don't care about C++ compiler compat
+ dontwarn="$dontwarn -Wtraditional" # Don't care about ancient C standard compat
+ dontwarn="$dontwarn -Wtraditional-conversion" # Don't care about ancient C standard compat
+ dontwarn="$dontwarn -Wsystem-headers" # Ignore warnings in /usr/include
+ dontwarn="$dontwarn -Wpadded" # Happy for compiler to add struct padding
+ dontwarn="$dontwarn -Wunreachable-code" # GCC very confused with -O2
+ dontwarn="$dontwarn -Wconversion" # Too many to deal with
+ dontwarn="$dontwarn -Wsign-conversion" # Too many to deal with
+ dontwarn="$dontwarn -Wvla" # GNULIB gettext.h violates
+ dontwarn="$dontwarn -Wundef" # Many GNULIB violations
+ dontwarn="$dontwarn -Wcast-qual" # Need to allow bad cast for execve()
+ dontwarn="$dontwarn -Wlong-long" # We need to use long long in many places
+
+ # We might fundamentally need some of these disabled forever, but ideally
+ # we'd turn many of them on
+ dontwarn="$dontwarn -Wformat-nonliteral"
+ dontwarn="$dontwarn -Wswitch-default"
+ dontwarn="$dontwarn -Wswitch-enum"
+ dontwarn="$dontwarn -Wstrict-overflow"
+ dontwarn="$dontwarn -Wfloat-equal"
+ dontwarn="$dontwarn -Wdeclaration-after-statement"
+ dontwarn="$dontwarn -Wunsafe-loop-optimizations"
+ dontwarn="$dontwarn -Wcast-qual"
+ dontwarn="$dontwarn -Wconversion"
+ dontwarn="$dontwarn -Wsign-conversion"
+ dontwarn="$dontwarn -Wold-style-definition"
+ dontwarn="$dontwarn -Wmissing-noreturn"
+ dontwarn="$dontwarn -Wpacked"
+ dontwarn="$dontwarn -Wunused-macros"
+ dontwarn="$dontwarn -W"
+ dontwarn="$dontwarn -Woverlength-strings"
+ dontwarn="$dontwarn -Wmissing-format-attribute"
+ dontwarn="$dontwarn -Wstack-protector"
+
+ # Get all possible GCC warnings
+ gl_MANYWARN_ALL_GCC([maybewarn])
+
+ # Remove the ones we don't want, blacklisted earlier
+ gl_MANYWARN_COMPLEMENT([wantwarn], [$maybewarn], [$dontwarn])
+
+ # Check for $CC support of each warning
+ for w in $wantwarn; do
+ gl_WARN_ADD([$w])
+ done
+
+ # This should be < 256 really, but with PATH_MAX everywhere
+ # we have doom, even with 4096. In fact we have some functions
+ # with several PATH_MAX sized variables :-( We should kill off
+ # all PATH_MAX usage and then lower this limit
+ gl_WARN_ADD([-Wframe-larger-than=20480])
+ dnl gl_WARN_ADD([-Wframe-larger-than=4096])
+ dnl gl_WARN_ADD([-Wframe-larger-than=256])
+
+ # Extra special flags
+ gl_WARN_ADD([-Wp,-D_FORTIFY_SOURCE=2])
+ dnl Fedora only uses -fstack-protector, but doesn't seem to
+ dnl be great overhead in adding -fstack-protector-all instead
+ dnl gl_WARN_ADD([-fstack-protector])
+ gl_WARN_ADD([-fstack-protector-all])
+ gl_WARN_ADD([--param=ssp-buffer-size=4])
+ gl_WARN_ADD([-fexceptions])
+ gl_WARN_ADD([-fasynchronous-unwind-tables])
+ gl_WARN_ADD([-fdiagnostics-show-option])
+
+ if test "$enable_compile_warnings" = "error"
+ then
+ gl_WARN_ADD([-Werror])
+ fi
;;
*)
AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
;;
esac
- COMPILER_FLAGS=
- for option in $try_compiler_flags; do
- gl_COMPILER_FLAGS($option)
- done
- unset option
- unset try_compiler_flags
-
- AC_ARG_ENABLE(iso-c,
- AC_HELP_STRING([--enable-iso-c],
- [Try to warn if code is not ISO C ]),,
- [enable_iso_c=no])
-
- AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
- complCFLAGS=
- if test "x$enable_iso_c" != "xno"; then
- if test "x$GCC" = "xyes"; then
- case " $CFLAGS " in
- *[\ \ ]-ansi[\ \ ]*) ;;
- *) complCFLAGS="$complCFLAGS -ansi" ;;
- esac
- case " $CFLAGS " in
- *[\ \ ]-pedantic[\ \ ]*) ;;
- *) complCFLAGS="$complCFLAGS -pedantic" ;;
- esac
- fi
- fi
- AC_MSG_RESULT($complCFLAGS)
-
- WARN_CFLAGS="$COMPILER_FLAGS $complCFLAGS"
WARN_LDFLAGS=$WARN_CFLAGS
AC_SUBST([WARN_CFLAGS])
AC_SUBST([WARN_LDFLAGS])
dnl Needed to keep compile quiet on python 2.4
- COMPILER_FLAGS=
- gl_COMPILER_FLAGS(-Wno-redundant-decls)
- WARN_PYTHON_CFLAGS=$COMPILER_FLAGS
+ save_WARN_CFLAGS=$WARN_CFLAGS
+ WARN_CFLAGS=
+ gl_WARN_ADD(-Wno-redundant-decls)
+ WARN_PYTHON_CFLAGS=$WARN_CFLAGS
AC_SUBST(WARN_PYTHON_CFLAGS)
+ WARN_CFLAGS=$save_WARN_CFLAGS
])
diff --git a/bootstrap.conf b/bootstrap.conf
index 733c354..e8cdf76 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -45,6 +45,7 @@ ignore-value
inet_pton
ioctl
maintainer-makefile
+manywarnings
mkstemp
mkstemps
mktempd
@@ -80,6 +81,7 @@ timegm
uname
useless-if-before-free
usleep
+warnings
vasprintf
verify
vc-list-files
diff --git a/configure.ac b/configure.ac
index 2378d9a..0b9855b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1970,12 +1970,14 @@ AC_ARG_ENABLE([test-coverage],
enable_coverage=$enableval
if test "${enable_coverage}" = yes; then
- COMPILER_FLAGS=
- gl_COMPILER_FLAGS(-fprofile-arcs)
- gl_COMPILER_FLAGS(-ftest-coverage)
- AC_SUBST([COVERAGE_CFLAGS], [$COMPILER_FLAGS])
- AC_SUBST([COVERAGE_LDFLAGS], [$COMPILER_FLAGS])
- COMPILER_FLAGS=
+ save_WARN_CFLAGS=$WARN_CFLAGS
+ WARN_CFLAGS=
+ gl_WARN_ADD(-fprofile-arcs)
+ gl_WARN_ADD(-ftest-coverage)
+ COVERAGE_FLAGS=$WARN_CFLAGS
+ AC_SUBST([COVERAGE_CFLAGS], [$COVERAGE_FLAGS])
+ AC_SUBST([COVERAGE_LDFLAGS], [$COVERAGE_FLAGS])
+ WARN_CFLAGS=$save_WARN_CFLAGS
fi
AC_ARG_ENABLE([test-oom],
@@ -2538,6 +2540,7 @@ AC_MSG_NOTICE([Miscellaneous])
AC_MSG_NOTICE([])
AC_MSG_NOTICE([ Debug: $enable_debug])
AC_MSG_NOTICE([ Warnings: $enable_compile_warnings])
+AC_MSG_NOTICE([Warning Flags: $WARN_CFLAGS])
AC_MSG_NOTICE([ Readline: $lv_use_readline])
AC_MSG_NOTICE([ Python: $with_python])
AC_MSG_NOTICE([ DTrace: $with_dtrace])
diff --git a/m4/compiler-flags.m4 b/m4/compiler-flags.m4
deleted file mode 100644
index 6db4816..0000000
--- a/m4/compiler-flags.m4
+++ /dev/null
@@ -1,48 +0,0 @@
-# serial 4
-# Find valid warning flags for the C Compiler. -*-Autoconf-*-
-#
-# Copyright (C) 2010 Red Hat, Inc.
-# Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
-
-# Written by Jesse Thilo.
-
-AC_DEFUN([gl_COMPILER_FLAGS],
- [AC_MSG_CHECKING(whether compiler accepts $1)
- ac_save_CFLAGS="$CFLAGS"
- dnl Some flags are dependant, so we set all previously checked
- dnl flags when testing. Except for -Werror which we have to
- dnl check on its own, because some of our compiler flags cause
- dnl warnings from the autoconf test program!
- if test "$1" = "-Werror" ; then
- CFLAGS="$CFLAGS $1"
- else
- CFLAGS="$CFLAGS $COMPILER_FLAGS $1"
- fi
- AC_TRY_LINK([], [], has_option=yes, has_option=no,)
- echo 'int x;' >conftest.c
- $CC $CFLAGS -c conftest.c 2>conftest.err
- ret=$?
- if test $ret != 0 || test -s conftest.err || test $has_option = "no"; then
- AC_MSG_RESULT(no)
- else
- AC_MSG_RESULT(yes)
- COMPILER_FLAGS="$COMPILER_FLAGS $1"
- fi
- CFLAGS="$ac_save_CFLAGS"
- rm -f conftest*
- ])
--
1.7.4
13 years, 7 months
[libvirt] Release of libvirt-0.9.0
by Daniel Veillard
As scheduled, libvirt 0.9.0 was tagged and pushed today, it's
available from FTP at:
ftp://libvirt.org/libvirt/
This is a large release w.r.t. the amount of features and changes,
and well worth bumping the middle version number. We are also getting
closer to a 1.0.0 release !
Features:
- Support cputune cpu usage tuning (Osier Yang and Nikunj A. Dadhania)
- Add public APIs for storage volume upload/download (Daniel P. Berrange)
- Add public API for setting migration speed on the fly (Daniel P. Berrange)
- Add libxenlight driver (Jim Fehlig and Markus Groß)
- qemu: support migration to fd (Eric Blake)
- libvirt: add virDomain{Get,Set}BlkioParameters (Gui Jianfeng)
- setmem: introduce a new libvirt API (virDomainSetMemoryFlags) (Taku Izumi)
- Expose event loop implementation as a public API (Daniel P. Berrange)
- Dump the debug buffer to libvirtd.log on fatal signal (Daniel Veillard)
- Audit support (Eric Blake)
Documentation:
- fix typo (Eric Blake)
- correct invalid xml (Eric Blake)
- virsh: Fix documentation for memtune command (Jiri Denemark)
- Fix several formatting mistakes in doc (Michal Privoznik)
- mention C89 syntax preferences (Eric Blake)
- document recent hook additions (Eric Blake)
- Update on the goal page (Daniel Veillard)
- Document first release with spice and qxl (Cole Robinson)
- Add schema definition for imagelabel (Osier Yang)
- update virGetVersion description (Tiziano Mueller)
- Improve logging documentation including the debug buffer (Daniel Veillard)
- update windows page for initial libvirt 0.8.8 installer (Justin Clift)
- formatdomain.html.in: Fix spelling PIC->PCI (Philipp Hahn)
- fix missing </p> (Eric Blake)
- documenting the 802.1Qbg parameters of a 'direct' interface (Gerhard Stenzel)
- silence warnings about generated API docs (Eric Blake)
- document <driver name='vhost'/> for interfaces (Eric Blake)
- correct range of default NAT subnet (Eric Blake)
- formatdomain: Add release info for disk <driver> attributes (Cole Robinson)
- Fix spelling mistake: seek (Philipp Hahn)
- maint: fix grammar in error message (Eric Blake)
Portability:
- virsh: fix mingw failure on creating nonblocking pipe (Eric Blake)
- Remove iohelper on Win32 since it is not required (Daniel P. Berrange)
- Fix domain events C example on Win32 (Daniel P. Berrange)
- build: fix compilation on mingw (Eric Blake)
- util: use SCM_RIGHTS in virFileOperation when needed (Eric Blake)
- Don't use INT64_MAX in libvirt.h because it requires stdint.h (Matthias Bolte)
- libvirtd: Remove indirect linking (Guido Günther)
- build: avoid compiler warning on cygwin (Eric Blake)
- build: fix build on cygwin (Eric Blake)
- build: fix building error when building without libvirtd (Wen Congyang)
- virsh: Remove indirect link against libxml2 (Guido Günther)
- Fix build on cygwin (Daniel Veillard)
- Add check for kill() to fix build of cgroups on win32 (Daniel P. Berrange)
- build: fix broken mingw cross-compilation (Eric Blake)
Bug fixes:
- fix memory leak in qemuProcessHandleGraphics() (Wen Congyang)
- do not lock vm while allocating memory (Wen Congyang)
- Fix libxl driver startup (Daniel Veillard)
- qemu: Ignore libvirt debug messages in qemu log (Jiri Denemark)
- qemu: Fix improper logic of qemuCgroupSetup (Osier Yang)
- free tmp after unlinking it (Wen Congyang)
- qemu: Fix media eject with qemu-0.12.* (Jiri Denemark)
- check whether qemuMonitorJSONHMP() failed (Wen Congyang)
- do not send monitor command after monitor meet error (Wen Congyang)
- qemu: unlock qemu driver before return from domain save (Hu Tao)
- qemu: fix regression with fd labeling on migration (Eric Blake)
- Ignore return value of virDomainObjUnref (Markus Groß)
- Fix infinite loop in daemon if client quits with multiple streams open (Daniel P. Berrange)
- qemu: fix regression that hangs on save failure (Eric Blake)
- qemu: fix restoring a compressed save image (Eric Blake)
- util: allow clearing cloexec bit (Eric Blake)
- logging: always NUL-terminate circular buffer (Eric Blake)
- tests: don't alter state in $HOME (Eric Blake)
- qemu: don't restore state label twice (Eric Blake)
- Fix syntax error in configure.ac (Osier Yang)
- remote: Don't leak gnutls session on negotiation error (Matthias Bolte)
- hooks: fix regression in previous patch (Eric Blake)
- Add missing { for qemudDomainInterfaceStats (Philipp Hahn)
- daemon: Avoid resetting errors before they are reported (Jiri Denemark)
- fix the check of the output of monitor command 'device_add' (Wen Congyang)
- Make error reporting in libvirtd thread safe (Jiri Denemark)
- update domain status forcibly even if attach a device failed (Wen Congyang)
- util: Fix return value for virJSONValueFromString if it fails (Osier Yang)
- Initialization error of qemuCgroupData in Qemu host usb hotplug (Wen Congyang)
- build: fix missing initializer (Eric Blake)
- Fix uninitialized variable & error reporting in LXC veth setup (Daniel P. Berrange)
- udev: fix regression with qemu:///session (Eric Blake)
- logging: fix off-by-one bug (Eric Blake)
- do not report OOM error when prepareCall() failed (Wen Congyang)
- Don't return an error on failure to create blkio controller (Hu Tao)
- qemu: respect locking rules (Eric Blake)
- openvz: fix a simple bug in openvzListDefinedDomains() (Jean-Baptiste Rouault)
- Fix delayed event delivery when SASL is active (Daniel P. Berrange)
- qemu: Fix copy&paste error messages in text monitor (Jiri Denemark)
- do not unref obj in qemuDomainObjExitMonitor* (Wen Congyang)
- qemu: check driver name while attaching disk (Wen Congyang)
- remote: Add missing virCondDestroy calls (Matthias Bolte)
- build: improve rpm generation for distro backports (Eric Blake)
- storage: Fix a problem which will cause libvirtd crashed (Osier Yang)
- Fix misc bugs in virCommandPtr (Daniel P. Berrange)
- libvirt: fix a simple bug in virDomainSetMemoryFlags() (Taku Izumi)
- qemu: Check the unsigned integer overflow (Osier Yang)
- audit: eliminate potential null pointer deref when auditing macvtap devices (Laine Stump)
- network driver: don't send default route to clients on isolated networks (Laine Stump)
- virsh: Free stream when shutdown console (Osier Yang)
- Add missing checks for read only connections (Guido Günther)
- qemu: fix -global argument usage (Eric Blake)
- Make sure we reset the umask on the error path (Guido Günther)
- qemu: Stop guest CPUs before creating a snapshot (Jiri Denemark)
- qemu: Escape snapshot name passed to {save,load,del}vm (Jiri Denemark)
- qemu: Fix warnings in event handlers (Jiri Denemark)
- storage: Update qemu-img flag checking (Osier Yang)
- Make sure the rundir is accessible by the user (Guido Günther)
- Fix a wrong error message thrown to user (Hu Tao)
- unlock eventLoop before calling callback function (Wen Congyang)
- fixes for several memory leaks (Phil Petty)
- Fix a counter bug in the log buffer (Daniel Veillard)
- qemu: avoid corruption of domain hashtable and misuse of freed domains (Laine Stump)
- qemu: Add missing lock of virDomainObj before calling virDomainUnref (Laine Stump)
- esx: Escape password for XML (Matthias Bolte)
- util: correct retry path in virFileOperation (Eric Blake)
- util: Allow removing hash entries in virHashForEach (Jiri Denemark)
- qemu: avoid double close on domain restore (Eric Blake)
- Fix port value parsing for serial and parallel ports (Michal Novotny)
- Fix off-by-1 in virFileAbsPath. (Daniel P. Berrange)
- security: avoid memory leak (Eric Blake)
- protect the scsi controller to be deleted when it is in use (Wen Congyang)
- virsh: freecell --all getting wrong NUMA nodes count (Michal Privoznik)
- remove duplicated call to reportOOMError (Christophe Fergeau)
Improvements:
- Make check_fc_host() and check_vport_capable() usable as rvalues (Guido Günther)
- maint: avoid locale-sensitivity in string case comparisons (Eric Blake)
- extend logging to record configuration-related changes (Naoya Horiguchi)
- Add libvirt_iohelper to spec file (Daniel Veillard)
- cputune: New tests for cputune XML (Osier Yang)
- cputune: Support cputune for xend driver (Osier Yang)
- cputune: Support cputune for lxc driver (Osier Yang)
- cputune: Support cputune for qemu driver (Osier Yang)
- cputune: Implementations of parsing and formating cputune xml (Osier Yang)
- cputune: Add data structures presenting cputune XML (Osier Yang)
- cputune: Add document for cputune XML (Osier Yang)
- cputune: Add XML schema for cputune xml (Osier Yang)
- qemu: improve error message on failed fd transfer (Eric Blake)
- maint: ignore new built file (Eric Blake)
- Add domainSuspend/Resume to libxl driver (Markus Groß)
- Add domainGetOSType to libxl driver (Markus Groß)
- Add domainGetSchedulerType to libxl driver (Markus Groß)
- Implements domainXMLTo/FromNative in libxl driver (Markus Groß)
- Add vcpu functions to libxl driver (Markus Groß)
- List authors in copyright headers (Markus Groß)
- Add event callbacks to libxl driver (Markus Groß)
- Remote protocol support for storage vol upload/download APIs (Daniel P. Berrange)
- Support volume data upload/download APIs in storage driver (Daniel P. Berrange)
- Add vol-upload and vol-download commands to virsh (Daniel P. Berrange)
- Enhance the streams helper to support plain file I/O (Daniel P. Berrange)
- Update event loop example programs to demonstrate best practice (Daniel P. Berrange)
- qemu: support fd: migration with compression (Eric Blake)
- qemu: skip granting access during fd migration (Eric Blake)
- qemu: consolidate migration to file code (Eric Blake)
- qemu: use common API for reading difficult files (Eric Blake)
- qemu, storage: improve type safety (Eric Blake)
- util: adjust indentation in previous patch (Eric Blake)
- util: rename virFileOperation to virFileOpenAs (Eric Blake)
- storage: simplify fd handling (Eric Blake)
- qemu: simplify domain save fd handling (Eric Blake)
- qemu: allow simple domain save to use fd: protocol (Eric Blake)
- Update of localisations, switch to transifex (Daniel Veillard)
- build: shorten libxenlight summary for consistent alignment (Eric Blake)
- command: add virCommandAbort for cleanup paths (Eric Blake)
- command: don't mix RunAsync and daemons (Eric Blake)
- command: properly diagnose process exit via signal (Eric Blake)
- Add memory functions to libxl driver (Markus Groß)
- build: enforce reference count checking (Eric Blake)
- maint: prohibit access(,X_OK) (Eric Blake)
- Get cpu time and current memory balloon from libxl (Markus Groß)
- build: nuke all .x-sc* files, and fix VPATH syntax-check (Eric Blake)
- command: reject pidfile on non-daemon (Eric Blake)
- rpm: add missing dependencies (Eric Blake)
- rpm: separate runtime and build requirements (Eric Blake)
- qemu: simplify monitor callbacks (Eric Blake)
- 8021Qbh: use preassociate-rr during the migration prepare stage (Roopa Prabhu)
- Wire up virDomainMigrateSetSpeed into QEMU driver (Daniel P. Berrange)
- Wire up virDomainMigrateSetSpeed for the remote RPC driver (Daniel P. Berrange)
- maint: update authors (Eric Blake)
- Disable libxl build in RPM on Fedora < 16 (Daniel P. Berrange)
- qemu: fallback to HMP drive_add/drive_del (Hu Tao)
- qemu: Only use HMP passthrough if it is supported (Jiri Denemark)
- qemu: Detect support for HMP passthrough (Jiri Denemark)
- qemu: add two hook script events "prepare" and "release" (Thibault Vincent)
- qemu: simplify interface fd handling in monitor (Eric Blake)
- qemu: simplify PCI configfd handling in monitor (Eric Blake)
- qemu: simplify monitor fd error handling (Eric Blake)
- util: guarantee sane errno in virFileIsExecutable (Eric Blake)
- Don't build libxenlight driver for Xen 4.0 (Jim Fehlig)
- network driver: log error and abort network startup when radvd isn't found (Laine Stump)
- build: translate changes in previous patch (Eric Blake)
- Ensure binary is resolved wrt $PATH in virExec (Daniel P. Berrange)
- util: Forbid calling hash APIs from iterator callback (Jiri Denemark)
- Avoid taking lock in libvirt debug dump (Daniel Veillard)
- unlock the monitor when unwatching the monitor (Wen Congyang)
- Add vim configuration that makes vim auto-indent code (Hu Tao)
- virsh: fix memtune's help message for swap_hard_limit (Nikunj A. Dadhania)
- Add PCI sysfs reset access (Alex Williamson)
- Support Xen sysctl v8, domctl v7 (Jim Fehlig)
- macvtap: log an error if on failure to connect to netlink socket (Laine Stump)
- qemu: improve efficiency of dd during snapshots (Eric Blake)
- virsh: allow empty string arguments (Eric Blake)
- qemu: Fallback to HMP when cpu_set QMP command is not found (Wen Congyang)
- Change message for VIR_FROM_RPC error domain (Daniel P. Berrange)
- Add compat function for geteuid() (Daniel P. Berrange)
- Add virSetBlocking() to allow O_NONBLOCK to be toggle on or off (Daniel P. Berrange)
- qemu: use more appropriate error (Eric Blake)
- Make LXC container startup/shutdown/I/O more robust (Daniel P. Berrange)
- Allow to dynamically set the size of the debug buffer (Daniel Veillard)
- qemu: consolidate duplicated monitor migration code (Eric Blake)
- qemu: use lighter-weight fd:n on incoming tunneled migration (Eric Blake)
- Fix performance problem of virStorageVolCreateXMLFrom() (Minoru Usui)
- libvirt-guests: avoid globbing when splitting $URIS (Eric Blake)
- libvirt-guest.init: quoting variables (Philipp Hahn)
- virsh: Insert error messages to avoid a quiet abortion of commands (Michal Privoznik)
- python: Use hardcoded python path in libvirt.py (Jiri Denemark)
- virsh: Allow starting domains by UUID (Jiri Denemark)
- network driver: Use a separate dhcp leases file for each network (Laine Stump)
- network driver: Start dnsmasq even if no dhcp ranges/hosts are specified. (Laine Stump)
- libvirt-guest.init: handle domain name with spaces (Philipp Hahn)
- domain.rng vs. formatdomain.html#elementsUSB (Philipp Hahn)
- Ignore backing file errors in FS storage pool (Philipp Hahn)
- remote-protocol: implement new BlkioParameters API (Gui Jianfeng)
- virsh: Adding blkiotune command to virsh tool (Gui Jianfeng)
- qemu: implement new BlkioParameters API (Gui Jianfeng)
- libvirt: implements virDomain{Get,Set}BlkioParameters (Gui Jianfeng)
- setmem: add the new options to "virsh setmem" command (Taku Izumi)
- setmem: implement the remote protocol to address the new API (Taku Izumi)
- setmem: implement the code to address the new API in the qemu driver (Taku Izumi)
- audit: audit use of /dev/net/tun, /dev/tapN, /dev/vhost-net (Eric Blake)
- qemu: don't request cgroup ACL access for /dev/net/tun (Eric Blake)
- qemu: support vhost in attach-interface (Eric Blake)
- qemu: Refactor qemuDomainSnapshotCreateXML (Jiri Denemark)
- qemu: Fallback to HMP for snapshot commands (Jiri Denemark)
- qemu: Setup infrastructure for HMP passthrough (Jiri Denemark)
- qemu: Replace deprecated option of qemu-img (Osier Yang)
- audit: also audit cgroup ACL permissions (Eric Blake)
- cgroup: allow fine-tuning of device ACL permissions (Eric Blake)
- audit: rename remaining qemu audit functions (Eric Blake)
- audit: also audit cgroup controller path (Eric Blake)
- audit: split cgroup audit types to allow more information (Eric Blake)
- audit: tweak audit messages to match conventions (Eric Blake)
- Don't overwrite virRun error messages (Cole Robinson)
- virsh: Change option parsing functions to return tri-state information (Michal Privoznik)
- virsh: change vshCommandOptString return type and fix const-correctness (Michal Privoznik)
- support to detach USB disk (Wen Congyang)
- rename qemuDomainDetachSCSIDiskDevice to qemuDomainDetachDiskDevice (Wen Congyang)
- qemu_hotplug: Reword error if spice password change not available (Cole Robinson)
- Move event code out of the daemon/ into src/util/ (Daniel P. Berrange)
- Convert daemon/virsh over to use primary event APIs, rather than impl (Daniel P. Berrange)
- Cleaning up some of the logging code (Daniel Veillard)
- qemu: Support vram for video of qxl type (Osier Yang)
- Add an an internal API for emergency dump of debug buffer (Daniel Veillard)
- Add logrotate support for libvirtd.log (Daniel Veillard)
- Change default log policy to libvirtd.log instead of syslog (Daniel Veillard)
- Force all logs to go to the round robbin memory buffer (Daniel Veillard)
- AUTHORS: adjust to preferred spelling (KAMEZAWA Hiroyuki)
- Pass virSecurityManagerPtr to virSecurityDAC{Set, Restore}ChardevCallback (Soren Hansen)
- maint: update to latest gnulib (Eric Blake)
- Attempt to improve an error message (Daniel P. Berrange)
- add additional event debug points (Daniel P. Berrange)
- qemu: only request sound cgroup ACL when required (Eric Blake)
- Add support for multiple serial ports into the Xen driver (Michal Novotny)
- Add APIs for killing off processes inside a cgroup (Daniel P. Berrange)
- Allow hash tables to use generic pointers as keys (Daniel P. Berrange)
- Remove deallocator parameter from hash functions (Daniel P. Berrange)
- Make commandtest more robust wrt its execution environment (Daniel P. Berrange)
- audit: audit qemu pci and usb device passthrough (Eric Blake)
- audit: audit qemu memory and vcpu adjusments (Eric Blake)
- audit: add qemu hooks for auditing cgroup events (Eric Blake)
- audit: prepare qemu for listing vm in cgroup audits (Eric Blake)
- cgroup: determine when skipping non-devices (Eric Blake)
- virExec: avoid uninitialized memory usage (Eric Blake)
- Allow 32-on-64 execution for LXC guests (Daniel P. Berrange)
- Put <stdbool.h> into internal.h so it is available everywhere (Daniel P. Berrange)
- qemu: Switch over command line capabilities to virBitmap (Jiri Denemark)
- qemu: Rename qemud\?CmdFlags to qemuCaps (Jiri Denemark)
- qemu: Use helper functions for handling cmd line capabilities (Jiri Denemark)
- qemu: Rename QEMUD_CMD_FLAG_* to QEMU_CAPS_* (Jiri Denemark)
- util: Add API for converting virBitmap into printable string (Jiri Denemark)
- util: Use unsigned long as a base type for virBitmap (Jiri Denemark)
- Expose name + UUID to LXC containers via env variables (Daniel P. Berrange)
- Fix discard of expected errors (Daniel P. Berrange)
- Fix group/mode for /dev/pts inside LXC container (Daniel P. Berrange)
- 802.1Qbh: Delay IFF_UP'ing interface until migration final stage (Roopa Prabhu)
- storage: make debug log more useful (Osier Yang)
- virsh: replace vshPrint with vshPrintExtra for snapshot list Otherwise extra information will be printed even if "--quiet" is specified. (Osier Yang)
- check device-mapper when building with mpath or disk storage driver (Wen Congyang)
- build: add dependency on gnutls-utils (Eric Blake)
- Renamed functions in xenxs (Markus Groß)
- Moved XM formatting functions to xenxs (Markus Groß)
- Moved XM parsing functions to xenxs (Markus Groß)
- Moved SEXPR formatting functions to xenxs (Markus Groß)
- Moved SEXPR parsing functions to xenxs (Markus Groß)
- Moved some SEXPR functions from xen-unified (Markus Groß)
- Moved SEXPR unit to utils (Markus Groß)
- virt-*-validate.in: quote all variable references (Dan Kenigsberg)
- virt-pki-validate: behave when CERTTOOL is missing (Dan Kenigsberg)
- autobuild.sh: use VPATH build (Eric Blake)
- maint: fix 'make dist' in VPATH build (Eric Blake)
- build: don't require pod2man for tarball builds (Eric Blake)
- hash: make virHashFree more free-like (Eric Blake)
- build: Fix API docs generation in VPATH build (Jiri Denemark)
- Remove all object hashtable caches from virConnectPtr (Daniel P. Berrange)
- nwfilter: enable rejection of packets (Stefan Berger)
- Drop empty argument from dnsmasq call (Guido Günther)
- esx: Ignore malformed host UUID from BIOS (Matthias Bolte)
- build: speed up non-maintainer builds (Eric Blake)
- build: recompute symbols after changing configure options (Eric Blake)
- Requires gettext for client package (Osier Yang)
- Do not add drive 'boot=on' param when a kernel is specified (Jim Fehlig)
- factor common code in virHashAddEntry and virHashUpdateEntry (Christophe Fergeau)
- add hash table rebalancing in virHashUpdateEntry (Christophe Fergeau)
- hash: modernize debug code (Eric Blake)
- build: improve 'make install' for VPATH builds (Eric Blake)
- check more error info about whether drive_add failed (Wen Congyang)
- logging: make VIR_ERROR and friends preserve errno (Eric Blake)
- maint: avoid 'make syntax-check' from tarball (Eric Blake)
- Give each virtual network bridge its own fixed MAC address (Laine Stump)
- Allow brAddTap to create a tap device that is down (Laine Stump)
- Add txmode attribute to interface XML for virtio backend (Laine Stump)
- Restructure domain struct interface "driver" data for easier expansion (Laine Stump)
- build: Fix VPATH build (Jiri Denemark)
- storage: Allow to delete device mapper disk partition (Osier Yang)
Cleanups:
- The next release is 0.9.0 not 0.8.9 (Daniel Veillard)
- maint: use space, not tab, in remote_protocol-structs (Eric Blake)
- Remove the Open Nebula driver (Daniel P. Berrange)
- domain_conf: drop unused ref-count in snapshot object (Eric Blake)
- Update the set of maintainers for the project (Daniel Veillard)
- Make virDomainObjParseNode() static (Hu Tao)
- maint: make spacing in .sh files easier (Eric Blake)
- network driver: Fix indentation from previous commit (Laine Stump)
- qemu: Rename qemuMonitorCommandWithHandler as qemuMonitorText* (Jiri Denemark)
- qemu: Rename qemuMonitorCommand{,WithFd} as qemuMonitorHMP* (Jiri Denemark)
- maint: avoid long lines in more tests (Eric Blake)
- maint: kill all remaining uses of old DEBUG macro (Eric Blake)
- maint: Expand tabs in python code (Jiri Denemark)
- remove space between function name and ( (Christophe Fergeau)
- don't check for NULL before calling virHashFree (Christophe Fergeau)
- remove no longer needed calls to virReportOOMError (Christophe Fergeau)
- Move all the QEMU migration code to a new file (Daniel P. Berrange)
- Split all QEMU process mangement code into separate file (Daniel P. Berrange)
Thanks to everybody who helped one way or another for this release !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
13 years, 7 months
[libvirt] FYI, "Unable to create cgroup for ..."
by Jim Meyering
In case someone else encounters this...
Today none of my VMs would start on F15:
# virsh create rawhide.xml
error: Failed to create domain from rawhide.xml
error: Unable to create cgroup for rawhide: No such file or directory
Luckily, I noticed that Rich Jones had the same problem
a week ago and he found that restarting libvirtd was enough
to solve the problem:
# service libvirtd restart
That did it for me, too.
13 years, 7 months
[libvirt] [libvirt-php] Fixed set_error when argument is NULL
by Lyre
Avoid freeing a NULL pointer
---
src/libvirt-php.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/libvirt-php.c b/src/libvirt-php.c
index 6a76f45..66b1de9 100644
--- a/src/libvirt-php.c
+++ b/src/libvirt-php.c
@@ -237,12 +237,16 @@ PHP_MINFO_FUNCTION(libvirt)
*/
void set_error(char *msg TSRMLS_DC)
{
- if (msg == NULL) {
+ if (LIBVIRT_G (last_error) != NULL)
+ {
efree(LIBVIRT_G (last_error));
+ }
+
+ if (msg == NULL) {
+ LIBVIRT_G (last_error) = NULL;
return;
}
php_error_docref(NULL TSRMLS_CC, E_WARNING,"%s",msg);
- if (LIBVIRT_G (last_error)!=NULL) efree(LIBVIRT_G (last_error));
LIBVIRT_G (last_error)=estrndup(msg,strlen(msg));
}
--
1.7.3.4
�
13 years, 7 months