view tests/container_count.c @ 12:dbf24a82f625 default tip

Fix doxygen comments and add a Doxyfile
author Louis Opter <kalessin@kalessin.fr>
date Fri, 07 Jan 2011 21:49:31 +0100
parents 8339ab15527d
children
line wrap: on
line source

#include <sys/types.h>

#include <err.h>
#include <stdio.h>
#include <stdlib.h>

#include "lxcstats.h"
#include "_lxcstats.h"

int
main(int argc, char *argv[])
{
    lxcst_handle    *hdl;
    int             count;

    hdl = lxcst_open();
    if (!hdl)
        err(EXIT_FAILURE, "lxcst_open failed");

    count = _lxcst_container_count(hdl);
    if (count == -1)
        err(EXIT_FAILURE, "_lxcst_container_count failed");

    printf("%s: %d containers.\n", *argv, count);

    lxcst_close(hdl);

    return (EXIT_SUCCESS);
    (void)argc;
}