[libvirt] [PATCH] qemuDomainBlockStatsFlags: Guard disk lookup with a domain job
by Michal Privoznik
When there are two concurrent threads, we may dereference a NULL
pointer, even though it has been checked before:
1. Thread1: starts executing qemuDomainBlockStatsFlags() with nparams != 0.
It finds given disk and successfully pass check for disk->info.alias
not being NULL.
2. Thread2: starts executing qemuDomainDetachDeviceFlags() on the very same
disk as Thread1 is working on.
3. Thread1: gets to qemuDomainObjBeginJob() where it sets a job on a
domain.
4. Thread2: also tries to set a job. However, we are not guaranteed which
thread wins. So assume it's Thread2 who can continue.
5. Thread2: does the actual detach and frees disk->info.alias
6. Thread2: quits the job
7. Thread1: now successfully acquires the job, and accesses a NULL pointer.
---
src/qemu/qemu_driver.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 32b0522..f4bbd74 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -8496,17 +8496,20 @@ qemuDomainBlockStatsFlags(virDomainPtr dom,
if (!(vm = qemuDomObjFromDomain(dom)))
goto cleanup;
+ if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_QUERY) < 0)
+ goto cleanup;
+
if (!virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_OPERATION_INVALID,
"%s", _("domain is not running"));
- goto cleanup;
+ goto endjob;
}
if (*nparams != 0) {
if ((i = virDomainDiskIndexByName(vm->def, path, false)) < 0) {
virReportError(VIR_ERR_INVALID_ARG,
_("invalid path: %s"), path);
- goto cleanup;
+ goto endjob;
}
disk = vm->def->disks[i];
@@ -8514,22 +8517,13 @@ qemuDomainBlockStatsFlags(virDomainPtr dom,
virReportError(VIR_ERR_INTERNAL_ERROR,
_("missing disk device alias name for %s"),
disk->dst);
- goto cleanup;
+ goto endjob;
}
}
priv = vm->privateData;
VIR_DEBUG("priv=%p, params=%p, flags=%x", priv, params, flags);
- if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_QUERY) < 0)
- goto cleanup;
-
- if (!virDomainObjIsActive(vm)) {
- virReportError(VIR_ERR_OPERATION_INVALID,
- "%s", _("domain is not running"));
- goto endjob;
- }
-
qemuDomainObjEnterMonitor(driver, vm);
tmp = *nparams;
ret = qemuMonitorGetBlockStatsParamsNumber(priv->mon, nparams);
--
1.8.1.5
11 years, 9 months
[libvirt] [PATCH] Fix starting qemu instances when apparmor driver is enabled
by Jim Fehlig
With the apparmor security driver enabled, qemu instances fail
to start
# grep ^security_driver /etc/libvirt/qemu.conf
security_driver = "apparmor"
# virsh start test-kvm
error: Failed to start domain test-kvm
error: internal error security label already defined for VM
The model field of virSecurityLabelDef object is always populated
by virDomainDefGetSecurityLabelDef(), so remove the check for a
NULL model when verifying if a label is already defined for the
instance.
Checking for a NULL model and populating it later in
AppArmorGenSecurityLabel() has been left in the code to be
consistent with virSecuritySELinuxGenSecurityLabel().
---
src/security/security_apparmor.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/security/security_apparmor.c b/src/security/security_apparmor.c
index ddc1fe4..2e6a57f 100644
--- a/src/security/security_apparmor.c
+++ b/src/security/security_apparmor.c
@@ -436,8 +436,7 @@ AppArmorGenSecurityLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
return rc;
}
- if ((secdef->label) ||
- (secdef->model) || (secdef->imagelabel)) {
+ if (secdef->label || secdef->imagelabel) {
virReportError(VIR_ERR_INTERNAL_ERROR,
"%s",
_("security label already defined for VM"));
@@ -461,8 +460,7 @@ AppArmorGenSecurityLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
goto err;
}
- secdef->model = strdup(SECURITY_APPARMOR_NAME);
- if (!secdef->model) {
+ if (!secdef->model && !(secdef->model = strdup(SECURITY_APPARMOR_NAME))) {
virReportOOMError();
goto err;
}
--
1.8.0.1
11 years, 9 months
[libvirt] [PATCH] util: distinguish get{pw|gr}nam_r error from the "not found" cases
by Guannan Ren
manpage:
"If no matching record was found, these functions return 0 and
store NULL in *result. In case of error, an error number is returned,
and NULL is stored in *result."
So we can distinguish function error from "no found" cases based on
the return value.
---
src/util/virutil.c | 46 ++++++++++++++++++++++++----------------------
1 file changed, 24 insertions(+), 22 deletions(-)
diff --git a/src/util/virutil.c b/src/util/virutil.c
index 4605c78..9a4682e 100644
--- a/src/util/virutil.c
+++ b/src/util/virutil.c
@@ -2532,6 +2532,7 @@ virGetUserIDByName(const char *name, uid_t *uid)
goto cleanup;
}
+ errno = 0;
while ((rc = getpwnam_r(name, &pwbuf, strbuf, strbuflen, &pw)) == ERANGE) {
if (VIR_RESIZE_N(strbuf, strbuflen, strbuflen, strbuflen) < 0) {
virReportOOMError();
@@ -2540,16 +2541,11 @@ virGetUserIDByName(const char *name, uid_t *uid)
}
if (!pw) {
- if (rc != 0) {
- char buf[1024];
- /* log the possible error from getpwnam_r. Unfortunately error
- * reporting from this function is bad and we can't really
- * rely on it, so we just report that the user wasn't found */
- VIR_WARN("User record for user '%s' was not found: %s",
- name, virStrerror(rc, buf, sizeof(buf)));
- }
-
- ret = 1;
+ if (rc == 0)
+ ret = 1;
+ else
+ virReportSystemError(errno = rc,
+ _("cannot getpwnam_r(%s)"), name);
goto cleanup;
}
@@ -2577,8 +2573,13 @@ virGetUserID(const char *user, uid_t *uid)
user++;
} else {
int rc = virGetUserIDByName(user, uid);
- if (rc <= 0)
+ if (rc > 0) {
+ virReportError(VIR_ERR_INVALID_ARG,
+ _("User '%s' was not found"), user);
+ return -1;
+ } else {
return rc;
+ }
}
if (virStrToLong_ui(user, NULL, 10, &uint_uid) < 0 ||
@@ -2616,6 +2617,7 @@ virGetGroupIDByName(const char *name, gid_t *gid)
goto cleanup;
}
+ errno = 0;
while ((rc = getgrnam_r(name, &grbuf, strbuf, strbuflen, &gr)) == ERANGE) {
if (VIR_RESIZE_N(strbuf, strbuflen, strbuflen, strbuflen) < 0) {
virReportOOMError();
@@ -2624,16 +2626,11 @@ virGetGroupIDByName(const char *name, gid_t *gid)
}
if (!gr) {
- if (rc != 0) {
- char buf[1024];
- /* log the possible error from getgrnam_r. Unfortunately error
- * reporting from this function is bad and we can't really
- * rely on it, so we just report that the user wasn't found */
- VIR_WARN("Group record for user '%s' was not found: %s",
- name, virStrerror(rc, buf, sizeof(buf)));
- }
-
- ret = 1;
+ if (rc == 0)
+ ret = 1;
+ else
+ virReportSystemError(errno = rc,
+ _("cannot getgrnam_r(%s)"), name);
goto cleanup;
}
@@ -2661,8 +2658,13 @@ virGetGroupID(const char *group, gid_t *gid)
group++;
} else {
int rc = virGetGroupIDByName(group, gid);
- if (rc <= 0)
+ if (rc > 0) {
+ virReportError(VIR_ERR_INVALID_ARG,
+ _("Group '%s' was not found"), group);
+ return -1;
+ } else {
return rc;
+ }
}
if (virStrToLong_ui(group, NULL, 10, &uint_gid) < 0 ||
--
1.7.11.2
11 years, 9 months
[libvirt] [PATCH 1/3] Add method for checking if a string is (probably) a log message
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
When reading log output from QEMU/LXC we need to skip over any
libvirt log messages. Currently the QEMU driver checks for a
fixed string, but this is better done with a regex. Add a method
virLogProbablyLogMessage to do a regex check
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/libvirt_private.syms | 1 +
src/util/virlog.c | 37 +++++++++++++++++++++++++++++++++++++
src/util/virlog.h | 3 +++
3 files changed, 41 insertions(+)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index ed46479..599b71e 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1429,6 +1429,7 @@ virLogMessage;
virLogParseDefaultPriority;
virLogParseFilters;
virLogParseOutputs;
+virLogProbablyLogMessage;
virLogReset;
virLogSetBufferSize;
virLogSetDefaultPriority;
diff --git a/src/util/virlog.c b/src/util/virlog.c
index 24ec9d3..6a1adca 100644
--- a/src/util/virlog.c
+++ b/src/util/virlog.c
@@ -32,6 +32,7 @@
#include <unistd.h>
#include <signal.h>
#include <execinfo.h>
+#include <regex.h>
#if HAVE_SYSLOG_H
# include <syslog.h>
#endif
@@ -75,6 +76,17 @@ static char *virLogBuffer = NULL;
static int virLogLen = 0;
static int virLogStart = 0;
static int virLogEnd = 0;
+static regex_t *virLogRegex = NULL;
+
+
+#define VIR_LOG_DATE_REGEX "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]"
+#define VIR_LOG_TIME_REGEX "[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]+[0-9][0-9][0-9][0-9]"
+#define VIR_LOG_PID_REGEX "[0-9]+"
+#define VIR_LOG_LEVEL_REGEX "debug|info|warning|error"
+
+#define VIR_LOG_REGEX \
+ VIR_LOG_DATE_REGEX " " VIR_LOG_TIME_REGEX ": " \
+ VIR_LOG_PID_REGEX ": " VIR_LOG_LEVEL_REGEX " : "
/*
* Filters are used to refine the rules on what to keep or drop
@@ -209,6 +221,12 @@ virLogOnceInit(void)
virLogStart = 0;
virLogEnd = 0;
virLogDefaultPriority = VIR_LOG_DEFAULT;
+
+ if (VIR_ALLOC(virLogRegex) >= 0) {
+ if (regcomp(virLogRegex, VIR_LOG_REGEX, REG_EXTENDED) != 0)
+ VIR_FREE(virLogRegex);
+ }
+
virLogUnlock();
if (pbm)
VIR_WARN("%s", pbm);
@@ -1587,3 +1605,22 @@ virLogSetFromEnv(void)
if (debugEnv && *debugEnv)
virLogParseOutputs(debugEnv);
}
+
+
+/*
+ * Returns a true value if the first line in @str is
+ * probably a log message generated by the libvirt
+ * logging layer
+ */
+bool virLogProbablyLogMessage(const char *str)
+{
+ bool ret = false;
+ if (!virLogRegex)
+ return false;
+ virLogLock();
+ if (regexec(virLogRegex, str, 0, NULL, 0) == 0)
+ ret = true;
+ virLogUnlock();
+ VIR_ERROR("CHeck [%s]", str);
+ return ret;
+}
diff --git a/src/util/virlog.h b/src/util/virlog.h
index aa81d6a..6b83245 100644
--- a/src/util/virlog.h
+++ b/src/util/virlog.h
@@ -188,4 +188,7 @@ extern void virLogVMessage(virLogSource src,
va_list vargs) ATTRIBUTE_FMT_PRINTF(7, 0);
extern int virLogSetBufferSize(int size);
extern void virLogEmergencyDumpAll(int signum);
+
+bool virLogProbablyLogMessage(const char *str);
+
#endif
--
1.7.11.7
11 years, 9 months
[libvirt] [PATCHv2 00/21] Driver XML conf adjustment callbacks [READ FIRST]
by Peter Krempa
This series implements the driver XML parsing callbacks as
Dan suggested.
This series may appear to be monstrous but I chose to split some patches
to separate ones although the code does not compile afterwards to ease review.
The patches starting with the word "fix" will need to be squashed into the
non "fix" patches predceeding them.
The last patch demonstrates the use of this code to get rid of the rest
of the irrelevant fields in virCaps. I didn't go further with those
to save time if there's a design flaw in the callback stuff.
Peter Krempa (21):
virCaps: conf: start splitting out irrelevat data
fix fallout in src/conf/
fix fallout in src/esx
fix fallout in src/lxc
fix fallout in src/openvz
fix fallout in src/parallels
fix fallout in phyp driver
fix fallout in src/qemu/
fix fallout in tests/
fix fallout in src/xen
fix fallout in src/vmware
fix fallout in src/uml
fix fallout in test driver
fix fallout in vbox driver
conf: Add separate defaults addition and validation for XML parsing
fix fallout from adding new parameter to internal APIs
conf: Add argument to support use of the driver adjust callbacks
qemu: Implement the device parse callback and use it for interfaces
fix fallout of the change of the network device default
conf: Move validation of domain title
virCaps: get rid of "defaultInitPath" value in the virCaps struct
src/Makefile.am | 2 +
src/conf/capabilities.h | 9 +-
src/conf/domain_conf.c | 322 +++++++++++++++++----
src/conf/domain_conf.h | 64 +++-
src/conf/snapshot_conf.c | 3 +-
src/conf/snapshot_conf.h | 1 +
src/esx/esx_driver.c | 14 +-
src/esx/esx_private.h | 2 +
src/libvirt_private.syms | 2 +
src/lxc/lxc_conf.c | 8 +
src/lxc/lxc_conf.h | 2 +
src/lxc/lxc_controller.c | 7 +-
src/lxc/lxc_domain.c | 13 +-
src/lxc/lxc_domain.h | 2 +-
src/lxc/lxc_driver.c | 49 ++--
src/lxc/lxc_process.c | 9 +-
src/openvz/openvz_conf.c | 33 ++-
src/openvz/openvz_conf.h | 3 +
src/openvz/openvz_driver.c | 20 +-
src/parallels/parallels_driver.c | 12 +-
src/parallels/parallels_utils.h | 1 +
src/phyp/phyp_driver.c | 8 +-
src/qemu/qemu_command.c | 9 +-
src/qemu/qemu_command.h | 3 +
src/qemu/qemu_conf.c | 11 +-
src/qemu/qemu_conf.h | 4 +
src/qemu/qemu_domain.c | 77 +++--
src/qemu/qemu_domain.h | 7 +-
src/qemu/qemu_driver.c | 134 ++++-----
src/qemu/qemu_migration.c | 22 +-
src/qemu/qemu_process.c | 109 ++-----
src/test/test_driver.c | 61 ++--
src/uml/uml_conf.h | 1 +
src/uml/uml_driver.c | 35 ++-
src/vbox/vbox_tmpl.c | 27 +-
src/vmware/vmware_conf.c | 3 +-
src/vmware/vmware_conf.h | 1 +
src/vmware/vmware_driver.c | 25 +-
src/xen/xen_driver.c | 8 +-
src/xen/xen_driver.h | 1 +
src/xen/xend_internal.c | 14 +-
src/xen/xm_internal.c | 4 +-
tests/domainsnapshotxml2xmltest.c | 5 +
tests/lxcxml2xmltest.c | 7 +-
tests/qemuargv2xmltest.c | 8 +-
tests/qemumonitorjsontest.c | 29 +-
tests/qemumonitortestutils.c | 4 +-
tests/qemumonitortestutils.h | 5 +-
.../qemuxml2argv-net-bandwidth.xml | 1 +
.../qemuxml2argvdata/qemuxml2argv-net-client.args | 6 +-
.../qemuxml2argv-net-eth-ifname.args | 6 +-
.../qemuxml2argv-net-eth-ifname.xml | 1 +
.../qemuxml2argv-net-eth-names.args | 8 +-
tests/qemuxml2argvdata/qemuxml2argv-net-eth.args | 6 +-
tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml | 1 +
.../qemuxml2argvdata/qemuxml2argv-net-hostdev.xml | 1 +
tests/qemuxml2argvdata/qemuxml2argv-net-mcast.args | 6 +-
.../qemuxml2argv-net-openvswitch.xml | 1 +
.../qemuxml2argvdata/qemuxml2argv-net-server.args | 6 +-
tests/qemuxml2argvdata/qemuxml2argv-net-user.args | 5 +-
tests/qemuxml2argvdata/qemuxml2argv-net-user.xml | 1 +
.../qemuxml2argv-net-virtio-network-portgroup.xml | 2 +
tests/qemuxml2argvtest.c | 5 +-
.../qemuxml2xmlout-graphics-spice-timeout.xml | 1 +
tests/qemuxml2xmltest.c | 6 +-
tests/qemuxmlnstest.c | 5 +-
tests/testutilslxc.c | 7 +
tests/testutilslxc.h | 2 +
tests/testutilsqemu.c | 3 +-
tests/testutilsqemu.h | 2 +
tests/testutilsxen.c | 6 +
tests/testutilsxen.h | 2 +
tests/xmconfigtest.c | 8 +-
tests/xml2sexprtest.c | 8 +-
tests/xml2vmxtest.c | 8 +-
75 files changed, 848 insertions(+), 466 deletions(-)
--
1.8.1.1
11 years, 9 months
[libvirt] [PATCHv3] qdev: DEVICE_DELETED event
by Michael S. Tsirkin
libvirt has a long-standing bug: when removing the device,
it can request removal but does not know when the
removal completes. Add an event so we can fix this in a robust way.
Signed-off-by: Michael S. Tsirkin <mst(a)redhat.com>
---
Changes from v3:
- Document that we only emit events for devices with
and ID, as suggested by Markus
Changes from v2:
- move event toward the end of device_unparent,
so that parents are reported after their children,
as suggested by Paolo
Changes from v1:
- move to device_unparent
- address comments by Andreas and Eric
QMP/qmp-events.txt | 17 +++++++++++++++++
hw/qdev.c | 6 ++++++
include/monitor/monitor.h | 1 +
monitor.c | 1 +
qapi-schema.json | 4 +++-
5 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/QMP/qmp-events.txt b/QMP/qmp-events.txt
index b2698e4..0ab5017 100644
--- a/QMP/qmp-events.txt
+++ b/QMP/qmp-events.txt
@@ -136,6 +136,23 @@ Example:
Note: The "ready to complete" status is always reset by a BLOCK_JOB_ERROR
event.
+DEVICE_DELETED
+-----------------
+
+Emitted whenever the device removal completion is acknowledged
+by the guest. This event is only emitted for devices with
+a user-specified ID.
+At this point, it's safe to reuse the specified device ID.
+Device removal can be initiated by the guest or by HMP/QMP commands.
+
+Data:
+
+- "device": device name (json-string)
+
+{ "event": "DEVICE_DELETED",
+ "data": { "device": "virtio-net-pci-0" },
+ "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
+
DEVICE_TRAY_MOVED
-----------------
diff --git a/hw/qdev.c b/hw/qdev.c
index 689cd54..393e83e 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -29,6 +29,7 @@
#include "sysemu/sysemu.h"
#include "qapi/error.h"
#include "qapi/visitor.h"
+#include "qapi/qmp/qjson.h"
int qdev_hotplug = 0;
static bool qdev_hot_added = false;
@@ -778,6 +779,11 @@ static void device_unparent(Object *obj)
object_unref(OBJECT(dev->parent_bus));
dev->parent_bus = NULL;
}
+ if (dev->id) {
+ QObject *data = qobject_from_jsonf("{ 'device': %s }", dev->id);
+ monitor_protocol_event(QEVENT_DEVICE_DELETED, data);
+ qobject_decref(data);
+ }
}
static void device_class_init(ObjectClass *class, void *data)
diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h
index 87fb49c..b868760 100644
--- a/include/monitor/monitor.h
+++ b/include/monitor/monitor.h
@@ -39,6 +39,7 @@ typedef enum MonitorEvent {
QEVENT_BLOCK_JOB_CANCELLED,
QEVENT_BLOCK_JOB_ERROR,
QEVENT_BLOCK_JOB_READY,
+ QEVENT_DEVICE_DELETED,
QEVENT_DEVICE_TRAY_MOVED,
QEVENT_SUSPEND,
QEVENT_SUSPEND_DISK,
diff --git a/monitor.c b/monitor.c
index 32a6e74..2a5e7b6 100644
--- a/monitor.c
+++ b/monitor.c
@@ -457,6 +457,7 @@ static const char *monitor_event_names[] = {
[QEVENT_BLOCK_JOB_CANCELLED] = "BLOCK_JOB_CANCELLED",
[QEVENT_BLOCK_JOB_ERROR] = "BLOCK_JOB_ERROR",
[QEVENT_BLOCK_JOB_READY] = "BLOCK_JOB_READY",
+ [QEVENT_DEVICE_DELETED] = "DEVICE_DELETED",
[QEVENT_DEVICE_TRAY_MOVED] = "DEVICE_TRAY_MOVED",
[QEVENT_SUSPEND] = "SUSPEND",
[QEVENT_SUSPEND_DISK] = "SUSPEND_DISK",
diff --git a/qapi-schema.json b/qapi-schema.json
index 28b070f..bb361e1 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -2354,7 +2354,9 @@
# Notes: When this command completes, the device may not be removed from the
# guest. Hot removal is an operation that requires guest cooperation.
# This command merely requests that the guest begin the hot removal
-# process.
+# process. Completion of the device removal process is signaled with a
+# DEVICE_DELETED event. Guest reset will automatically complete removal
+# for all devices.
#
# Since: 0.14.0
##
--
MST
11 years, 9 months
[libvirt] [PATCH v2 0/4] Keep original file label
by Michal Privoznik
This is a rework of v1 with which it doesn't have a single line
in common :)
This version uses XATTR heavily. The first two patches utilize
extended attributes to store the original owner and the reference
counter, while the next two are just a proof of concept. They
suffer with a serious defect - if there's already an ACL entry
for user, we completely overwrite it and dispose.
Anyway - I am solving atomicity problem for now. I need to
understand virlockd better, so if somebody has a bright idea how
to solve locking or somebody is willing to implement it himself,
feel free.
There are several questions I think we should agree on:
- namespace of XATTR labels:
There are currently 4 namespaces: security, system, trusted and
user. I think trusted suits our needs the best. See man
attr(5) for their description.
- Is it enough if we keep the original label only on those
filesystems supporting XATTR? If so, should we turn libattr
into hard dependency?
- Keeping the whole logic within XATTR drops need for security
driver state XML. But what about those filesystems which does
not support XATTR by design? (I don't want to point my finger)
- The atomicity problem. I guess we want virlockd however we
don't want to enforce users to configure anything in order to
use this functionality. But I don't think this can be achieved,
if locks need to be shared among other hosts, right?
Michal Privoznik (4):
virFile: Add APIs for extended attributes handling
security_dac: Remember owner prior chown() and restore on relabel
virfile: Introduce internal API for managing ACL
security_dac: Favour ACLs over chown()
configure.ac | 2 +
libvirt.spec.in | 6 +
src/libvirt_private.syms | 5 +
src/security/security_dac.c | 209 +++++++++++++++++++++++++-----
src/util/virfile.c | 308 ++++++++++++++++++++++++++++++++++++++++++++
src/util/virfile.h | 19 +++
6 files changed, 515 insertions(+), 34 deletions(-)
--
1.8.1.5
11 years, 9 months
[libvirt] [PATCH] build: avoid shadowing a function name
by Eric Blake
Make the same fix as in commit de53eff.
* src/util/viralloc.h (virDeleteElementsN): Cater to old gcc/glibc.
---
Pushing under the trivial rule.
src/util/viralloc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/viralloc.h b/src/util/viralloc.h
index 3c97a58..6f46d0b 100644
--- a/src/util/viralloc.h
+++ b/src/util/viralloc.h
@@ -64,7 +64,7 @@ int virInsertElementsN(void *ptrptr, size_t size, size_t at, size_t *countptr,
bool clearOriginal, bool inPlace)
ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4);
int virDeleteElementsN(void *ptrptr, size_t size, size_t at, size_t *countptr,
- size_t remove, bool inPlace)
+ size_t toremove, bool inPlace)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4);
int virAllocVar(void *ptrptr,
size_t struct_size,
--
1.8.1.4
11 years, 9 months