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
0f1c9972
Commit
0f1c9972
authored
Jan 20, 2011
by
Clement Calmels
Committed by
Daniel Lezcano
Feb 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
generate setns syscall number
Signed-off-by:
Clement Calmels
<
clement.calmels@fr.ibm.com
>
Signed-off-by:
Cedric Le Goater
<
clg@fr.ibm.com
>
parent
9f53d717
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
89 additions
and
14 deletions
+89
-14
linux.m4
config/linux.m4
+73
-0
configure.ac
configure.ac
+2
-0
Makefile.am
src/lxc/Makefile.am
+13
-1
namespace.c
src/lxc/namespace.c
+1
-13
No files found.
config/linux.m4
0 → 100644
View file @
0f1c9972
AC_DEFUN([AC_LINUX],
[
AC_LINUX_DIR()
AC_LINUX_SRCARCH()
])
AC_DEFUN([AS_TRY_LINUX_DIR],
[AC_MSG_CHECKING(for Linux in $1)
if test -f "$1/Makefile" ; then
result=yes
$2
else
result="not found"
$3
fi
AC_MSG_RESULT($result)
])
AC_DEFUN([AC_LINUX_DIR],
[
AC_ARG_WITH([linuxdir],
[AC_HELP_STRING([--with-linuxdir=DIR],
[specify path to Linux source directory])],
[LINUX_DIR="${withval}"],
[LINUX_DIR=default])
dnl if specified, use the specified one
if test "${LINUX_DIR}" != "default" ; then
AS_TRY_LINUX_DIR([${LINUX_DIR}], , AC_MSG_ERROR([Linux dir not found]) )
fi
dnl if not specified, first try with previously set LINUX_KERNEL_RELEASE
if test "${LINUX_DIR}" = "default" ; then
dir="/lib/modules/$LINUX_KERNEL_RELEASE/build";
AS_TRY_LINUX_DIR([${dir}], [LINUX_DIR=${dir}], )
fi
dnl next try using the kernel source dir
if test "${LINUX_DIR}" = "default" ; then
dir="/usr/src/linux-$LINUX_KERNEL_RELEASE";
AS_TRY_LINUX_DIR([${dir}], [LINUX_DIR=${dir}], )
fi
dnl then try a common default of /usr/src/linux
if test "${LINUX_DIR}" = "default" ; then
dir="/usr/src/linux";
AS_TRY_LINUX_DIR([${dir}], [LINUX_DIR=${dir}], )
fi
dnl if still nothing found, fail
if test "${LINUX_DIR}" = "default" ; then
AC_MSG_WARN([Linux source directory not found])
fi
AC_SUBST(LINUX_DIR)
])
AC_DEFUN([AC_LINUX_SRCARCH],[
AC_MSG_CHECKING(for linux SRCARCH)
case "${host}" in
i[[3456]]86-*) LINUX_SRCARCH=x86;;
x86_64-*) LINUX_SRCARCH=x86;;
powerpc*-*) LINUX_SRCARCH=powerpc;;
s390*-*) LINUX_SRCARCH=s390;;
*) AC_MSG_ERROR([architecture ${host} not supported]);;
esac
AC_MSG_RESULT(${LINUX_SRCARCH})
AC_SUBST(LINUX_SRCARCH)
])
configure.ac
View file @
0f1c9972
...
@@ -91,6 +91,8 @@ AC_CHECK_HEADERS([sys/signalfd.h])
...
@@ -91,6 +91,8 @@ AC_CHECK_HEADERS([sys/signalfd.h])
AC_PROG_GCC_TRADITIONAL
AC_PROG_GCC_TRADITIONAL
AC_LINUX
if test "x$GCC" = "xyes"; then
if test "x$GCC" = "xyes"; then
CFLAGS="$CFLAGS -Wall"
CFLAGS="$CFLAGS -Wall"
fi
fi
...
...
src/lxc/Makefile.am
View file @
0f1c9972
...
@@ -11,7 +11,8 @@ pkginclude_HEADERS = \
...
@@ -11,7 +11,8 @@ pkginclude_HEADERS = \
conf.h
\
conf.h
\
list.h
\
list.h
\
log.h
\
log.h
\
state.h
state.h
\
setns.h
sodir
=
$(libdir)
sodir
=
$(libdir)
# use PROGRAMS to avoid complains from automake
# use PROGRAMS to avoid complains from automake
...
@@ -120,3 +121,14 @@ install-exec-local: install-soPROGRAMS
...
@@ -120,3 +121,14 @@ install-exec-local: install-soPROGRAMS
uninstall-local
:
uninstall-local
:
$(RM)
$(DESTDIR)$(libdir)
/liblxc.so
*
$(RM)
$(DESTDIR)$(libdir)
/liblxc.so
*
namespace.c
:
setns.h
setns.h
:
-
$(CC)
$(CPPFLAGS)
-M
-MT
$@
$(LINUX_DIR)
/arch/
$(LINUX_SRCARCH)
/include/asm/unistd.h
>
setns.P
-
$(CPP)
$(CPPFLAGS)
-dM
$(LINUX_DIR)
/arch/
$(LINUX_SRCARCH)
/include/asm/unistd.h |grep setns
>
$@
clean-local
:
$(RM)
setns.h setns.P
-include
setns.P
src/lxc/namespace.c
View file @
0f1c9972
...
@@ -34,19 +34,7 @@
...
@@ -34,19 +34,7 @@
#include "namespace.h"
#include "namespace.h"
#include "log.h"
#include "log.h"
#ifndef __NR_setns
#include "setns.h"
# if __i386__
# define __NR_setns 338
# elif __x86_64__
# define __NR_setns 300
# elif __powerpc__
# define __NR_setns 323
# elif __s390__
# define __NR_setns 332
# else
# warning "architecture not supported for setns"
# endif
#endif
lxc_log_define
(
lxc_namespace
,
lxc
);
lxc_log_define
(
lxc_namespace
,
lxc
);
...
...
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