Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: e555005b15a1d8e95997bd2d72abd0bc230a541d
      https://github.com/lxc/lxc/commit/e555005b15a1d8e95997bd2d72abd0bc230a541d
  Author: Qiang Huang <h.huangqi...@huawei.com>
  Date:   2013-09-24 (Tue, 24 Sep 2013)

  Changed paths:
    M src/lxc/arguments.c

  Log Message:
  -----------
  arguments: remove trailing slashes for the input lxcpath

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, because we combine a wrong sock name.

To fix this, just remove trailing slashes when parsing arguments.

Signed-off-by: Qiang Huang <h.huangqi...@huawei.com>
Acked-by: Serge Hallyn <serge.hal...@ubuntu.com>
Signed-off-by: Serge Hallyn <serge.hal...@ubuntu.com>


  Commit: 89cd77934835d1f04edd17c718d77591974e01f5
      https://github.com/lxc/lxc/commit/89cd77934835d1f04edd17c718d77591974e01f5
  Author: Qiang Huang <h.huangqi...@huawei.com>
  Date:   2013-09-24 (Tue, 24 Sep 2013)

  Changed paths:
    M src/lxc/lxccontainer.c
    M src/lxc/utils.c
    M src/lxc/utils.h

  Log Message:
  -----------
  utils: move remove_trailing_slashes to utils

Signed-off-by: Qiang Huang <h.huangqi...@huawei.com>
Acked-by: Serge Hallyn <serge.hal...@ubuntu.com>
Signed-off-by: Serge Hallyn <serge.hal...@ubuntu.com>


Compare: https://github.com/lxc/lxc/compare/9d0cda4f22f7...89cd77934835
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to