]> git.ipfire.org Git - thirdparty/lxc.git/commit
extend command processor to handle generic data
authorDwight Engen <dwight.engen@oracle.com>
Fri, 17 May 2013 22:29:12 +0000 (18:29 -0400)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Tue, 21 May 2013 15:16:00 +0000 (10:16 -0500)
commitef6e34eec8d5a9f1447462d6080facb674b3ccdb
tree055927c529b4662dc7c9d5f4e14f333ba9ec766e
parent9c83a661397456e1455d739bcadfa38f05ce2fe6
extend command processor to handle generic data

Motivation for this change is to have the ability to get the run-time
configuration items from a container, which may differ from its current
on disk configuration, or might not be available any other way (for
example lxc.network.0.veth.pair). In adding this ability it seemed there
was room for refactoring improvements.

Genericize the command infrastructure so that both command requests and
responses can have arbitrary data. Consolidate all commands into command.c
and name them consistently. This allows all the callback routines to be
made static, reducing exposure.

Return the actual allocated tty for the console command. Don't print the
init pid in lxc_info if the container isn't actually running. Command
processing was made more thread safe by removing the static buffer from
receive_answer(). Refactored command response code to a common routine.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
17 files changed:
src/lxc/Makefile.am
src/lxc/cgroup.c
src/lxc/cgroup.h
src/lxc/commands.c
src/lxc/commands.h
src/lxc/console.c
src/lxc/lxc.h
src/lxc/lxc_attach.c
src/lxc/lxc_console.c
src/lxc/lxc_info.c
src/lxc/lxc_kill.c
src/lxc/lxc_stop.c
src/lxc/lxccontainer.c
src/lxc/start.c
src/lxc/state.c
src/lxc/stop.c [deleted file]
src/tests/cgpath.c