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
d8b712bc
Unverified
Commit
d8b712bc
authored
Aug 01, 2017
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf: mount_entry_on_generic()
non-functional changes Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
07667a6a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
13 deletions
+19
-13
conf.c
src/lxc/conf.c
+19
-13
No files found.
src/lxc/conf.c
View file @
d8b712bc
...
@@ -1870,30 +1870,36 @@ static int mount_entry_create_dir_file(const struct mntent *mntent,
...
@@ -1870,30 +1870,36 @@ static int mount_entry_create_dir_file(const struct mntent *mntent,
/* rootfs, lxc_name, and lxc_path can be NULL when the container is created
/* rootfs, lxc_name, and lxc_path can be NULL when the container is created
* without a rootfs. */
* without a rootfs. */
static
inline
int
mount_entry_on_generic
(
struct
mntent
*
mntent
,
static
inline
int
mount_entry_on_generic
(
struct
mntent
*
mntent
,
const
char
*
path
,
const
struct
lxc_rootfs
*
rootfs
,
const
char
*
path
,
const
char
*
lxc_name
,
const
char
*
lxc_path
)
const
struct
lxc_rootfs
*
rootfs
,
const
char
*
lxc_name
,
const
char
*
lxc_path
)
{
{
int
ret
;
unsigned
long
mntflags
;
unsigned
long
mntflags
;
char
*
mntdata
;
char
*
mntdata
;
int
ret
;
bool
dev
,
optional
;
bool
optional
=
hasmntopt
(
mntent
,
"optional"
)
!=
NULL
;
bool
dev
=
hasmntopt
(
mntent
,
"dev"
)
!=
NULL
;
char
*
rootfs_path
=
NULL
;
char
*
rootfs_path
=
NULL
;
optional
=
hasmntopt
(
mntent
,
"optional"
)
!=
NULL
;
dev
=
hasmntopt
(
mntent
,
"dev"
)
!=
NULL
;
if
(
rootfs
&&
rootfs
->
path
)
if
(
rootfs
&&
rootfs
->
path
)
rootfs_path
=
rootfs
->
mount
;
rootfs_path
=
rootfs
->
mount
;
ret
=
mount_entry_create_dir_file
(
mntent
,
path
,
rootfs
,
lxc_name
,
lxc_path
);
ret
=
mount_entry_create_dir_file
(
mntent
,
path
,
rootfs
,
lxc_name
,
lxc_path
);
if
(
ret
<
0
)
if
(
ret
<
0
)
{
return
optional
?
0
:
-
1
;
if
(
optional
)
return
0
;
return
-
1
;
}
cull_mntent_opt
(
mntent
);
cull_mntent_opt
(
mntent
);
if
(
parse_mntopts
(
mntent
->
mnt_opts
,
&
mntflags
,
&
mntdata
)
<
0
)
{
ret
=
parse_mntopts
(
mntent
->
mnt_opts
,
&
mntflags
,
&
mntdata
);
free
(
mntdata
);
if
(
ret
<
0
)
return
-
1
;
return
-
1
;
}
ret
=
mount_entry
(
mntent
->
mnt_fsname
,
path
,
mntent
->
mnt_type
,
mntflags
,
ret
=
mount_entry
(
mntent
->
mnt_fsname
,
path
,
mntent
->
mnt_type
,
mntflags
,
mntdata
,
optional
,
dev
,
rootfs_path
);
mntdata
,
optional
,
dev
,
rootfs_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