[libvirt] [PATCH] Fix a compile warning in parthelper.c
by Chris Lalancette
Signed-off-by: Chris Lalancette <clalance(a)redhat.com>
---
src/storage/parthelper.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/storage/parthelper.c b/src/storage/parthelper.c
index 5df46e8..ab04842 100644
--- a/src/storage/parthelper.c
+++ b/src/storage/parthelper.c
@@ -34,6 +34,7 @@
#include <parted/parted.h>
#include <stdio.h>
+#include <string.h>
/* we don't need to include the full internal.h just for this */
#define STREQ(a,b) (strcmp((a),(b)) == 0)
--
1.6.6
14 years, 11 months
[libvirt] [PATCH] Add docs about new mailing list
by Daniel P. Berrange
* docs/contact.html.in: Document new users mailing list
---
docs/contact.html.in | 43 ++++++++++++++++++++++++++++++++++++-------
1 files changed, 36 insertions(+), 7 deletions(-)
diff --git a/docs/contact.html.in b/docs/contact.html.in
index 5d055b1..3a0d439 100644
--- a/docs/contact.html.in
+++ b/docs/contact.html.in
@@ -3,15 +3,44 @@
<body>
<h1>Contacting the development team</h1>
- <h2>Mailing list</h2>
+ <h2>Mailing lists</h2>
<p>
- There is a mailing-list <a href="mailto:libvir-list@redhat.com">libvir-list(a)redhat.com</a> for libvirt,
- with an <a href="https://www.redhat.com/archives/libvir-list/">on-line archive</a>.
- Please subscribe to this list before posting by visiting the
- <a href="https://www.redhat.com/mailman/listinfo/libvir-list">associated Web</a>
- page and follow the instructions. Patches with explanations and provided as
- attachments are really appreciated and will be discussed on the mailing list.
+ There are two mailing-lists:
+ </p>
+
+ <dl>
+ <dt><a href="https://www.redhat.com/archives/libvir-list/">libvir-list(a)redhat.com</a></dt>
+ <dd>This list a place for discussions about the <strong>development</strong> of libvirt. Topics for discussion include
+ <ul>
+ <li>New features for libvirt</li>
+ <li>Bug fixing of libvirt</li>
+ <li>New hypervisor drivers</li>
+ <li>Development of language bindings for libvirt API</li>
+ <li>Testing and documentation of libvirt</li>
+ </ul>
+ </dd>
+
+ <dt><a href="">libvirt-users(a)redhat.com</a></dt>
+ <dd>This list a place for discussions involving libvirt <strong>users</strong>. Topics for discussion include
+ <ul>
+ <li>Usage of libvirt / virsh</li>
+ <li>Administration of libvirtd</li>
+ <li>Deployment of libvirt with hypervisors</li>
+ <li>Development of applications on top of / using the libvirt API(s)</li>
+ <li>Any other topics along these lines</li>
+ </ul>
+ </dd>
+ </dl>
+
+ <p>
+ Both mailing lists require that you <strong>subscribe before posting to the list</strong>,
+ otherwise your posting will be blocked by mailman. You can subscribe at the linked webpages
+ above.
+ </p>
+ <p>
+ Patches with explanations and provided as attachments are really appreciated and should
+ be directed to the development mailing list will be discussed on the mailing list.
If possible generate the patches by using <code>git diff</code> in a GIT
clone.
</p>
--
1.6.2.5
14 years, 11 months
[libvirt] [PATCH] domMemoryStats / qemu: Fix parsing of unknown stats
by Adam Litke
Fix a small problem with the qemu memory stats parsing algorithm. If qemu
reports a stat that libvirt does not recognize, skip past it so parsing can
continue. This corrects a potential infinite loop in the parsing code that can
only be triggered if new statistics are added to qemu.
Signed-off-by: Adam Litke <agl(a)us.ibm.com>
---
src/qemu/qemu_monitor_text.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
index 5b9ced2..87cf972 100644
--- a/src/qemu/qemu_monitor_text.c
+++ b/src/qemu/qemu_monitor_text.c
@@ -507,7 +507,11 @@ static int qemuMonitorParseExtraBalloonInfo(char *text,
",total_mem=", &stats[nr_stats_found]))
nr_stats_found++;
- /* Skip to the next label */
+ /* Skip to the next label. When *p is ',' the last match attempt
+ * failed so try to match the next ','.
+ */
+ if (*p == ',')
+ p++;
p = strchr (p, ',');
if (!p) break;
}
--
1.6.5
14 years, 11 months
[libvirt] [PATCH] fix "make distcheck" failure
by Jim Meyering
Yet another.
While testing the preceding patch,
I saw a new test failure:
....../w/co/libvirt/libvirt-0.7.5/tests/qemuhelpdata/qemu-0.12.1: \
failed to open: No such file or directory
! 7 FAIL
FAIL: qemuhelptest
>From 2c8eb68969737a90998244abfae1a286c92f47e0 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering(a)redhat.com>
Date: Thu, 21 Jan 2010 15:24:15 +0100
Subject: [PATCH] fix "make distcheck" failure
* tests/Makefile.am (qemuhelpdata): Add qemu-0.12.1.
---
tests/Makefile.am | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 584bdb3..090b320 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -42,8 +42,9 @@ LDADDS = \
qemuhelpdata = \
kvm-74 \
kvm-86 \
- qemu-0.10.5 \
qemu-0.9.1 \
+ qemu-0.10.5 \
+ qemu-0.12.1 \
qemu-kvm-0.10.5 \
qemu-kvm-0.11.0-rc2
--
1.6.6.513.g63f4c
14 years, 11 months
[libvirt] another FYI [PATCH] avoid more format-related warnings
by Jim Meyering
>From d47b6e54fd2be922eaa168f149083b7c8588b218 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering(a)redhat.com>
Date: Thu, 21 Jan 2010 15:12:12 +0100
Subject: [PATCH] avoid more format-related warnings
* src/qemu/qemu_conf.c (qemuBuildDriveStr): Use "%s".
* src/qemu/qemu_monitor_json.c (qemuMonitorJSONGetGuestPCIAddress):
(qemuMonitorJSONGetGuestDriveAddress): Likewise.
---
src/qemu/qemu_conf.c | 2 +-
src/qemu/qemu_monitor_json.c | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 3cdb0df..c843c6a 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -1896,7 +1896,7 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk,
* to have > 1 bus on a SCSI controller (yet). */
if (disk->info.addr.drive.bus != 0) {
qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
- _("SCSI controller only supports 1 bus"));
+ "%s", _("SCSI controller only supports 1 bus"));
goto error;
}
busid = disk->info.addr.drive.controller;
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index cfea376..57e2ad9 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -1,7 +1,7 @@
/*
* qemu_monitor_json.c: interaction with QEMU monitor console
*
- * Copyright (C) 2006-2009 Red Hat, Inc.
+ * Copyright (C) 2006-2010 Red Hat, Inc.
* Copyright (C) 2006 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
@@ -1235,7 +1235,7 @@ qemuMonitorJSONGetGuestPCIAddress(virJSONValuePtr reply,
}
if (virJSONValueObjectGetNumberUint(addr, "function", &guestAddr->function) < 0) {
- qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
+ qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "%s",
_("pci_add reply was missing device function number"));
return -1;
}
@@ -1531,19 +1531,19 @@ qemuMonitorJSONGetGuestDriveAddress(virJSONValuePtr reply,
addr = virJSONValueObjectGet(reply, "return");
if (!addr || addr->type != VIR_JSON_TYPE_OBJECT) {
- qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
+ qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "%s",
_("drive_add reply was missing device address"));
return -1;
}
if (virJSONValueObjectGetNumberUint(addr, "bus", &driveAddr->bus) < 0) {
- qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
+ qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "%s",
_("drive_add reply was missing device bus number"));
return -1;
}
if (virJSONValueObjectGetNumberUint(addr, "unit", &driveAddr->unit) < 0) {
- qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
+ qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "%s",
_("drive_add reply was missing device unit number"));
return -1;
}
--
1.6.6.513.g63f4c
14 years, 11 months
[libvirt] FYI, [PATCH] avoid format-related warnings
by Jim Meyering
Testing something unrelated, I saw these warnings:
../../src/conf/domain_conf.c: In function 'virDomainDeviceInfoParseXML':
../../src/conf/domain_conf.c:1120:9: warning: format not a string literal and no format arguments
../../src/conf/domain_conf.c:1138:9: warning: format not a string literal and no format arguments
Here's the patch I'll push shortly.
No ACK required.
>From 885f88c513d7d5004efca4899bfbced78536f371 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering(a)redhat.com>
Date: Thu, 21 Jan 2010 14:39:42 +0100
Subject: [PATCH] avoid format-related warnings
* src/conf/domain_conf.c (virDomainDeviceInfoParseXML): Use "%s".
---
src/conf/domain_conf.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 27f6f84..74c2337 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -1118,7 +1118,7 @@ virDomainDeviceInfoParseXML(virConnectPtr conn,
}
} else {
virDomainReportError(conn, VIR_ERR_INTERNAL_ERROR,
- _("No type specified for device address"));
+ "%s", _("No type specified for device address"));
goto cleanup;
}
@@ -1136,7 +1136,7 @@ virDomainDeviceInfoParseXML(virConnectPtr conn,
default:
/* Should not happen */
virDomainReportError(conn, VIR_ERR_INTERNAL_ERROR,
- _("Unknown device address type"));
+ "%s", _("Unknown device address type"));
goto cleanup;
}
--
1.6.6.513.g63f4c
14 years, 11 months
[libvirt] [PATCH] Let make fail when XHTML validation fails
by Jiri Denemark
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
docs/Makefile.am | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/docs/Makefile.am b/docs/Makefile.am
index eaac627..4df5154 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -108,7 +108,7 @@ ChangeLog.html.in: ChangeLog.xml ChangeLog.xsl
@(if [ -x $(XMLLINT) -a -x $(XMLCATALOG) ] ; then \
if $(XMLCATALOG) /etc/xml/catalog "-//W3C//DTD XHTML 1.0 Strict//EN" > /dev/null ; then \
echo "Validating $@" ; \
- $(XMLLINT) --nonet --format --valid $< > $@ || : ; \
+ $(XMLLINT) --nonet --format --valid $< > $@ || (rm $@ && exit 1) ; \
else echo "missing XHTML1 DTD" ; fi ; fi );
--
1.6.6
14 years, 11 months
[libvirt] [PATCH] Fix uses of virFileMakePath.
by Laine Stump
When I modified the use of virFileMakePath in my own code, I noticed
that it was checking for a return < 0 to indicate error, but I had
seen in virFileMakePath that it returns 0 for success, or the value of
errno on failure, and errno is usually (always?) >=0. Seeing incorrect
usage in one place, I investigated and found several others.
---
src/lxc/lxc_container.c | 10 +++++-----
src/lxc/lxc_controller.c | 2 +-
src/lxc/lxc_driver.c | 2 +-
src/network/bridge_driver.c | 4 ++--
src/qemu/qemu_driver.c | 8 ++++----
src/uml/uml_driver.c | 4 ++--
6 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index 023d553..539a1f4 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -317,7 +317,7 @@ static int lxcContainerPivotRoot(virDomainFSDefPtr root)
goto err;
}
- if ((rc = virFileMakePath(oldroot)) < 0) {
+ if ((rc = virFileMakePath(oldroot)) != 0) {
virReportSystemError(NULL, rc,
_("Failed to create %s"),
oldroot);
@@ -339,7 +339,7 @@ static int lxcContainerPivotRoot(virDomainFSDefPtr root)
goto err;
}
- if ((rc = virFileMakePath(newroot)) < 0) {
+ if ((rc = virFileMakePath(newroot)) != 0) {
virReportSystemError(NULL, rc,
_("Failed to create %s"),
newroot);
@@ -407,7 +407,7 @@ static int lxcContainerMountBasicFS(virDomainFSDefPtr root)
}
for (i = 0 ; i < ARRAY_CARDINALITY(mnts) ; i++) {
- if (virFileMakePath(mnts[i].dst) < 0) {
+ if (virFileMakePath(mnts[i].dst) != 0) {
virReportSystemError(NULL, errno,
_("Failed to mkdir %s"),
mnts[i].src);
@@ -421,7 +421,7 @@ static int lxcContainerMountBasicFS(virDomainFSDefPtr root)
}
}
- if ((rc = virFileMakePath("/dev/pts") < 0)) {
+ if ((rc = virFileMakePath("/dev/pts") != 0)) {
virReportSystemError(NULL, rc, "%s",
_("Cannot create /dev/pts"));
goto cleanup;
@@ -510,7 +510,7 @@ static int lxcContainerMountNewFS(virDomainDefPtr vmDef)
return -1;
}
- if (virFileMakePath(vmDef->fss[i]->dst) < 0) {
+ if (virFileMakePath(vmDef->fss[i]->dst) != 0) {
virReportSystemError(NULL, errno,
_("Failed to create %s"),
vmDef->fss[i]->dst);
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 3cecdce..6304815 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -556,7 +556,7 @@ lxcControllerRun(virDomainDefPtr def,
goto cleanup;
}
- if (virFileMakePath(devpts) < 0) {
+ if (virFileMakePath(devpts) != 0) {
virReportSystemError(NULL, errno,
_("Failed to make path %s"),
devpts);
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index ec5ee6b..d78f7f7 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -1193,7 +1193,7 @@ static int lxcVmStart(virConnectPtr conn,
char **veths = NULL;
lxcDomainObjPrivatePtr priv = vm->privateData;
- if ((r = virFileMakePath(driver->logDir)) < 0) {
+ if ((r = virFileMakePath(driver->logDir)) != 0) {
virReportSystemError(conn, r,
_("Cannot create log directory '%s'"),
driver->logDir);
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 4385215..08e5ee6 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -539,13 +539,13 @@ dhcpStartDhcpDaemon(virConnectPtr conn,
return -1;
}
- if ((err = virFileMakePath(NETWORK_PID_DIR)) < 0) {
+ if ((err = virFileMakePath(NETWORK_PID_DIR)) != 0) {
virReportSystemError(conn, err,
_("cannot create directory %s"),
NETWORK_PID_DIR);
return -1;
}
- if ((err = virFileMakePath(NETWORK_STATE_DIR)) < 0) {
+ if ((err = virFileMakePath(NETWORK_STATE_DIR)) != 0) {
virReportSystemError(conn, err,
_("cannot create directory %s"),
NETWORK_STATE_DIR);
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 951e033..fa2e5d3 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -1033,19 +1033,19 @@ qemudStartup(int privileged) {
goto out_of_memory;
}
- if (virFileMakePath(qemu_driver->stateDir) < 0) {
+ if (virFileMakePath(qemu_driver->stateDir) != 0) {
char ebuf[1024];
VIR_ERROR(_("Failed to create state dir '%s': %s"),
qemu_driver->stateDir, virStrerror(errno, ebuf, sizeof ebuf));
goto error;
}
- if (virFileMakePath(qemu_driver->libDir) < 0) {
+ if (virFileMakePath(qemu_driver->libDir) != 0) {
char ebuf[1024];
VIR_ERROR(_("Failed to create lib dir '%s': %s"),
qemu_driver->libDir, virStrerror(errno, ebuf, sizeof ebuf));
goto error;
}
- if (virFileMakePath(qemu_driver->cacheDir) < 0) {
+ if (virFileMakePath(qemu_driver->cacheDir) != 0) {
char ebuf[1024];
VIR_ERROR(_("Failed to create cache dir '%s': %s"),
qemu_driver->cacheDir, virStrerror(errno, ebuf, sizeof ebuf));
@@ -2782,7 +2782,7 @@ static int qemudStartVMDaemon(virConnectPtr conn,
vm->def->graphics[0]->data.vnc.port = port;
}
- if (virFileMakePath(driver->logDir) < 0) {
+ if (virFileMakePath(driver->logDir) != 0) {
virReportSystemError(conn, errno,
_("cannot create log directory %s"),
driver->logDir);
diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
index b808090..31cea5c 100644
--- a/src/uml/uml_driver.c
+++ b/src/uml/uml_driver.c
@@ -419,7 +419,7 @@ umlStartup(int privileged) {
goto error;
}
- if (virFileMakePath(uml_driver->monitorDir) < 0) {
+ if (virFileMakePath(uml_driver->monitorDir) != 0) {
char ebuf[1024];
VIR_ERROR(_("Failed to create monitor directory %s: %s"),
uml_driver->monitorDir, virStrerror(errno, ebuf, sizeof ebuf));
@@ -840,7 +840,7 @@ static int umlStartVMDaemon(virConnectPtr conn,
return -1;
}
- if (virFileMakePath(driver->logDir) < 0) {
+ if (virFileMakePath(driver->logDir) != 0) {
virReportSystemError(conn, errno,
_("cannot create log directory %s"),
driver->logDir);
--
1.6.6
14 years, 11 months