Mercurial > archived > louis > perso > liblxcstats
diff tests/open.c @ 0:6ce4443e7545
Add the draft of an API to collect statistics on LXC
author | Louis Opter <kalessin@kalessin.fr> |
---|---|
date | Wed, 29 Dec 2010 23:28:14 +0100 |
parents | |
children | 8339ab15527d |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/open.c Wed Dec 29 23:28:14 2010 +0100 @@ -0,0 +1,23 @@ +#include <err.h> +#include <stdio.h> +#include <stdlib.h> + +#include "_lxcstats.h" +#include "lxcstats.h" + +int +main(int argc, char *argv[]) +{ + lxcst_handle *hdl; + + hdl = lxcst_open(); + + if (hdl) { + printf("%s: mnt_dir=%s.\n", *argv, hdl->cgroup_dir); + return (EXIT_SUCCESS); + } + + err(EXIT_FAILURE, "lxcst_open failed"); + + (void)argc; +}