Commit Graph

7 Commits

Author SHA1 Message Date
Stéphane Graber
03fadd1656
Add some missing newlines
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2014-02-17 20:53:43 -05:00
Stéphane Graber
959aee9c00
log: Drop trailing \n from log messages
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2014-02-07 10:19:27 -05:00
Andrey Mazo
0b98289ef9 Bring static and const to tests too
Signed-off-by: Andrey Mazo <mazo@telum.ru>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2014-01-02 09:56:36 -06:00
Stéphane Graber
95ee490bbd
Reduce public API (V2)
This removes all but the following headers from our includes:
 - attach_options.h
 - lxccontainer.h
 - version.h

This also removes the duplicate lxc_version function (lxc_get_version
has been preferred for a while).

lxclock.h is now considered private.

As a result quite a lot of files needed addition of extra includes
previously inherited from lxclock.h.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2013-12-02 18:17:41 -05:00
Stéphane Graber
8cd80b50ef
Convert all files to utf-8
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2013-11-25 12:59:07 -05:00
Dwight Engen
2c319dbfb5 tests list: refactor and add test for list_all_containers()
Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-11-06 08:11:20 -06:00
Serge Hallyn
a41f104bfb define list container api (v2)
Two new commands are defined: list_defined_containers() and
list_active_containers().  Both take an lxcpath (NULL means
use the default lxcpath) and return the number of containers
found.  If a lxc_container ** is passed in, then an array of
lxc_container's is returned, one for each container found.
The caller must then lxc_container_put() each container and
free the array, as shown in the new list testcase.
If a char ** is passed in, then an array of container names
is returned, after which the caller must free all the names
and the name array, as showsn in the testcase.

Changelog:
	Check for the container config file before trying to
	create an lxc_container *, to save some work. [ per
	stgraber comments]
	Add names ** argument to return only container names.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-10-14 12:42:39 -05:00