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
8d1b71bb
Commit
8d1b71bb
authored
Feb 04, 2016
by
Christian Brauner
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #798 from hallyn/2016-02-02/commentrootfs
Comment the lxc_rootfs structure
parents
2a2d3caf
59bb8698
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
9 deletions
+6
-9
conf.c
src/lxc/conf.c
+2
-3
conf.h
src/lxc/conf.h
+3
-3
confile.c
src/lxc/confile.c
+1
-3
No files found.
src/lxc/conf.c
View file @
8d1b71bb
...
@@ -997,7 +997,7 @@ static int setup_tty(struct lxc_conf *conf)
...
@@ -997,7 +997,7 @@ static int setup_tty(struct lxc_conf *conf)
}
}
static
int
setup_rootfs_pivot_root
(
const
char
*
rootfs
,
const
char
*
pivotdir
)
static
int
setup_rootfs_pivot_root
(
const
char
*
rootfs
)
{
{
int
oldroot
=
-
1
,
newroot
=
-
1
;
int
oldroot
=
-
1
,
newroot
=
-
1
;
...
@@ -1319,7 +1319,7 @@ static int setup_pivot_root(const struct lxc_rootfs *rootfs)
...
@@ -1319,7 +1319,7 @@ static int setup_pivot_root(const struct lxc_rootfs *rootfs)
if
(
detect_ramfs_rootfs
())
{
if
(
detect_ramfs_rootfs
())
{
if
(
prepare_ramfs_root
(
rootfs
->
mount
))
if
(
prepare_ramfs_root
(
rootfs
->
mount
))
return
-
1
;
return
-
1
;
}
else
if
(
setup_rootfs_pivot_root
(
rootfs
->
mount
,
rootfs
->
pivot
))
{
}
else
if
(
setup_rootfs_pivot_root
(
rootfs
->
mount
))
{
ERROR
(
"failed to setup pivot root"
);
ERROR
(
"failed to setup pivot root"
);
return
-
1
;
return
-
1
;
}
}
...
@@ -4139,7 +4139,6 @@ void lxc_conf_free(struct lxc_conf *conf)
...
@@ -4139,7 +4139,6 @@ void lxc_conf_free(struct lxc_conf *conf)
free
(
conf
->
rootfs
.
mount
);
free
(
conf
->
rootfs
.
mount
);
free
(
conf
->
rootfs
.
options
);
free
(
conf
->
rootfs
.
options
);
free
(
conf
->
rootfs
.
path
);
free
(
conf
->
rootfs
.
path
);
free
(
conf
->
rootfs
.
pivot
);
free
(
conf
->
logfile
);
free
(
conf
->
logfile
);
if
(
conf
->
logfd
!=
-
1
)
if
(
conf
->
logfd
!=
-
1
)
close
(
conf
->
logfd
);
close
(
conf
->
logfd
);
...
...
src/lxc/conf.h
View file @
8d1b71bb
...
@@ -217,13 +217,13 @@ struct lxc_console {
...
@@ -217,13 +217,13 @@ struct lxc_console {
/*
/*
* Defines a structure to store the rootfs location, the
* Defines a structure to store the rootfs location, the
* optionals pivot_root, rootfs mount paths
* optionals pivot_root, rootfs mount paths
* @rootfs : a path to the rootfs
* @path : the rootfs source (directory or device)
* @pivot_root : a path to a pivot_root location to be used
* @mount : where it is mounted
* @options : mount options
*/
*/
struct
lxc_rootfs
{
struct
lxc_rootfs
{
char
*
path
;
char
*
path
;
char
*
mount
;
char
*
mount
;
char
*
pivot
;
char
*
options
;
char
*
options
;
};
};
...
...
src/lxc/confile.c
View file @
8d1b71bb
...
@@ -1857,7 +1857,7 @@ static int config_pivotdir(const char *key, const char *value,
...
@@ -1857,7 +1857,7 @@ static int config_pivotdir(const char *key, const char *value,
struct
lxc_conf
*
lxc_conf
)
struct
lxc_conf
*
lxc_conf
)
{
{
WARN
(
"lxc.pivotdir is ignored. It will soon become an error."
);
WARN
(
"lxc.pivotdir is ignored. It will soon become an error."
);
return
config_path_item
(
&
lxc_conf
->
rootfs
.
pivot
,
value
)
;
return
0
;
}
}
static
int
config_utsname
(
const
char
*
key
,
const
char
*
value
,
static
int
config_utsname
(
const
char
*
key
,
const
char
*
value
,
...
@@ -2478,8 +2478,6 @@ int lxc_get_config_item(struct lxc_conf *c, const char *key, char *retv,
...
@@ -2478,8 +2478,6 @@ int lxc_get_config_item(struct lxc_conf *c, const char *key, char *retv,
v
=
c
->
rootfs
.
options
;
v
=
c
->
rootfs
.
options
;
else
if
(
strcmp
(
key
,
"lxc.rootfs"
)
==
0
)
else
if
(
strcmp
(
key
,
"lxc.rootfs"
)
==
0
)
v
=
c
->
rootfs
.
path
;
v
=
c
->
rootfs
.
path
;
else
if
(
strcmp
(
key
,
"lxc.pivotdir"
)
==
0
)
v
=
c
->
rootfs
.
pivot
;
else
if
(
strcmp
(
key
,
"lxc.cap.drop"
)
==
0
)
else
if
(
strcmp
(
key
,
"lxc.cap.drop"
)
==
0
)
return
lxc_get_item_cap_drop
(
c
,
retv
,
inlen
);
return
lxc_get_item_cap_drop
(
c
,
retv
,
inlen
);
else
if
(
strcmp
(
key
,
"lxc.cap.keep"
)
==
0
)
else
if
(
strcmp
(
key
,
"lxc.cap.keep"
)
==
0
)
...
...
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