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
62c990f8
Commit
62c990f8
authored
Nov 23, 2016
by
Christian Brauner
Committed by
Stéphane Graber
Nov 30, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf: non-functional changes
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
d4d6b0ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
41 deletions
+37
-41
conf.c
src/lxc/conf.c
+37
-41
No files found.
src/lxc/conf.c
View file @
62c990f8
...
@@ -24,20 +24,34 @@
...
@@ -24,20 +24,34 @@
#define _GNU_SOURCE
#define _GNU_SOURCE
#include "config.h"
#include "config.h"
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <grp.h>
#include <inttypes.h>
#include <libgen.h>
#include <pwd.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <stdarg.h>
#include <errno.h>
#include <string.h>
#include <string.h>
#include <
dirent
.h>
#include <
time
.h>
#include <unistd.h>
#include <unistd.h>
#include <inttypes.h>
#include <arpa/inet.h>
#include <sys/wait.h>
#include <linux/loop.h>
#include <linux/memfd.h>
#include <net/if.h>
#include <netinet/in.h>
#include <sys/mman.h>
#include <sys/mount.h>
#include <sys/param.h>
#include <sys/prctl.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/syscall.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <sys/types.h>
#include <pwd.h>
#include <sys/utsname.h>
#include <grp.h>
#include <sys/wait.h>
#include <time.h>
#ifdef HAVE_STATVFS
#ifdef HAVE_STATVFS
#include <sys/statvfs.h>
#include <sys/statvfs.h>
...
@@ -49,37 +63,21 @@
...
@@ -49,37 +63,21 @@
#include <../include/openpty.h>
#include <../include/openpty.h>
#endif
#endif
#include <linux/loop.h>
#include <sys/types.h>
#include <sys/utsname.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/mount.h>
#include <sys/mman.h>
#include <sys/prctl.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <net/if.h>
#include <libgen.h>
#include "bdev.h"
#include "network.h"
#include "error.h"
#include "af_unix.h"
#include "af_unix.h"
#include "parse.h"
#include "bdev.h"
#include "utils.h"
#include "caps.h"
/* for lxc_caps_last_cap() */
#include "cgroup.h"
#include "conf.h"
#include "conf.h"
#include "error.h"
#include "log.h"
#include "log.h"
#include "caps.h"
/* for lxc_caps_last_cap() */
#include "lxcaufs.h"
#include "lxcaufs.h"
#include "lxcoverlay.h"
#include "cgroup.h"
#include "lxclock.h"
#include "lxclock.h"
#include "lxcoverlay.h"
#include "lxcseccomp.h"
#include "namespace.h"
#include "namespace.h"
#include "network.h"
#include "parse.h"
#include "utils.h"
#include "lsm/lsm.h"
#include "lsm/lsm.h"
#if HAVE_SYS_CAPABILITY_H
#if HAVE_SYS_CAPABILITY_H
...
@@ -96,8 +94,6 @@
...
@@ -96,8 +94,6 @@
#include <mntent.h>
#include <mntent.h>
#endif
#endif
#include "lxcseccomp.h"
lxc_log_define
(
lxc_conf
,
lxc
);
lxc_log_define
(
lxc_conf
,
lxc
);
#define LINELEN 4096
#define LINELEN 4096
...
@@ -135,10 +131,10 @@ lxc_log_define(lxc_conf, lxc);
...
@@ -135,10 +131,10 @@ lxc_log_define(lxc_conf, lxc);
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
);
#else
#else
errno
=
ENOSYS
;
errno
=
ENOSYS
;
return
-
1
;
return
-
1
;
#endif
#endif
}
}
#else
#else
...
@@ -150,10 +146,10 @@ extern int pivot_root(const char * new_root, const char * put_old);
...
@@ -150,10 +146,10 @@ extern int pivot_root(const char * new_root, const char * put_old);
static
int
sethostname
(
const
char
*
name
,
size_t
len
)
static
int
sethostname
(
const
char
*
name
,
size_t
len
)
{
{
#ifdef __NR_sethostname
#ifdef __NR_sethostname
return
syscall
(
__NR_sethostname
,
name
,
len
);
return
syscall
(
__NR_sethostname
,
name
,
len
);
#else
#else
errno
=
ENOSYS
;
errno
=
ENOSYS
;
return
-
1
;
return
-
1
;
#endif
#endif
}
}
#endif
#endif
...
...
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