[lxc-devel] [PATCH] [trivial] lxc-ls: Scan cgroup mount points from fstype and not device
Christian Seiler
christian at iwakd.de
Mon Sep 24 09:21:48 UTC 2012
lxc-ls --active now scans mount points that have the 'cgroup' filesystem
type and not the 'cgroup' device name (which is ignored anyway and may be
anything).
Signed-off-by: Christian Seiler <christian at iwakd.de>
Cc: Serge Hallyn <serge.hallyn at ubuntu.com>
---
src/lxc/lxc-ls.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/lxc/lxc-ls.in b/src/lxc/lxc-ls.in
index 4b9dc77..9293323 100644
--- a/src/lxc/lxc-ls.in
+++ b/src/lxc/lxc-ls.in
@@ -56,7 +56,7 @@ get_parent_cgroup()
init_cgroup=${fields#*:}
# Get the filesystem mountpoint of the hierarchy
- mountpoint=$(grep -E "^cgroup [^ ]+ [^ ]+ ([^ ]+,)?$subsystems(,[^ ]+)? " /proc/self/mounts | cut -d ' ' -f 2)
+ mountpoint=$(grep -E "^[^ ]+ [^ ]+ cgroup ([^ ]+,)?$subsystems(,[^ ]+)? " /proc/self/mounts | cut -d ' ' -f 2)
if [ -z "$mountpoint" ]; then continue; fi
# Return the absolute path to the containers' parent cgroup
--
1.7.2.5
More information about the lxc-devel
mailing list