Signed-off-by: Stéphane Graber <stgra...@ubuntu.com> --- src/lxc/Makefile.am | 6 ++++-- src/lxc/lxc.h | 5 ----- src/lxc/lxccontainer.c | 6 ++++++ src/lxc/lxccontainer.h | 1 + src/lxc/version.h | 31 +++++++++++++++++++++++++++++++ 5 files changed, 42 insertions(+), 7 deletions(-) create mode 100644 src/lxc/version.h
diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am index aba2e67..0385e0d 100644 --- a/src/lxc/Makefile.am +++ b/src/lxc/Makefile.am @@ -15,7 +15,8 @@ pkginclude_HEADERS = \ state.h \ attach.h \ lxccontainer.h \ - lxclock.h + lxclock.h \ + version.h if IS_BIONIC pkginclude_HEADERS += \ @@ -71,7 +72,8 @@ liblxc_so_SOURCES = \ lxcutmp.c lxcutmp.h \ apparmor.c apparmor.h \ lxclock.h lxclock.c \ - lxccontainer.c lxccontainer.h + lxccontainer.c lxccontainer.h \ + version.c version.h if IS_BIONIC liblxc_so_SOURCES += \ diff --git a/src/lxc/lxc.h b/src/lxc/lxc.h index 784b3ca..a49a0a5 100644 --- a/src/lxc/lxc.h +++ b/src/lxc/lxc.h @@ -197,11 +197,6 @@ extern int lxc_checkpoint(const char *name, int sfd, int flags); extern int lxc_restart(const char *, int, struct lxc_conf *, int, const char *); /* - * Returns the version number of the library - */ -extern const char const *lxc_version(void); - -/* * Create and return a new lxccontainer struct. */ extern struct lxc_container *lxc_container_new(const char *name, const char *configpath); diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 6569071..480c4f5 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -25,6 +25,7 @@ #include "confile.h" #include "cgroup.h" #include "commands.h" +#include "version.h" #include "log.h" #include <unistd.h> #include <sys/types.h> @@ -978,6 +979,11 @@ const char *lxc_get_default_config_path(void) return default_lxc_path(); } +const char *lxc_get_version(void) +{ + return lxc_version(); +} + struct lxc_container *lxc_container_new(const char *name, const char *configpath) { struct lxc_container *c; diff --git a/src/lxc/lxccontainer.h b/src/lxc/lxccontainer.h index f0c4565..de9854c 100644 --- a/src/lxc/lxccontainer.h +++ b/src/lxc/lxccontainer.h @@ -87,6 +87,7 @@ int lxc_container_get(struct lxc_container *c); int lxc_container_put(struct lxc_container *c); int lxc_get_wait_states(const char **states); const char *lxc_get_default_config_path(void); +const char *lxc_get_version(void); #if 0 char ** lxc_get_valid_keys(); diff --git a/src/lxc/version.h b/src/lxc/version.h new file mode 100644 index 0000000..2175d73 --- /dev/null +++ b/src/lxc/version.h @@ -0,0 +1,31 @@ +/* + * 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 + */ +#ifndef _version_h +#define _version_h + +/* + * Returns the version number of the library + */ +extern const char const *lxc_version(void); + +#endif -- 1.8.1.2 ------------------------------------------------------------------------------ Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev _______________________________________________ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel