]> git.ipfire.org Git - thirdparty/lxc.git/commit
utils: Drop trailing / in lxcpath
authorStéphane Graber <stgraber@ubuntu.com>
Mon, 20 Jan 2014 20:57:16 +0000 (15:57 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Tue, 21 Jan 2014 04:11:54 +0000 (23:11 -0500)
commitf407c5e4c142e870f01a7f0a52b58a7a30b6c865
treedae127461cb3678bd37eeb88b1490dab4e693cbf
parentf4364484454c754ed905bfb85bd2727a0a5d0475
utils: Drop trailing / in lxcpath

This fixes command line tools and functions which use
lxc_global_config_value o get lxcpath but don't strip the trailing /
leading to mismatching command path (as lxc_container_new does strip the
path).

As lxcpath is typically a const and so can't easily be changed by the
caller, add the trick directly into lxc_global_config_value (having to
juggle a bit in there too to avoid trying to alter a const).

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/utils.c