mirror of
git://github.com/lxc/lxc
synced 2025-09-03 20:09:35 +00:00
Fix lxc-ps -- argument processing
lxc-ps is supposed to pass arguments after the -- on to ps. The problem is that i is expanded once from $@ and the loop will iterate over all the arguments that were in $@ at the time of expansion. Inside the loop, there are shifts (in the name case for example) that are trying to remove more than a single argument. This changes fixes that and makes lxc-ps work as documented. Signed-off-by: Dwight Engen <dwight.engen@oracle.com> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
This commit is contained in:
committed by
Daniel Lezcano
parent
f7a81eeb14
commit
a3812bf0c7
@@ -72,8 +72,8 @@ get_parent_cgroup()
|
|||||||
|
|
||||||
containers=""
|
containers=""
|
||||||
list_container_processes=0
|
list_container_processes=0
|
||||||
for i in "$@"; do
|
while true; do
|
||||||
case $i in
|
case $1 in
|
||||||
-h|--help)
|
-h|--help)
|
||||||
help; exit 1;;
|
help; exit 1;;
|
||||||
-n|--name)
|
-n|--name)
|
||||||
|
Reference in New Issue
Block a user