Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
681799f9
Commit
681799f9
authored
Sep 17, 2008
by
dlezcano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added the function returning the version and the corresponding cli
parent
70a59143
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
2 deletions
+71
-2
configure.in
configure.in
+1
-1
Makefile.am
src/lxc/Makefile.am
+6
-1
lxc.h
src/lxc/lxc.h
+5
-0
lxc_version.c
src/lxc/lxc_version.c
+30
-0
version.c
src/lxc/version.c
+29
-0
No files found.
configure.in
View file @
681799f9
# -*- 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])
...
...
src/lxc/Makefile.am
View file @
681799f9
...
...
@@ -22,6 +22,7 @@ liblxc_la_SOURCES = \
monitor.c monitor.h
\
kill.c
\
freezer.c
\
version.c
\
lxc_cgroup.c lxc_cgroup.h
\
lxc.h
\
lxc_utils.h
\
...
...
@@ -55,7 +56,8 @@ bin_PROGRAMS = \
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
...
...
@@ -95,3 +97,6 @@ lxc_unfreeze_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
src/lxc/lxc.h
View file @
681799f9
...
...
@@ -250,6 +250,11 @@ extern int lxc_cgroup_get_cpuset(const char *name, long *cpumask,
*/
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
...
...
src/lxc/lxc_version.c
0 → 100644
View file @
681799f9
/*
* 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
;
}
src/lxc/version.c
0 → 100644
View file @
681799f9
/*
* 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
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment