handle hashed command socket names (v2)
With the new hashed command socket names (
e85898415c), it's possible to
have something like below;
[caglar@qop:~/go/src/github.com/lxc/go-lxc(master)] cat /proc/net/unix | grep lxc
0000000000000000:
00000002 00000000 00010000 0001 01 53465 @lxc/
d086e835c86f4b8d/command
[...]
list_active_containers reads /proc/net/unix to find all running
containers but this new format no longer includes the container name or
its lxcpath.
This patch introduces two new commands (LXC_CMD_GET_NAME and
LXC_CMD_GET_LXCPATH) and starts to use those in list_active_containers
call.
changes since v1:
- added sanity check proposed by Serge
Signed-off-by: S.Çağlar Onur <caglar@10ur.org>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>