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
9d257a2a
Unverified
Commit
9d257a2a
authored
Mar 10, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf: order includes
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
0e83121c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
35 deletions
+34
-35
conf.c
src/lxc/conf.c
+34
-35
No files found.
src/lxc/conf.c
View file @
9d257a2a
...
@@ -24,38 +24,37 @@
...
@@ -24,38 +24,37 @@
#define _GNU_SOURCE
#define _GNU_SOURCE
#include "config.h"
#include "config.h"
#include <arpa/inet.h>
#include <dirent.h>
#include <dirent.h>
#include <errno.h>
#include <errno.h>
#include <fcntl.h>
#include <fcntl.h>
#include <grp.h>
#include <grp.h>
#include <inttypes.h>
#include <inttypes.h>
#include <libgen.h>
#include <libgen.h>
#include <linux/loop.h>
#include <net/if.h>
#include <netinet/in.h>
#include <pwd.h>
#include <pwd.h>
#include <stdarg.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <linux/loop.h>
#include <net/if.h>
#include <netinet/in.h>
#include <sys/mman.h>
#include <sys/mman.h>
#include <sys/mount.h>
#include <sys/mount.h>
#include <sys/param.h>
#include <sys/param.h>
#include <sys/prctl.h>
#include <sys/prctl.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/socket.h>
#include <sys/s
ysmacros
.h>
#include <sys/s
tat
.h>
#include <sys/syscall.h>
#include <sys/syscall.h>
#include <sys/sysmacros.h>
#include <sys/types.h>
#include <sys/types.h>
#include <sys/utsname.h>
#include <sys/utsname.h>
#include <sys/wait.h>
#include <sys/wait.h>
#include <time.h>
#include <unistd.h>
/* makedev() */
#ifdef MAJOR_IN_MKDEV
#ifdef MAJOR_IN_MKDEV
#
include <sys/mkdev.h>
#include <sys/mkdev.h>
#endif
#endif
#ifdef HAVE_STATVFS
#ifdef HAVE_STATVFS
...
@@ -68,8 +67,26 @@
...
@@ -68,8 +67,26 @@
#include <../include/openpty.h>
#include <../include/openpty.h>
#endif
#endif
#if HAVE_LIBCAP
#include <sys/capability.h>
#endif
#if HAVE_SYS_PERSONALITY_H
#include <sys/personality.h>
#endif
#if IS_BIONIC
#include <../include/lxcmntent.h>
#else
#include <mntent.h>
#endif
#if !defined(HAVE_PRLIMIT) && defined(HAVE_PRLIMIT64)
#include <../include/prlimit.h>
#endif
#include "af_unix.h"
#include "af_unix.h"
#include "caps.h"
/* for lxc_caps_last_cap() */
#include "caps.h"
#include "cgroup.h"
#include "cgroup.h"
#include "conf.h"
#include "conf.h"
#include "confile_utils.h"
#include "confile_utils.h"
...
@@ -88,29 +105,19 @@
...
@@ -88,29 +105,19 @@
#include "terminal.h"
#include "terminal.h"
#include "utils.h"
#include "utils.h"
#if HAVE_LIBCAP
#ifndef MS_PRIVATE
#include <sys/capability.h>
#define MS_PRIVATE (1<<18)
#endif
#if HAVE_SYS_PERSONALITY_H
#include <sys/personality.h>
#endif
#if IS_BIONIC
#include <../include/lxcmntent.h>
#else
#include <mntent.h>
#endif
#endif
#if
!defined(HAVE_PRLIMIT) && defined(HAVE_PRLIMIT64)
#if
ndef MS_LAZYTIME
#
include <../include/prlimit.h>
#
define MS_LAZYTIME (1<<25)
#endif
#endif
lxc_log_define
(
lxc_conf
,
lxc
);
lxc_log_define
(
lxc_conf
,
lxc
);
/* Define pivot_root() if missing from the C library */
/* Define pivot_root() if missing from the C library */
#ifndef HAVE_PIVOT_ROOT
#ifndef HAVE_PIVOT_ROOT
static
int
pivot_root
(
const
char
*
new_root
,
const
char
*
put_old
)
static
int
pivot_root
(
const
char
*
new_root
,
const
char
*
put_old
)
{
{
#ifdef __NR_pivot_root
#ifdef __NR_pivot_root
return
syscall
(
__NR_pivot_root
,
new_root
,
put_old
);
return
syscall
(
__NR_pivot_root
,
new_root
,
put_old
);
...
@@ -120,15 +127,7 @@ static int pivot_root(const char * new_root, const char * put_old)
...
@@ -120,15 +127,7 @@ static int pivot_root(const char * new_root, const char * put_old)
#endif
#endif
}
}
#else
#else
extern
int
pivot_root
(
const
char
*
new_root
,
const
char
*
put_old
);
extern
int
pivot_root
(
const
char
*
new_root
,
const
char
*
put_old
);
#endif
#ifndef MS_PRIVATE
#define MS_PRIVATE (1<<18)
#endif
#ifndef MS_LAZYTIME
#define MS_LAZYTIME (1<<25)
#endif
#endif
char
*
lxchook_names
[
NUM_LXC_HOOKS
]
=
{
"pre-start"
,
"pre-mount"
,
"mount"
,
char
*
lxchook_names
[
NUM_LXC_HOOKS
]
=
{
"pre-start"
,
"pre-mount"
,
"mount"
,
...
...
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