Move machineName generation from virsystemd into domain_conf

It is more related to a domain as we might use it even when there is
no systemd and it does not use any dbus/systemd functions.  In order
not to use code from conf/ in util/ pass machineName in cgroups code
as a parameter.  That also fixes a leak of machineName in the lxc
driver and cleans up and de-duplicates some code.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander
2017-07-25 17:02:27 +02:00
parent aa0dfb91d5
commit eaf2c9f891
16 changed files with 153 additions and 122 deletions
+2 -2
View File
@@ -413,8 +413,8 @@ testMachineName(const void *opaque)
int ret = -1;
char *actual = NULL;
if (!(actual = virSystemdMakeMachineName("qemu", data->id,
data->name, true)))
if (!(actual = virDomainGenerateMachineName("qemu", data->id,
data->name, true)))
goto cleanup;
if (STRNEQ(actual, data->expected)) {