Re: [lxc-devel] [PATCH 2/2] arguments: remove trailing slashes for the input lxcpath

2013-09-24 Thread Serge Hallyn
Quoting Qiang Huang (h.huangqi...@huawei.com): > In lxc_cmd(), we use > snprintf(path, len, "%s/%s/command", lxcpath ? lxcpath : inpath, name); > to fill sock name, this assume lxcpath have no trailing slashes, so > if we use > lxc-info -n test -P /usr/local/var/lib/lxc_anon/ > to get a running con

[lxc-devel] [PATCH 2/2] arguments: remove trailing slashes for the input lxcpath

2013-09-24 Thread Qiang Huang
In lxc_cmd(), we use snprintf(path, len, "%s/%s/command", lxcpath ? lxcpath : inpath, name); to fill sock name, this assume lxcpath have no trailing slashes, so if we use lxc-info -n test -P /usr/local/var/lib/lxc_anon/ to get a running container's state, we will get state: STOPPED which is wrong,