From 858133f52ce4a7eaa0ace709c4cb037ffa408caf Mon Sep 17 00:00:00 2001 From: Daniel Lezcano Date: Thu, 11 Aug 2011 17:54:57 +0200 Subject: [PATCH] lxc-ps : fix the container name search We don't have to check for the cgroup namespace name because the pid we are looking for is already in the list of the container owned by lxc and retrieved from the abstract socket command name. Signed-off-by: Daniel Lezcano --- src/lxc/lxc-ps.in | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/lxc/lxc-ps.in b/src/lxc/lxc-ps.in index dd3b7fe39..2f1d537fa 100755 --- a/src/lxc/lxc-ps.in +++ b/src/lxc/lxc-ps.in @@ -118,12 +118,9 @@ sub get_container { my $container = ''; foreach ( @cgroup ) { chomp; - # find the container name - if (m/[:,]ns[:,]/o) { - # container name after :/ - s/.*:\///o; - $container = $_; - } + # find the container name after :/ + s/.*:\///o; + $container = $_; } return $container; }