# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
-AC_INIT([lxc], [0.2.1])
+AC_INIT([lxc], [0.2.2])
AC_CONFIG_SRCDIR([configure.in])
AC_CONFIG_AUX_DIR([config])
monitor.c monitor.h \
kill.c \
freezer.c \
+ version.c \
lxc_cgroup.c lxc_cgroup.h \
lxc.h \
lxc_utils.h \
lxc-freeze \
lxc-info \
lxc-unfreeze \
- lxc-priority
+ lxc-priority \
+ lxc-version
lxc_create_SOURCES = lxc_create.c lxc_config.c lxc_config.h
lxc_create_LDADD = liblxc.la
lxc_priority_SOURCES = lxc_priority.c
lxc_priority_LDADD = liblxc.la
+
+lxc_version_SOURCES = lxc_version.c
+lxc_version_LDADD = liblxc.la
*/
extern int lxc_cgroup_get_cpu_usage(const char *name, long long *usage);
+/*
+ * Returns a the version number of the library
+ */
+extern const char const *lxc_version(void);
+
#ifdef __cplusplus
}
#endif
--- /dev/null
+/*
+ * lxc: linux Container library
+ *
+ * (C) Copyright IBM Corp. 2007, 2008
+ *
+ * Authors:
+ * Daniel Lezcano <dlezcano at fr.ibm.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#include <stdio.h>
+#include <lxc/lxc.h>
+
+int main(int argc, char *argv[])
+{
+ printf("Version: %s\n", lxc_version());
+ return 0;
+}
--- /dev/null
+/*
+ * lxc: linux Container library
+ *
+ * (C) Copyright IBM Corp. 2007, 2008
+ *
+ * Authors:
+ * Daniel Lezcano <dlezcano at fr.ibm.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "../config.h"
+
+const char const* lxc_version(void)
+{
+ return PACKAGE_VERSION;
+}