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
d330fe7b
Commit
d330fe7b
authored
Jan 13, 2011
by
Daniel Lezcano
Committed by
Daniel Lezcano
Jan 13, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mindless changes to conform indentation
Signed-off-by:
Daniel Lezcano
<
dlezcano@fr.ibm.com
>
parent
8edcba11
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
12 deletions
+16
-12
conf.c
src/lxc/conf.c
+16
-12
No files found.
src/lxc/conf.c
View file @
d330fe7b
...
@@ -923,39 +923,43 @@ static int mount_file_entries(const struct lxc_rootfs *rootfs, FILE *file)
...
@@ -923,39 +923,43 @@ static int mount_file_entries(const struct lxc_rootfs *rootfs, FILE *file)
mntflags
=
0
;
mntflags
=
0
;
mntdata
=
NULL
;
mntdata
=
NULL
;
if
(
parse_mntopts
(
mntent
,
&
mntflags
,
&
mntdata
)
<
0
)
{
if
(
parse_mntopts
(
mntent
,
&
mntflags
,
&
mntdata
)
<
0
)
{
ERROR
(
"failed to parse mount option '%s'"
,
ERROR
(
"failed to parse mount option '%s'"
,
mntent
->
mnt_opts
);
mntent
->
mnt_opts
);
goto
out
;
goto
out
;
}
}
/* now figure out where to mount it to. */
/* now figure out where to mount it to. */
mntdir
=
mntent
->
mnt_dir
;
mntdir
=
mntent
->
mnt_dir
;
mntroot
=
NULL
;
mntroot
=
NULL
;
if
(
!
rootfs
->
path
)
{
if
(
!
rootfs
->
path
)
{
/* if we use system root fs,
/* if we use system root fs,
the mount is relative to '/'
*
the mount is relative to /
and can be absolute */
* and can be absolute */
if
(
mntdir
[
0
]
!=
'/'
)
if
(
mntdir
[
0
]
!=
'/'
)
mntroot
=
""
;
/* this is "/" */
mntroot
=
""
;
/* this is '/' */
}
}
else
{
else
{
/* else we have a separate root, mounts are
/* else we have a separate root, mounts are
* relative to it, and absolute paths are risky */
* relative to it, and absolute paths are risky */
if
(
mntdir
[
0
]
!=
'/'
)
if
(
mntdir
[
0
]
!=
'/'
)
/* relative to
o
root mount point */
/* relative to root mount point */
mntroot
=
rootfs
->
mount
;
mntroot
=
rootfs
->
mount
;
else
if
(
strncmp
(
mntdir
,
rootfs
->
mount
,
strlen
(
rootfs
->
mount
)))
else
if
(
strncmp
(
mntdir
,
rootfs
->
mount
,
WARN
(
"mount target directory '%s' is outside container root"
,
strlen
(
rootfs
->
mount
)))
mntdir
);
WARN
(
"mount target directory '%s' is outside "
"container root"
,
mntdir
);
else
else
WARN
(
"mount target directory '%s' is not
relative to container root"
,
WARN
(
"mount target directory '%s' is not
"
mntdir
);
"relative to container root"
,
mntdir
);
}
}
if
(
mntroot
)
{
if
(
mntroot
)
{
/* make it relative to mntroot */
/* make it relative to mntroot */
snprintf
(
path
,
sizeof
(
path
),
"%s/%s"
,
mntroot
,
mntdir
);
snprintf
(
path
,
sizeof
(
path
),
"%s/%s"
,
mntroot
,
mntdir
);
mntdir
=
path
;
mntdir
=
path
;
}
}
if
(
mount
(
mntent
->
mnt_fsname
,
mntdir
,
if
(
mount
(
mntent
->
mnt_fsname
,
mntdir
,
mntent
->
mnt_type
,
mntflags
&
~
MS_REMOUNT
,
mntdata
))
{
mntent
->
mnt_type
,
mntflags
&
~
MS_REMOUNT
,
mntdata
))
{
SYSERROR
(
"failed to mount '%s' on '%s'"
,
SYSERROR
(
"failed to mount '%s' on '%s'"
,
...
...
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