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
ea11a215
Unverified
Commit
ea11a215
authored
Feb 04, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tree-wide: s/dfd_root_host/dfd_host/g
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
ea57e424
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
conf.c
src/lxc/conf.c
+8
-8
conf.h
src/lxc/conf.h
+1
-1
No files found.
src/lxc/conf.c
View file @
ea11a215
...
@@ -1208,7 +1208,7 @@ static int lxc_fill_autodev(const struct lxc_rootfs *rootfs)
...
@@ -1208,7 +1208,7 @@ static int lxc_fill_autodev(const struct lxc_rootfs *rootfs)
if
(
ret
<
0
||
(
size_t
)
ret
>=
sizeof
(
device_path
))
if
(
ret
<
0
||
(
size_t
)
ret
>=
sizeof
(
device_path
))
return
ret_errno
(
EIO
);
return
ret_errno
(
EIO
);
ret
=
mount_from_at
(
rootfs
->
dfd_
root_
host
,
device_path
,
ret
=
mount_from_at
(
rootfs
->
dfd_host
,
device_path
,
PROTECT_OPATH_FILE
,
PROTECT_OPATH_FILE
,
PROTECT_LOOKUP_BENEATH_XDEV
,
PROTECT_LOOKUP_BENEATH_XDEV
,
rootfs
->
dfd_dev
,
device
->
name
,
rootfs
->
dfd_dev
,
device
->
name
,
...
@@ -1223,7 +1223,7 @@ static int lxc_fill_autodev(const struct lxc_rootfs *rootfs)
...
@@ -1223,7 +1223,7 @@ static int lxc_fill_autodev(const struct lxc_rootfs *rootfs)
if
(
errno
!=
ENOSYS
)
if
(
errno
!=
ENOSYS
)
return
log_error_errno
(
-
errno
,
errno
,
return
log_error_errno
(
-
errno
,
errno
,
"Failed to mount %d(%s) to %d(%s)"
,
"Failed to mount %d(%s) to %d(%s)"
,
rootfs
->
dfd_
root_
host
,
rootfs
->
dfd_host
,
device_path
,
device_path
,
rootfs
->
dfd_dev
,
rootfs
->
dfd_dev
,
device
->
name
);
device
->
name
);
...
@@ -1243,7 +1243,7 @@ static int lxc_fill_autodev(const struct lxc_rootfs *rootfs)
...
@@ -1243,7 +1243,7 @@ static int lxc_fill_autodev(const struct lxc_rootfs *rootfs)
DEBUG
(
"Bind mounted host device node
\"
%s
\"
to
\"
%s
\"
"
,
device_path
,
path
);
DEBUG
(
"Bind mounted host device node
\"
%s
\"
to
\"
%s
\"
"
,
device_path
,
path
);
continue
;
continue
;
}
}
DEBUG
(
"Bind mounted host device %d(%s) to %d(%s)"
,
rootfs
->
dfd_
root_
host
,
device_path
,
rootfs
->
dfd_dev
,
device
->
name
);
DEBUG
(
"Bind mounted host device %d(%s) to %d(%s)"
,
rootfs
->
dfd_host
,
device_path
,
rootfs
->
dfd_dev
,
device
->
name
);
}
}
(
void
)
umask
(
cmask
);
(
void
)
umask
(
cmask
);
...
@@ -2635,7 +2635,7 @@ struct lxc_conf *lxc_conf_init(void)
...
@@ -2635,7 +2635,7 @@ struct lxc_conf *lxc_conf_init(void)
new
->
rootfs
.
managed
=
true
;
new
->
rootfs
.
managed
=
true
;
new
->
rootfs
.
dfd_mnt
=
-
EBADF
;
new
->
rootfs
.
dfd_mnt
=
-
EBADF
;
new
->
rootfs
.
dfd_dev
=
-
EBADF
;
new
->
rootfs
.
dfd_dev
=
-
EBADF
;
new
->
rootfs
.
dfd_
root_
host
=
-
EBADF
;
new
->
rootfs
.
dfd_host
=
-
EBADF
;
new
->
logfd
=
-
1
;
new
->
logfd
=
-
1
;
lxc_list_init
(
&
new
->
cgroup
);
lxc_list_init
(
&
new
->
cgroup
);
lxc_list_init
(
&
new
->
cgroup2
);
lxc_list_init
(
&
new
->
cgroup2
);
...
@@ -3208,8 +3208,8 @@ int lxc_setup_rootfs_prepare_root(struct lxc_conf *conf, const char *name,
...
@@ -3208,8 +3208,8 @@ int lxc_setup_rootfs_prepare_root(struct lxc_conf *conf, const char *name,
{
{
int
ret
;
int
ret
;
conf
->
rootfs
.
dfd_
root_
host
=
open_at
(
-
EBADF
,
"/"
,
PROTECT_OPATH_DIRECTORY
,
PROTECT_LOOKUP_ABSOLUTE
,
0
);
conf
->
rootfs
.
dfd_host
=
open_at
(
-
EBADF
,
"/"
,
PROTECT_OPATH_DIRECTORY
,
PROTECT_LOOKUP_ABSOLUTE
,
0
);
if
(
conf
->
rootfs
.
dfd_
root_
host
<
0
)
if
(
conf
->
rootfs
.
dfd_host
<
0
)
return
log_error_errno
(
-
errno
,
errno
,
"Failed to open
\"
/
\"
"
);
return
log_error_errno
(
-
errno
,
errno
,
"Failed to open
\"
/
\"
"
);
if
(
conf
->
rootfs_setup
)
{
if
(
conf
->
rootfs_setup
)
{
...
@@ -3542,7 +3542,7 @@ int lxc_setup(struct lxc_handler *handler)
...
@@ -3542,7 +3542,7 @@ int lxc_setup(struct lxc_handler *handler)
close_prot_errno_disarm
(
lxc_conf
->
rootfs
.
dfd_mnt
)
close_prot_errno_disarm
(
lxc_conf
->
rootfs
.
dfd_mnt
)
close_prot_errno_disarm
(
lxc_conf
->
rootfs
.
dfd_dev
)
close_prot_errno_disarm
(
lxc_conf
->
rootfs
.
dfd_dev
)
close_prot_errno_disarm
(
lxc_conf
->
rootfs
.
dfd_
root_
host
)
close_prot_errno_disarm
(
lxc_conf
->
rootfs
.
dfd_host
)
NOTICE
(
"The container
\"
%s
\"
is set up"
,
name
);
NOTICE
(
"The container
\"
%s
\"
is set up"
,
name
);
return
0
;
return
0
;
...
@@ -3908,7 +3908,7 @@ void lxc_conf_free(struct lxc_conf *conf)
...
@@ -3908,7 +3908,7 @@ void lxc_conf_free(struct lxc_conf *conf)
free
(
conf
->
rootfs
.
data
);
free
(
conf
->
rootfs
.
data
);
close_prot_errno_disarm
(
conf
->
rootfs
.
dfd_mnt
);
close_prot_errno_disarm
(
conf
->
rootfs
.
dfd_mnt
);
close_prot_errno_disarm
(
conf
->
rootfs
.
dfd_dev
);
close_prot_errno_disarm
(
conf
->
rootfs
.
dfd_dev
);
close_prot_errno_disarm
(
conf
->
rootfs
.
dfd_
root_
host
);
close_prot_errno_disarm
(
conf
->
rootfs
.
dfd_host
);
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 @
ea11a215
...
@@ -194,7 +194,7 @@ struct lxc_tty_info {
...
@@ -194,7 +194,7 @@ struct lxc_tty_info {
* @dfd_dev : fd for /dev of the container
* @dfd_dev : fd for /dev of the container
*/
*/
struct
lxc_rootfs
{
struct
lxc_rootfs
{
int
dfd_
root_
host
;
int
dfd_host
;
int
dfd_mnt
;
int
dfd_mnt
;
int
dfd_dev
;
int
dfd_dev
;
char
*
path
;
char
*
path
;
...
...
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