comparison tests/close.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
comparison
equal deleted inserted replaced
-1:000000000000 0:6ce4443e7545
1 #include <err.h>
2 #include <stdlib.h>
3
4 #include "lxcstats.h"
5
6 int
7 main(void)
8 {
9 lxcst_handle *hdl;
10
11 if (lxcst_close(NULL) != 0)
12 errx(EXIT_FAILURE, "lxcst_close fail on NULL handle");
13
14 hdl = lxcst_open();
15 if (!hdl)
16 err(EXIT_FAILURE, "lxcst_open failed");
17
18 if (lxcst_close(hdl) != 0)
19 errx(EXIT_FAILURE, "lxcst_close fail on valid handle");
20
21 return (EXIT_SUCCESS);
22 }