Am Montag, 16. Dezember 2013, 10:51:01 schrieb Daniel P. Berrange: > On Sun, Dec 15, 2013 at 07:09:19PM +0100, Richard Weinberger wrote: > > On Fri, Jul 26, 2013 at 5:48 PM, Daniel P. Berrange <berrange@xxxxxxxxxx> wrote: > > > +char *virSystemdMakeScopeName(const char *name, > > > + const char *drivername, > > > + const char *partition) > > > +{ > > > + virBuffer buf = VIR_BUFFER_INITIALIZER; > > > + > > > + if (*partition == '/') > > > + partition++; > > > + > > > + virSystemdEscapeName(&buf, partition); > > > + virBufferAddChar(&buf, '-'); > > > + virSystemdEscapeName(&buf, drivername); > > > + virBufferAddLit(&buf, "\\x2d"); > > > > What is the idea behind this? > > Now we end up with paths like: > > /sys/fs/cgroup/memory/machine.slice/machine-lxc\x2dmyfunnycontainer.scope > > The string prefix 'machine' is a special systemd string. The second part > is the libvirt name 'lxc-$containername'. Systemd requires that the '-' be > escaped hence we use '\x2d' here. You'll see this in a number of other > systemd unit names too. Srsly? I really hoped that this is a libvirt bug and not something by (systemd-)design. :-\ Thanks, //richard -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list