[libvirt] [PATCH v3] systemd: Modernize machine naming

Martin Kletzander mkletzan at redhat.com
Thu Feb 4 12:56:03 UTC 2016


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160204/2cd3e25b/attachment-0001.sig>


More information about the libvir-list mailing list