
On 07/23/2013 09:21 AM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange" <berrange@redhat.com>
Make the virCgroupNewMachine method try to use systemd-machined first. If that fails, then fallback to using the traditional cgroup setup code path.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com> --- src/util/vircgroup.c | 115 ++++++++++++++++++++++++++++++++++++++++++++------ src/util/virsystemd.c | 8 +++- 2 files changed, 108 insertions(+), 15 deletions(-)
@@ -108,6 +110,13 @@ bool virCgroupIsValidMachineGroup(virCgroupPtr group, if (virCgroupPartitionEscape(&partname) < 0) goto cleanup;
+ if (virAsprintf(&scopename, "machine-%s\\x2d%s.scope",
A partially-escaped name (the \\x2d is an escape, but the %s are raw)...
+ drivername, name) < 0) + goto cleanup; + + if (virCgroupPartitionEscape(&scopename) < 0)
...re-escaped. Is this going to do the right thing, or are you causing too many \ in the resulting string by over-escaping the separator? As you said in the cover letter, this is a preview while you are still hammering out issues, but I'm okay with the rest of the series going in before freeze. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org