On Thu, Feb 04, 2016 at 01:37:29PM +0100, Pavel Hrdina wrote:
On Thu, Feb 04, 2016 at 11:40:36AM +0100, Martin Kletzander wrote:
[...]
> @@ -290,12 +306,15 @@ virCgroupValidateMachineGroup(virCgroupPtr group,
> tmp++;
>
> if (STRNEQ(tmp, name) &&
> + STRNEQ_NULLABLE(tmp, machinename) &&
> STRNEQ(tmp, partname) &&
> - STRNEQ(tmp, scopename)) {
> + STRNEQ(tmp, scopename_old) &&
> + STRNEQ_NULLABLE(tmp, scopename_new)) {
> VIR_DEBUG("Name '%s' for controller '%s' does not
match "
> - "'%s', '%s' or '%s'",
> + "'%s', '%s', '%s', '%s'
or '%s'",
> tmp, virCgroupControllerTypeToString(i),
> - name, partname, scopename);
> + name, machinename, partname,
> + scopename_old, scopename_new);
One thing, the machinename and scopename_new can by NULL and we should use
NULLSTR().
Good catch!
> goto cleanup;
> }
> }
ACK with that fix.
Thanks, I'll push it in a while with the following diff squashed in
(just for the sake of completeness):
diff --git i/src/util/vircgroup.c w/src/util/vircgroup.c
index e62793e31e2f..2f54cf29943f 100644
--- i/src/util/vircgroup.c
+++ w/src/util/vircgroup.c
@@ -313,8 +313,8 @@ virCgroupValidateMachineGroup(virCgroupPtr group,
VIR_DEBUG("Name '%s' for controller '%s' does not match
"
"'%s', '%s', '%s', '%s' or
'%s'",
tmp, virCgroupControllerTypeToString(i),
- name, machinename, partname,
- scopename_old, scopename_new);
+ name, NULLSTR(machinename), partname,
+ scopename_old, NULLSTR(scopename_new));
goto cleanup;
}
}
--
Martin