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
f79d43bb
Commit
f79d43bb
authored
Nov 26, 2012
by
Stéphane Graber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove all trailing whitespaces.
Signed-off-by:
Stéphane Graber
<
stgraber@ubuntu.com
>
parent
c93c7b1a
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
98 additions
and
98 deletions
+98
-98
COPYING
COPYING
+1
-1
TODO
TODO
+1
-1
acinclude.m4
config/acinclude.m4
+8
-8
FAQ.txt
doc/FAQ.txt
+2
-2
lxc-cgroup.sgml.in
doc/lxc-cgroup.sgml.in
+2
-2
lxc-console.sgml.in
doc/lxc-console.sgml.in
+3
-3
lxc-destroy.sgml.in
doc/lxc-destroy.sgml.in
+2
-2
lxc-execute.sgml.in
doc/lxc-execute.sgml.in
+2
-2
lxc-freeze.sgml.in
doc/lxc-freeze.sgml.in
+2
-2
lxc-ls.sgml.in
doc/lxc-ls.sgml.in
+2
-2
lxc-monitor.sgml.in
doc/lxc-monitor.sgml.in
+3
-3
lxc-ps.sgml.in
doc/lxc-ps.sgml.in
+5
-5
lxc-start.sgml.in
doc/lxc-start.sgml.in
+2
-2
lxc-stop.sgml.in
doc/lxc-stop.sgml.in
+3
-3
lxc-unfreeze.sgml.in
doc/lxc-unfreeze.sgml.in
+2
-2
lxc-wait.sgml.in
doc/lxc-wait.sgml.in
+2
-2
lxc.conf
doc/lxc.conf
+1
-1
lxc.conf.sgml.in
doc/lxc.conf.sgml.in
+5
-5
lxc.sgml.in
doc/lxc.sgml.in
+6
-6
af_unix.c
src/lxc/af_unix.c
+4
-4
genl.c
src/lxc/genl.c
+2
-2
genl.h
src/lxc/genl.h
+2
-2
lxc-checkconfig.in
src/lxc/lxc-checkconfig.in
+1
-1
lxc_monitor.c
src/lxc/lxc_monitor.c
+1
-1
lxc_start.c
src/lxc/lxc_start.c
+1
-1
mainloop.c
src/lxc/mainloop.c
+2
-2
mainloop.h
src/lxc/mainloop.h
+2
-2
network.h
src/lxc/network.h
+1
-1
nl.c
src/lxc/nl.c
+7
-7
nl.h
src/lxc/nl.h
+16
-16
rtnl.c
src/lxc/rtnl.c
+1
-1
rtnl.h
src/lxc/rtnl.h
+2
-2
lxc-debian.in
templates/lxc-debian.in
+1
-1
lxc-oracle.in
templates/lxc-oracle.in
+1
-1
No files found.
COPYING
View file @
f79d43bb
...
@@ -146,7 +146,7 @@ such a program is covered only if its contents constitute a work based
...
@@ -146,7 +146,7 @@ such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
you conspicuously and appropriately publish on each copy an
...
...
TODO
View file @
f79d43bb
* create an interactive configuration with the lxc-create command
* create an interactive configuration with the lxc-create command
line, like the 'make menuconfig' of the kernel.
line, like the 'make menuconfig' of the kernel.
= lxc-create [-n foo] -m|--menuconfig
= lxc-create [-n foo] -m|--menuconfig
config/acinclude.m4
View file @
f79d43bb
...
@@ -2,21 +2,21 @@ dnl as-ac-expand.m4 0.2.0
...
@@ -2,21 +2,21 @@ dnl as-ac-expand.m4 0.2.0
dnl autostars m4 macro for expanding directories using configure's prefix
dnl autostars m4 macro for expanding directories using configure's prefix
dnl thomas@apestaart.org
dnl thomas@apestaart.org
dnl
dnl
dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
dnl example
dnl example
dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local
dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local
AC_DEFUN([AS_AC_EXPAND],
AC_DEFUN([AS_AC_EXPAND],
[
[
EXP_VAR=[$1]
EXP_VAR=[$1]
FROM_VAR=[$2]
FROM_VAR=[$2]
dnl first expand prefix and exec_prefix if necessary
dnl first expand prefix and exec_prefix if necessary
prefix_save=$prefix
prefix_save=$prefix
exec_prefix_save=$exec_prefix
exec_prefix_save=$exec_prefix
dnl if no prefix given, then use /usr/local, the default prefix
dnl if no prefix given, then use /usr/local, the default prefix
if test "x$prefix" = "xNONE"; then
if test "x$prefix" = "xNONE"; then
prefix="$ac_default_prefix"
prefix="$ac_default_prefix"
...
@@ -25,7 +25,7 @@ AC_DEFUN([AS_AC_EXPAND],
...
@@ -25,7 +25,7 @@ AC_DEFUN([AS_AC_EXPAND],
if test "x$exec_prefix" = "xNONE"; then
if test "x$exec_prefix" = "xNONE"; then
exec_prefix=$prefix
exec_prefix=$prefix
fi
fi
full_var="$FROM_VAR"
full_var="$FROM_VAR"
dnl loop until it doesn't change anymore
dnl loop until it doesn't change anymore
while true; do
while true; do
...
@@ -33,11 +33,11 @@ AC_DEFUN([AS_AC_EXPAND],
...
@@ -33,11 +33,11 @@ AC_DEFUN([AS_AC_EXPAND],
if test "x$new_full_var" = "x$full_var"; then break; fi
if test "x$new_full_var" = "x$full_var"; then break; fi
full_var=$new_full_var
full_var=$new_full_var
done
done
dnl clean up
dnl clean up
full_var=$new_full_var
full_var=$new_full_var
AC_SUBST([$1], "$full_var")
AC_SUBST([$1], "$full_var")
dnl restore prefix and exec_prefix
dnl restore prefix and exec_prefix
prefix=$prefix_save
prefix=$prefix_save
exec_prefix=$exec_prefix_save
exec_prefix=$exec_prefix_save
...
@@ -94,7 +94,7 @@ x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"`
...
@@ -94,7 +94,7 @@ x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"`
# Determine the number of characters in A and B.
# Determine the number of characters in A and B.
ax_compare_version_len_A=`echo "$A" | awk '{print(length)}'`
ax_compare_version_len_A=`echo "$A" | awk '{print(length)}'`
ax_compare_version_len_B=`echo "$B" | awk '{print(length)}'`
ax_compare_version_len_B=`echo "$B" | awk '{print(length)}'`
# Set A to no more than B's length and B to no more than A's length.
# Set A to no more than B's length and B to no more than A's length.
A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"`
A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"`
B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"`
B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"`
...
...
doc/FAQ.txt
View file @
f79d43bb
...
@@ -32,8 +32,8 @@ error when starting a container.
...
@@ -32,8 +32,8 @@ error when starting a container.
"[syserr] lxc_start:96: Invalid argument - failed to fork into a new
"[syserr] lxc_start:96: Invalid argument - failed to fork into a new
namespace"
namespace"
Answer:
Answer:
-------
-------
read the lxc man page about kernel version prereq :) most probably
read the lxc man page about kernel version prereq :) most probably
your kernel is not configured to support the container options you
your kernel is not configured to support the container options you
...
...
doc/lxc-cgroup.sgml.in
View file @
f79d43bb
<!--
<!--
lxc: linux Container library
lxc: linux Container library
...
@@ -143,7 +143,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
...
@@ -143,7 +143,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
The container is not running.
The container is not running.
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
</variablelist>
</variablelist>
...
...
doc/lxc-console.sgml.in
View file @
f79d43bb
<!--
<!--
lxc: linux Container library
lxc: linux Container library
...
@@ -67,7 +67,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
...
@@ -67,7 +67,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
The available tty are free slots taken by this command. That
The available tty are free slots taken by this command. That
means if the container has four ttys available and the command
means if the container has four ttys available and the command
has been launched four times taking the different tty, the fifth
has been launched four times taking the different tty, the fifth
command will fail because no console will be available.
command will fail because no console will be available.
</para>
</para>
<para>
<para>
...
@@ -114,7 +114,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
...
@@ -114,7 +114,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
user "foo" and "bar" is trying to open a console to it.
user "foo" and "bar" is trying to open a console to it.
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
</variablelist>
</variablelist>
...
...
doc/lxc-destroy.sgml.in
View file @
f79d43bb
<!--
<!--
lxc: linux Container library
lxc: linux Container library
...
@@ -100,7 +100,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
...
@@ -100,7 +100,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
command to list the available containers on the system.
command to list the available containers on the system.
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
</variablelist>
</variablelist>
...
...
doc/lxc-execute.sgml.in
View file @
f79d43bb
<!--
<!--
lxc: linux Container library
lxc: linux Container library
...
@@ -162,7 +162,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
...
@@ -162,7 +162,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
container or create a new one.
container or create a new one.
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
</variablelist>
</variablelist>
...
...
doc/lxc-freeze.sgml.in
View file @
f79d43bb
<!--
<!--
lxc: linux Container library
lxc: linux Container library
...
@@ -81,7 +81,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
...
@@ -81,7 +81,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
the <command>lxc-create</command> command.
the <command>lxc-create</command> command.
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
</variablelist>
</variablelist>
...
...
doc/lxc-ls.sgml.in
View file @
f79d43bb
<!--
<!--
lxc: linux Container library
lxc: linux Container library
...
@@ -120,7 +120,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
...
@@ -120,7 +120,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
<refsect1>
<refsect1>
<title>See Also</title>
<title>See Also</title>
<simpara>
<simpara>
<citerefentry>
<citerefentry>
<refentrytitle>ls</refentrytitle>
<refentrytitle>ls</refentrytitle>
<manvolnum>1</manvolnum>
<manvolnum>1</manvolnum>
...
...
doc/lxc-monitor.sgml.in
View file @
f79d43bb
<!--
<!--
lxc: linux Container library
lxc: linux Container library
...
@@ -135,7 +135,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
...
@@ -135,7 +135,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
the <command>lxc-create</command> command.
the <command>lxc-create</command> command.
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
</variablelist>
</variablelist>
...
@@ -145,7 +145,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
...
@@ -145,7 +145,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
<refsect1>
<refsect1>
<title>See Also</title>
<title>See Also</title>
<simpara>
<simpara>
<citerefentry>
<citerefentry>
<refentrytitle>regex</refentrytitle>
<refentrytitle>regex</refentrytitle>
<manvolnum>7</manvolnum>
<manvolnum>7</manvolnum>
...
...
doc/lxc-ps.sgml.in
View file @
f79d43bb
<!--
<!--
lxc: linux Container library
lxc: linux Container library
...
@@ -86,8 +86,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
...
@@ -86,8 +86,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
<listitem>
<listitem>
<para>
<para>
specify the container <replaceable>name</replaceable>
specify the container <replaceable>name</replaceable>
to limit the output to the processes belonging
to limit the output to the processes belonging
to this container name.
to this container name.
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
...
@@ -98,7 +98,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
...
@@ -98,7 +98,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
</term>
</term>
<listitem>
<listitem>
<para>
<para>
limit the output to the processes belonging
limit the output to the processes belonging
to all lxc containers.
to all lxc containers.
</para>
</para>
</listitem>
</listitem>
...
@@ -139,7 +139,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
...
@@ -139,7 +139,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
<refsect1>
<refsect1>
<title>See Also</title>
<title>See Also</title>
<simpara>
<simpara>
<citerefentry>
<citerefentry>
<refentrytitle>ps</refentrytitle>
<refentrytitle>ps</refentrytitle>
<manvolnum>1</manvolnum>
<manvolnum>1</manvolnum>
...
...
doc/lxc-start.sgml.in
View file @
f79d43bb
<!--
<!--
lxc: linux Container library
lxc: linux Container library
...
@@ -198,7 +198,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
...
@@ -198,7 +198,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
container or create a new one.
container or create a new one.
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
</variablelist>
</variablelist>
...
...
doc/lxc-stop.sgml.in
View file @
f79d43bb
<!--
<!--
lxc: linux Container library
lxc: linux Container library
...
@@ -80,7 +80,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
...
@@ -80,7 +80,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
container or create a new one.
container or create a new one.
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
<varlistentry>
<varlistentry>
<term>The container was not found</term>
<term>The container was not found</term>
...
@@ -90,7 +90,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
...
@@ -90,7 +90,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
the <command>lxc-create</command> command.
the <command>lxc-create</command> command.
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
</variablelist>
</variablelist>
...
...
doc/lxc-unfreeze.sgml.in
View file @
f79d43bb
<!--
<!--
lxc: linux Container library
lxc: linux Container library
...
@@ -78,7 +78,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
...
@@ -78,7 +78,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
the <command>lxc-create</command> command.
the <command>lxc-create</command> command.
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
</variablelist>
</variablelist>
...
...
doc/lxc-wait.sgml.in
View file @
f79d43bb
<!--
<!--
lxc: linux Container library
lxc: linux Container library
...
@@ -133,7 +133,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
...
@@ -133,7 +133,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
the <command>lxc-create</command> command.
the <command>lxc-create</command> command.
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
</variablelist>
</variablelist>
...
...
doc/lxc.conf
View file @
f79d43bb
...
@@ -16,7 +16,7 @@ lxc.network.type = macvlan
...
@@ -16,7 +16,7 @@ lxc.network.type = macvlan
# specify the flags to be used for the network, actually only <up> is allowed
# specify the flags to be used for the network, actually only <up> is allowed
# which mean the network should be set up when created. If the network is set
# which mean the network should be set up when created. If the network is set
# up, the loopback is automatically set up too.
# up, the loopback is automatically set up too.
lxc
.
network
.
flags
=
up
lxc
.
network
.
flags
=
up
# specify the physical network device which will communicate with the
# specify the physical network device which will communicate with the
...
...
doc/lxc.conf.sgml.in
View file @
f79d43bb
<!--
<!--
lxc: linux Container library
lxc: linux Container library
...
@@ -235,7 +235,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
...
@@ -235,7 +235,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
specify an action to do for the
specify an action to do for the
network.
network.
</para>
</para>
<para><option>up:</option> activates the interface.
<para><option>up:</option> activates the interface.
</para>
</para>
</listitem>
</listitem>
...
@@ -849,7 +849,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
...
@@ -849,7 +849,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
<refsect1>
<refsect1>
<title>See Also</title>
<title>See Also</title>
<simpara>
<simpara>
<citerefentry>
<citerefentry>
<refentrytitle><command>chroot</command></refentrytitle>
<refentrytitle><command>chroot</command></refentrytitle>
<manvolnum>1</manvolnum>
<manvolnum>1</manvolnum>
...
@@ -867,14 +867,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
...
@@ -867,14 +867,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
</simpara>
</simpara>
</refsect1>
</refsect1>
&seealso;
&seealso;
<refsect1>
<refsect1>
<title>Author</title>
<title>Author</title>
<para>Daniel Lezcano <email>daniel.lezcano@free.fr</email></para>
<para>Daniel Lezcano <email>daniel.lezcano@free.fr</email></para>
</refsect1>
</refsect1>
</refentry>
</refentry>
<!-- Keep this comment at the end of the file
<!-- Keep this comment at the end of the file
...
...
doc/lxc.sgml.in
View file @
f79d43bb
<!--
<!--
lxc: linux Container library
lxc: linux Container library
...
@@ -239,7 +239,7 @@ rootfs
...
@@ -239,7 +239,7 @@ rootfs
/sbin /home/root/sshd/rootfs/sbin none ro,bind 0 0
/sbin /home/root/sshd/rootfs/sbin none ro,bind 0 0
</programlisting>
</programlisting>
</para>
</para>
<para>How to run a system in a container ?</para>
<para>How to run a system in a container ?</para>
<para>Running a system inside a container is paradoxically easier
<para>Running a system inside a container is paradoxically easier
...
@@ -249,7 +249,7 @@ rootfs
...
@@ -249,7 +249,7 @@ rootfs
without configuration because the container will set them
without configuration because the container will set them
up. eg. the ipv4 address will be setup by the system container
up. eg. the ipv4 address will be setup by the system container
init scripts. Here is an example of the mount points file:
init scripts. Here is an example of the mount points file:
<programlisting>
<programlisting>
[root@lxc debian]$ cat fstab
[root@lxc debian]$ cat fstab
...
@@ -312,7 +312,7 @@ rootfs
...
@@ -312,7 +312,7 @@ rootfs
<refsect2>
<refsect2>
<title>Configuration</title>
<title>Configuration</title>
<para>The container is configured through a configuration
<para>The container is configured through a configuration
file, the format of the configuration file is described in
file, the format of the configuration file is described in
<citerefentry>
<citerefentry>
<refentrytitle><filename>lxc.conf</filename></refentrytitle>
<refentrytitle><filename>lxc.conf</filename></refentrytitle>
<manvolnum>5</manvolnum>
<manvolnum>5</manvolnum>
...
@@ -363,7 +363,7 @@ rootfs
...
@@ -363,7 +363,7 @@ rootfs
but if needed the <command>lxc-stop</command> command can
but if needed the <command>lxc-stop</command> command can
be used to kill the still running application.
be used to kill the still running application.
</para>
</para>
<para>
<para>
Running an application inside a container is not exactly the
Running an application inside a container is not exactly the
same thing as running a system. For this reason, there are two
same thing as running a system. For this reason, there are two
...
@@ -434,7 +434,7 @@ rootfs
...
@@ -434,7 +434,7 @@ rootfs
lxc-freeze -n foo
lxc-freeze -n foo
</programlisting>
</programlisting>
will put all the processes in an uninteruptible state and
will put all the processes in an uninteruptible state and
<programlisting>
<programlisting>
lxc-unfreeze -n foo
lxc-unfreeze -n foo
...
...
src/lxc/af_unix.c
View file @
f79d43bb
...
@@ -52,7 +52,7 @@ int lxc_af_unix_open(const char *path, int type, int flags)
...
@@ -52,7 +52,7 @@ int lxc_af_unix_open(const char *path, int type, int flags)
addr
.
sun_family
=
AF_UNIX
;
addr
.
sun_family
=
AF_UNIX
;
/* copy entire buffer in case of abstract socket */
/* copy entire buffer in case of abstract socket */
memcpy
(
addr
.
sun_path
,
path
,
memcpy
(
addr
.
sun_path
,
path
,
path
[
0
]
?
strlen
(
path
)
:
sizeof
(
addr
.
sun_path
));
path
[
0
]
?
strlen
(
path
)
:
sizeof
(
addr
.
sun_path
));
if
(
bind
(
fd
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
)))
{
if
(
bind
(
fd
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
)))
{
...
@@ -73,7 +73,7 @@ int lxc_af_unix_close(int fd)
...
@@ -73,7 +73,7 @@ int lxc_af_unix_close(int fd)
struct
sockaddr_un
addr
;
struct
sockaddr_un
addr
;
socklen_t
addrlen
;
socklen_t
addrlen
;
if
(
!
getsockname
(
fd
,
(
struct
sockaddr
*
)
&
addr
,
&
addrlen
)
&&
if
(
!
getsockname
(
fd
,
(
struct
sockaddr
*
)
&
addr
,
&
addrlen
)
&&
addr
.
sun_path
[
0
])
addr
.
sun_path
[
0
])
unlink
(
addr
.
sun_path
);
unlink
(
addr
.
sun_path
);
...
@@ -95,7 +95,7 @@ int lxc_af_unix_connect(const char *path)
...
@@ -95,7 +95,7 @@ int lxc_af_unix_connect(const char *path)
addr
.
sun_family
=
AF_UNIX
;
addr
.
sun_family
=
AF_UNIX
;
/* copy entire buffer in case of abstract socket */
/* copy entire buffer in case of abstract socket */
memcpy
(
addr
.
sun_path
,
path
,
memcpy
(
addr
.
sun_path
,
path
,
path
[
0
]
?
strlen
(
path
)
:
sizeof
(
addr
.
sun_path
));
path
[
0
]
?
strlen
(
path
)
:
sizeof
(
addr
.
sun_path
));
if
(
connect
(
fd
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
)))
{
if
(
connect
(
fd
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
)))
{
...
@@ -161,7 +161,7 @@ int lxc_af_unix_recv_fd(int fd, int *recvfd, void *data, size_t size)
...
@@ -161,7 +161,7 @@ int lxc_af_unix_recv_fd(int fd, int *recvfd, void *data, size_t size)
cmsg
=
CMSG_FIRSTHDR
(
&
msg
);
cmsg
=
CMSG_FIRSTHDR
(
&
msg
);
/* if the message is wrong the variable will not be
/* if the message is wrong the variable will not be
* filled and the peer will notified about a problem */
* filled and the peer will notified about a problem */
*
recvfd
=
-
1
;
*
recvfd
=
-
1
;
...
...
src/lxc/genl.c
View file @
f79d43bb
...
@@ -62,7 +62,7 @@ static int genetlink_resolve_family(const char *family)
...
@@ -62,7 +62,7 @@ static int genetlink_resolve_family(const char *family)
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
ret
=
nla_put_string
((
struct
nlmsg
*
)
&
request
->
nlmsghdr
,
ret
=
nla_put_string
((
struct
nlmsg
*
)
&
request
->
nlmsghdr
,
CTRL_ATTR_FAMILY_NAME
,
family
);
CTRL_ATTR_FAMILY_NAME
,
family
);
if
(
ret
)
if
(
ret
)
goto
out
;
goto
out
;
...
@@ -130,7 +130,7 @@ extern int genetlink_send(struct genl_handler *handler, struct genlmsg *genlmsg)
...
@@ -130,7 +130,7 @@ extern int genetlink_send(struct genl_handler *handler, struct genlmsg *genlmsg)
return
netlink_send
(
&
handler
->
nlh
,
(
struct
nlmsg
*
)
&
genlmsg
->
nlmsghdr
);
return
netlink_send
(
&
handler
->
nlh
,
(
struct
nlmsg
*
)
&
genlmsg
->
nlmsghdr
);
}
}
extern
int
genetlink_transaction
(
struct
genl_handler
*
handler
,
extern
int
genetlink_transaction
(
struct
genl_handler
*
handler
,
struct
genlmsg
*
request
,
struct
genlmsg
*
answer
)
struct
genlmsg
*
request
,
struct
genlmsg
*
answer
)
{
{
return
netlink_transaction
(
&
handler
->
nlh
,
(
struct
nlmsg
*
)
&
request
->
nlmsghdr
,
return
netlink_transaction
(
&
handler
->
nlh
,
(
struct
nlmsg
*
)
&
request
->
nlmsghdr
,
...
...
src/lxc/genl.h
View file @
f79d43bb
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
#define GENLMSG_DATA(glh) ((void *)(NLMSG_DATA(glh) + GENL_HDRLEN))
#define GENLMSG_DATA(glh) ((void *)(NLMSG_DATA(glh) + GENL_HDRLEN))
/*
/*
* struct genl_handler : the structure which store the netlink handler
* struct genl_handler : the structure which store the netlink handler
* and the family number resulting of the auto-generating id family
* and the family number resulting of the auto-generating id family
* for the generic netlink protocol
* for the generic netlink protocol
*
*
...
@@ -116,6 +116,6 @@ void genlmsg_free(struct genlmsg *genlmsg);
...
@@ -116,6 +116,6 @@ void genlmsg_free(struct genlmsg *genlmsg);
*
*
* Returns 0 on success, < 0 otherwise
* Returns 0 on success, < 0 otherwise
*/
*/
int
genetlink_transaction
(
struct
genl_handler
*
handler
,
int
genetlink_transaction
(
struct
genl_handler
*
handler
,
struct
genlmsg
*
request
,
struct
genlmsg
*
answer
);
struct
genlmsg
*
request
,
struct
genlmsg
*
answer
);
#endif
#endif
src/lxc/lxc-checkconfig.in
View file @
f79d43bb
...
@@ -89,7 +89,7 @@ fi
...
@@ -89,7 +89,7 @@ fi
echo
-n
"Cgroup device: "
&&
is_enabled CONFIG_CGROUP_DEVICE
echo
-n
"Cgroup device: "
&&
is_enabled CONFIG_CGROUP_DEVICE
echo
-n
"Cgroup sched: "
&&
is_enabled CONFIG_CGROUP_SCHED
echo
-n
"Cgroup sched: "
&&
is_enabled CONFIG_CGROUP_SCHED
echo
-n
"Cgroup cpu account: "
&&
is_enabled CONFIG_CGROUP_CPUACCT
echo
-n
"Cgroup cpu account: "
&&
is_enabled CONFIG_CGROUP_CPUACCT
echo
-n
"Cgroup memory controller: "
echo
-n
"Cgroup memory controller: "
if
[
$KVER_MAJOR
-ge
3
-a
$KVER_MINOR
-ge
6
]
;
then
if
[
$KVER_MAJOR
-ge
3
-a
$KVER_MINOR
-ge
6
]
;
then
is_enabled CONFIG_MEMCG
is_enabled CONFIG_MEMCG
else
else
...
...
src/lxc/lxc_monitor.c
View file @
f79d43bb
...
@@ -102,7 +102,7 @@ int main(int argc, char *argv[])
...
@@ -102,7 +102,7 @@ int main(int argc, char *argv[])
switch
(
msg
.
type
)
{
switch
(
msg
.
type
)
{
case
lxc_msg_state
:
case
lxc_msg_state
:
printf
(
"'%s' changed state to [%s]
\n
"
,
printf
(
"'%s' changed state to [%s]
\n
"
,
msg
.
name
,
lxc_state2str
(
msg
.
value
));
msg
.
name
,
lxc_state2str
(
msg
.
value
));
break
;
break
;
default:
default:
...
...
src/lxc/lxc_start.c
View file @
f79d43bb
...
@@ -122,7 +122,7 @@ int main(int argc, char *argv[])
...
@@ -122,7 +122,7 @@ int main(int argc, char *argv[])
return
err
;
return
err
;
if
(
!
my_args
.
argc
)
if
(
!
my_args
.
argc
)
args
=
default_args
;
args
=
default_args
;
else
else
args
=
my_args
.
argv
;
args
=
my_args
.
argv
;
...
...
src/lxc/mainloop.c
View file @
f79d43bb
...
@@ -59,7 +59,7 @@ int lxc_mainloop(struct lxc_epoll_descr *descr)
...
@@ -59,7 +59,7 @@ int lxc_mainloop(struct lxc_epoll_descr *descr)
/* If the handler returns a positive value, exit
/* If the handler returns a positive value, exit
the mainloop */
the mainloop */
if
(
handler
->
callback
(
handler
->
fd
,
handler
->
data
,
if
(
handler
->
callback
(
handler
->
fd
,
handler
->
data
,
descr
)
>
0
)
descr
)
>
0
)
return
0
;
return
0
;
}
}
...
@@ -69,7 +69,7 @@ int lxc_mainloop(struct lxc_epoll_descr *descr)
...
@@ -69,7 +69,7 @@ int lxc_mainloop(struct lxc_epoll_descr *descr)
}
}
}
}
int
lxc_mainloop_add_handler
(
struct
lxc_epoll_descr
*
descr
,
int
fd
,
int
lxc_mainloop_add_handler
(
struct
lxc_epoll_descr
*
descr
,
int
fd
,
lxc_mainloop_callback_t
callback
,
void
*
data
)
lxc_mainloop_callback_t
callback
,
void
*
data
)
{
{
struct
epoll_event
ev
;
struct
epoll_event
ev
;
...
...
src/lxc/mainloop.h
View file @
f79d43bb
...
@@ -28,13 +28,13 @@ struct lxc_epoll_descr {
...
@@ -28,13 +28,13 @@ struct lxc_epoll_descr {
struct
lxc_list
handlers
;
struct
lxc_list
handlers
;
};
};
typedef
int
(
*
lxc_mainloop_callback_t
)(
int
fd
,
void
*
data
,
typedef
int
(
*
lxc_mainloop_callback_t
)(
int
fd
,
void
*
data
,
struct
lxc_epoll_descr
*
descr
);
struct
lxc_epoll_descr
*
descr
);
extern
int
lxc_mainloop
(
struct
lxc_epoll_descr
*
descr
);
extern
int
lxc_mainloop
(
struct
lxc_epoll_descr
*
descr
);
extern
int
lxc_mainloop_add_handler
(
struct
lxc_epoll_descr
*
descr
,
int
fd
,
extern
int
lxc_mainloop_add_handler
(
struct
lxc_epoll_descr
*
descr
,
int
fd
,
lxc_mainloop_callback_t
callback
,
lxc_mainloop_callback_t
callback
,
void
*
data
);
void
*
data
);
extern
int
lxc_mainloop_del_handler
(
struct
lxc_epoll_descr
*
descr
,
int
fd
);
extern
int
lxc_mainloop_del_handler
(
struct
lxc_epoll_descr
*
descr
,
int
fd
);
...
...
src/lxc/network.h
View file @
f79d43bb
...
@@ -100,7 +100,7 @@ extern int lxc_ipv6_gateway_add(int ifindex, struct in6_addr *gw);
...
@@ -100,7 +100,7 @@ extern int lxc_ipv6_gateway_add(int ifindex, struct in6_addr *gw);
*/
*/
extern
int
lxc_bridge_attach
(
const
char
*
bridge
,
const
char
*
ifname
);
extern
int
lxc_bridge_attach
(
const
char
*
bridge
,
const
char
*
ifname
);
/*
/*
* Create default gateway
* Create default gateway
*/
*/
extern
int
lxc_route_create_default
(
const
char
*
addr
,
const
char
*
ifname
,
extern
int
lxc_route_create_default
(
const
char
*
addr
,
const
char
*
ifname
,
...
...
src/lxc/nl.c
View file @
f79d43bb
...
@@ -48,7 +48,7 @@ extern void *nlmsg_data(struct nlmsg *nlmsg)
...
@@ -48,7 +48,7 @@ extern void *nlmsg_data(struct nlmsg *nlmsg)
return
data
;
return
data
;
}
}
static
int
nla_put
(
struct
nlmsg
*
nlmsg
,
int
attr
,
static
int
nla_put
(
struct
nlmsg
*
nlmsg
,
int
attr
,
const
void
*
data
,
size_t
len
)
const
void
*
data
,
size_t
len
)
{
{
struct
rtattr
*
rta
;
struct
rtattr
*
rta
;
...
@@ -63,7 +63,7 @@ static int nla_put(struct nlmsg *nlmsg, int attr,
...
@@ -63,7 +63,7 @@ static int nla_put(struct nlmsg *nlmsg, int attr,
return
0
;
return
0
;
}
}
extern
int
nla_put_buffer
(
struct
nlmsg
*
nlmsg
,
int
attr
,
extern
int
nla_put_buffer
(
struct
nlmsg
*
nlmsg
,
int
attr
,
const
void
*
data
,
size_t
size
)
const
void
*
data
,
size_t
size
)
{
{
return
nla_put
(
nlmsg
,
attr
,
data
,
size
);
return
nla_put
(
nlmsg
,
attr
,
data
,
size
);
...
@@ -193,7 +193,7 @@ extern int netlink_send(struct nl_handler *handler, struct nlmsg *nlmsg)
...
@@ -193,7 +193,7 @@ extern int netlink_send(struct nl_handler *handler, struct nlmsg *nlmsg)
#ifndef NLMSG_ERROR
#ifndef NLMSG_ERROR
#define NLMSG_ERROR 0x2
#define NLMSG_ERROR 0x2
#endif
#endif
extern
int
netlink_transaction
(
struct
nl_handler
*
handler
,
extern
int
netlink_transaction
(
struct
nl_handler
*
handler
,
struct
nlmsg
*
request
,
struct
nlmsg
*
answer
)
struct
nlmsg
*
request
,
struct
nlmsg
*
answer
)
{
{
int
ret
;
int
ret
;
...
@@ -226,11 +226,11 @@ extern int netlink_open(struct nl_handler *handler, int protocol)
...
@@ -226,11 +226,11 @@ extern int netlink_open(struct nl_handler *handler, int protocol)
if
(
handler
->
fd
<
0
)
if
(
handler
->
fd
<
0
)
return
-
errno
;
return
-
errno
;
if
(
setsockopt
(
handler
->
fd
,
SOL_SOCKET
,
SO_SNDBUF
,
if
(
setsockopt
(
handler
->
fd
,
SOL_SOCKET
,
SO_SNDBUF
,
&
sndbuf
,
sizeof
(
sndbuf
))
<
0
)
&
sndbuf
,
sizeof
(
sndbuf
))
<
0
)
return
-
errno
;
return
-
errno
;
if
(
setsockopt
(
handler
->
fd
,
SOL_SOCKET
,
SO_RCVBUF
,
if
(
setsockopt
(
handler
->
fd
,
SOL_SOCKET
,
SO_RCVBUF
,
&
rcvbuf
,
sizeof
(
rcvbuf
))
<
0
)
&
rcvbuf
,
sizeof
(
rcvbuf
))
<
0
)
return
-
errno
;
return
-
errno
;
...
@@ -238,12 +238,12 @@ extern int netlink_open(struct nl_handler *handler, int protocol)
...
@@ -238,12 +238,12 @@ extern int netlink_open(struct nl_handler *handler, int protocol)
handler
->
local
.
nl_family
=
AF_NETLINK
;
handler
->
local
.
nl_family
=
AF_NETLINK
;
handler
->
local
.
nl_groups
=
0
;
handler
->
local
.
nl_groups
=
0
;
if
(
bind
(
handler
->
fd
,
(
struct
sockaddr
*
)
&
handler
->
local
,
if
(
bind
(
handler
->
fd
,
(
struct
sockaddr
*
)
&
handler
->
local
,
sizeof
(
handler
->
local
))
<
0
)
sizeof
(
handler
->
local
))
<
0
)
return
-
errno
;
return
-
errno
;
socklen
=
sizeof
(
handler
->
local
);
socklen
=
sizeof
(
handler
->
local
);
if
(
getsockname
(
handler
->
fd
,
(
struct
sockaddr
*
)
&
handler
->
local
,
if
(
getsockname
(
handler
->
fd
,
(
struct
sockaddr
*
)
&
handler
->
local
,
&
socklen
)
<
0
)
&
socklen
)
<
0
)
return
-
errno
;
return
-
errno
;
...
...
src/lxc/nl.h
View file @
f79d43bb
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
* struct nl_handler : the handler for netlink sockets, this structure
* struct nl_handler : the handler for netlink sockets, this structure
* is used all along the netlink socket life cycle to specify the
* is used all along the netlink socket life cycle to specify the
* netlink socket to be used.
* netlink socket to be used.
*
*
* @fd: the file descriptor of the netlink socket
* @fd: the file descriptor of the netlink socket
* @seq: the sequence number of the netlink messages
* @seq: the sequence number of the netlink messages
* @local: the bind address
* @local: the bind address
...
@@ -77,7 +77,7 @@ struct nlmsg {
...
@@ -77,7 +77,7 @@ struct nlmsg {
int
netlink_open
(
struct
nl_handler
*
handler
,
int
protocol
);
int
netlink_open
(
struct
nl_handler
*
handler
,
int
protocol
);
/*
/*
* netlink_close : close a netlink socket, after this call,
* netlink_close : close a netlink socket, after this call,
* the handler is no longer valid
* the handler is no longer valid
*
*
* @handler: a handler to the netlink socket
* @handler: a handler to the netlink socket
...
@@ -87,8 +87,8 @@ int netlink_open(struct nl_handler *handler, int protocol);
...
@@ -87,8 +87,8 @@ int netlink_open(struct nl_handler *handler, int protocol);
int
netlink_close
(
struct
nl_handler
*
handler
);
int
netlink_close
(
struct
nl_handler
*
handler
);
/*
/*
* netlink_rcv : receive a netlink message from the kernel.
* netlink_rcv : receive a netlink message from the kernel.
* It is up to the caller to manage the allocation of the
* It is up to the caller to manage the allocation of the
* netlink message
* netlink message
*
*
* @handler: a handler to the netlink socket
* @handler: a handler to the netlink socket
...
@@ -110,8 +110,8 @@ int netlink_rcv(struct nl_handler *handler, struct nlmsg *nlmsg);
...
@@ -110,8 +110,8 @@ int netlink_rcv(struct nl_handler *handler, struct nlmsg *nlmsg);
int
netlink_send
(
struct
nl_handler
*
handler
,
struct
nlmsg
*
nlmsg
);
int
netlink_send
(
struct
nl_handler
*
handler
,
struct
nlmsg
*
nlmsg
);
/*
/*
* netlink_transaction: send a request to the kernel and read the response.
* netlink_transaction: send a request to the kernel and read the response.
* This is useful for transactional protocol. It is up to the caller
* This is useful for transactional protocol. It is up to the caller
* to manage the allocation of the netlink message.
* to manage the allocation of the netlink message.
*
*
* @handler: a handler to a opened netlink socket
* @handler: a handler to a opened netlink socket
...
@@ -120,11 +120,11 @@ int netlink_send(struct nl_handler *handler, struct nlmsg *nlmsg);
...
@@ -120,11 +120,11 @@ int netlink_send(struct nl_handler *handler, struct nlmsg *nlmsg);
*
*
* Returns 0 on success, < 0 otherwise
* Returns 0 on success, < 0 otherwise
*/
*/
int
netlink_transaction
(
struct
nl_handler
*
handler
,
int
netlink_transaction
(
struct
nl_handler
*
handler
,
struct
nlmsg
*
request
,
struct
nlmsg
*
anwser
);
struct
nlmsg
*
request
,
struct
nlmsg
*
anwser
);
/*
/*
* nla_put_string: copy a null terminated string to a netlink message
* nla_put_string: copy a null terminated string to a netlink message
* attribute
* attribute
*
*
* @nlmsg: the netlink message to be filled
* @nlmsg: the netlink message to be filled
...
@@ -146,7 +146,7 @@ int nla_put_string(struct nlmsg *nlmsg, int attr, const char *string);
...
@@ -146,7 +146,7 @@ int nla_put_string(struct nlmsg *nlmsg, int attr, const char *string);
*
*
* Returns 0 on success, < 0 otherwise
* Returns 0 on success, < 0 otherwise
*/
*/
int
nla_put_buffer
(
struct
nlmsg
*
nlmsg
,
int
attr
,
int
nla_put_buffer
(
struct
nlmsg
*
nlmsg
,
int
attr
,
const
void
*
data
,
size_t
size
);
const
void
*
data
,
size_t
size
);
/*
/*
...
@@ -172,7 +172,7 @@ int nla_put_u32(struct nlmsg *nlmsg, int attr, int value);
...
@@ -172,7 +172,7 @@ int nla_put_u32(struct nlmsg *nlmsg, int attr, int value);
int
nla_put_u16
(
struct
nlmsg
*
nlmsg
,
int
attr
,
ushort
value
);
int
nla_put_u16
(
struct
nlmsg
*
nlmsg
,
int
attr
,
ushort
value
);
/*
/*
* nla_put_attr: add an attribute name to a netlink
* nla_put_attr: add an attribute name to a netlink
*
*
* @nlmsg: the netlink message to be filled
* @nlmsg: the netlink message to be filled
* @attr: the attribute name of the integer
* @attr: the attribute name of the integer
...
@@ -185,7 +185,7 @@ int nla_put_attr(struct nlmsg *nlmsg, int attr);
...
@@ -185,7 +185,7 @@ int nla_put_attr(struct nlmsg *nlmsg, int attr);
* nla_begin_nested: begin the nesting attribute
* nla_begin_nested: begin the nesting attribute
*
*
* @nlmsg: the netlink message to be filled
* @nlmsg: the netlink message to be filled
* @attr: the netsted attribute name
* @attr: the netsted attribute name
*
*
* Returns current nested pointer to be reused
* Returns current nested pointer to be reused
* to nla_end_nested.
* to nla_end_nested.
...
@@ -198,17 +198,17 @@ struct rtattr *nla_begin_nested(struct nlmsg *nlmsg, int attr);
...
@@ -198,17 +198,17 @@ struct rtattr *nla_begin_nested(struct nlmsg *nlmsg, int attr);
* @nlmsg: the netlink message
* @nlmsg: the netlink message
* @nested: the nested pointer
* @nested: the nested pointer
*
*
* Returns the current
* Returns the current
*/
*/
void
nla_end_nested
(
struct
nlmsg
*
nlmsg
,
struct
rtattr
*
attr
);
void
nla_end_nested
(
struct
nlmsg
*
nlmsg
,
struct
rtattr
*
attr
);
/*
/*
* nlmsg_allocate : allocate a netlink message. The netlink format message
* nlmsg_allocate : allocate a netlink message. The netlink format message
* is a header, a padding, a payload and a padding again.
* is a header, a padding, a payload and a padding again.
* When a netlink message is allocated, the size specify the
* When a netlink message is allocated, the size specify the
* payload we want. So the real size of the allocated message
* payload we want. So the real size of the allocated message
* is sizeof(header) + sizeof(padding) + payloadsize + sizeof(padding),
* is sizeof(header) + sizeof(padding) + payloadsize + sizeof(padding),
* in other words, the function will allocate more than specified. When
* in other words, the function will allocate more than specified. When
* the buffer is allocated, the content is zeroed.
* the buffer is allocated, the content is zeroed.
* The function will also fill the field nlmsg_len with computed size.
* The function will also fill the field nlmsg_len with computed size.
* If the allocation must be for the specified size, just use malloc.
* If the allocation must be for the specified size, just use malloc.
...
@@ -228,7 +228,7 @@ void nlmsg_free(struct nlmsg *nlmsg);
...
@@ -228,7 +228,7 @@ void nlmsg_free(struct nlmsg *nlmsg);
/*
/*
* nlmsg_data : returns a pointer to the data contained in the netlink message
* nlmsg_data : returns a pointer to the data contained in the netlink message
*
*
* @nlmsg : the netlink message to get the data
* @nlmsg : the netlink message to get the data
*
*
* Returns a pointer to the netlink data or NULL if there is no data
* Returns a pointer to the netlink data or NULL if there is no data
...
...
src/lxc/rtnl.c
View file @
f79d43bb
...
@@ -53,7 +53,7 @@ extern int rtnetlink_send(struct rtnl_handler *handler, struct rtnlmsg *rtnlmsg)
...
@@ -53,7 +53,7 @@ extern int rtnetlink_send(struct rtnl_handler *handler, struct rtnlmsg *rtnlmsg)
return
netlink_send
(
&
handler
->
nlh
,
(
struct
nlmsg
*
)
&
rtnlmsg
->
nlmsghdr
);
return
netlink_send
(
&
handler
->
nlh
,
(
struct
nlmsg
*
)
&
rtnlmsg
->
nlmsghdr
);
}
}
extern
int
rtnetlink_transaction
(
struct
rtnl_handler
*
handler
,
extern
int
rtnetlink_transaction
(
struct
rtnl_handler
*
handler
,
struct
rtnlmsg
*
request
,
struct
rtnlmsg
*
answer
)
struct
rtnlmsg
*
request
,
struct
rtnlmsg
*
answer
)
{
{
return
netlink_transaction
(
&
handler
->
nlh
,
(
struct
nlmsg
*
)
&
request
->
nlmsghdr
,
return
netlink_transaction
(
&
handler
->
nlh
,
(
struct
nlmsg
*
)
&
request
->
nlmsghdr
,
...
...
src/lxc/rtnl.h
View file @
f79d43bb
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
#define RTNLMSG_DATA(glh) ((void *)(NLMSG_DATA(glh) + RTNL_HDRLEN))
#define RTNLMSG_DATA(glh) ((void *)(NLMSG_DATA(glh) + RTNL_HDRLEN))
/*
/*
* struct genl_handler : the structure which store the netlink handler
* struct genl_handler : the structure which store the netlink handler
* and the family number
* and the family number
*
*
* @nlh: the netlink socket handler
* @nlh: the netlink socket handler
...
@@ -105,6 +105,6 @@ void rtnlmsg_free(struct rtnlmsg *rtnlmsg);
...
@@ -105,6 +105,6 @@ void rtnlmsg_free(struct rtnlmsg *rtnlmsg);
*
*
* Returns 0 on success, < 0 otherwise
* Returns 0 on success, < 0 otherwise
*/
*/
int
rtnetlink_transaction
(
struct
rtnl_handler
*
handler
,
int
rtnetlink_transaction
(
struct
rtnl_handler
*
handler
,
struct
rtnlmsg
*
request
,
struct
rtnlmsg
*
answer
);
struct
rtnlmsg
*
request
,
struct
rtnlmsg
*
answer
);
#endif
#endif
templates/lxc-debian.in
View file @
f79d43bb
...
@@ -54,7 +54,7 @@ c1:12345:respawn:/sbin/getty 38400 tty1 linux
...
@@ -54,7 +54,7 @@ c1:12345:respawn:/sbin/getty 38400 tty1 linux
c2:12345:respawn:/sbin/getty 38400 tty2 linux
c2:12345:respawn:/sbin/getty 38400 tty2 linux
c3:12345:respawn:/sbin/getty 38400 tty3 linux
c3:12345:respawn:/sbin/getty 38400 tty3 linux
c4:12345:respawn:/sbin/getty 38400 tty4 linux
c4:12345:respawn:/sbin/getty 38400 tty4 linux
p6::ctrlaltdel:/sbin/init 6
p6::ctrlaltdel:/sbin/init 6
p0::powerfail:/sbin/init 0
p0::powerfail:/sbin/init 0
EOF
EOF
...
...
templates/lxc-oracle.in
View file @
f79d43bb
...
@@ -105,7 +105,7 @@ EOF
...
@@ -105,7 +105,7 @@ EOF
# remove module stuff for iptables it just shows errors that are not
# remove module stuff for iptables it just shows errors that are not
# relevant in a container
# relevant in a container
if
[
-f
"
$container_rootfs
/etc/sysconfig/iptables-config"
]
;
then
if
[
-f
"
$container_rootfs
/etc/sysconfig/iptables-config"
]
;
then
sed
-i
's|IPTABLES_MODULES=".*|IPTABLES_MODULES=""|'
$container_rootfs
/etc/sysconfig/iptables-config
sed
-i
's|IPTABLES_MODULES=".*|IPTABLES_MODULES=""|'
$container_rootfs
/etc/sysconfig/iptables-config
sed
-i
's|IPTABLES_MODULES_UNLOAD=".*|IPTABLES_MODULES_UNLOAD="no"|'
$container_rootfs
/etc/sysconfig/iptables-config
sed
-i
's|IPTABLES_MODULES_UNLOAD=".*|IPTABLES_MODULES_UNLOAD="no"|'
$container_rootfs
/etc/sysconfig/iptables-config
fi
fi
...
...
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