[libvirt] [PATCH] Escaping leading '.' in cgroup names

From: "Daniel P. Berrange" <berrange@redhat.com> Escaping a leading '.' with '_' in the cgroup names Signed-off-by: Daniel P. Berrange <berrange@redhat.com> --- src/util/vircgroup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 473d2fc..4de1d55 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -1106,7 +1106,8 @@ static int virCgroupPartitionNeedsEscaping(const char *path) if (STRPREFIX(path, "cgroup.")) return 1; - if (path[0] == '_') + if (path[0] == '_' || + path[0] == '.') return 1; if (!(fp = fopen("/proc/cgroups", "r"))) -- 1.8.1.4

On Mon, May 13, 2013 at 11:48:48AM +0100, Daniel P. Berrange wrote:
From: "Daniel P. Berrange" <berrange@redhat.com>
Escaping a leading '.' with '_' in the cgroup names
Signed-off-by: Daniel P. Berrange <berrange@redhat.com> --- src/util/vircgroup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 473d2fc..4de1d55 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -1106,7 +1106,8 @@ static int virCgroupPartitionNeedsEscaping(const char *path) if (STRPREFIX(path, "cgroup.")) return 1;
- if (path[0] == '_') + if (path[0] == '_' || + path[0] == '.') return 1;
if (!(fp = fopen("/proc/cgroups", "r")))
ACK, Daniel -- Daniel Veillard | Open Source and Standards, Red Hat veillard@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (2)
-
Daniel P. Berrange
-
Daniel Veillard