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
b31b2a20
Unverified
Commit
b31b2a20
authored
Apr 22, 2017
by
Christian Brauner
Committed by
Stéphane Graber
Apr 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf: non-functional changes
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
a32f7894
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
15 deletions
+11
-15
conf.c
src/lxc/conf.c
+11
-15
No files found.
src/lxc/conf.c
View file @
b31b2a20
...
...
@@ -514,7 +514,7 @@ static int run_script(const char *name, const char *section, const char *script,
}
static
int
mount_rootfs_dir
(
const
char
*
rootfs
,
const
char
*
target
,
const
char
*
options
)
const
char
*
options
)
{
unsigned
long
mntflags
;
char
*
mntdata
;
...
...
@@ -531,10 +531,9 @@ static int mount_rootfs_dir(const char *rootfs, const char *target,
return
ret
;
}
static
int
setup_lodev
(
const
char
*
rootfs
,
int
fd
,
struct
loop_info64
*
loinfo
)
static
int
lxc_
setup_lodev
(
const
char
*
rootfs
,
int
fd
,
struct
loop_info64
*
loinfo
)
{
int
rfd
;
int
ret
=
-
1
;
rfd
=
open
(
rootfs
,
O_RDWR
);
if
(
rfd
<
0
)
{
...
...
@@ -544,33 +543,30 @@ static int setup_lodev(const char *rootfs, int fd, struct loop_info64 *loinfo)
memset
(
loinfo
,
0
,
sizeof
(
*
loinfo
));
loinfo
->
lo_flags
=
LO_FLAGS_AUTOCLEAR
;
if
(
ioctl
(
fd
,
LOOP_SET_FD
,
rfd
))
{
SYSERROR
(
"failed to LOOP_SET_FD"
);
goto
out
;
close
(
rfd
);
return
-
1
;
}
loinfo
->
lo_flags
=
LO_FLAGS_AUTOCLEAR
;
if
(
ioctl
(
fd
,
LOOP_SET_STATUS64
,
loinfo
))
{
SYSERROR
(
"failed to LOOP_SET_STATUS64"
);
goto
out
;
close
(
rfd
);
return
-
1
;
}
ret
=
0
;
out:
close
(
rfd
);
return
ret
;
return
0
;
}
static
int
mount_rootfs_file
(
const
char
*
rootfs
,
const
char
*
target
,
const
char
*
options
)
const
char
*
options
)
{
struct
dirent
*
direntp
;
struct
loop_info64
loinfo
;
int
ret
=
-
1
,
fd
=
-
1
,
rc
;
DIR
*
dir
;
char
path
[
MAXPATHLEN
];
int
ret
=
-
1
,
fd
=
-
1
,
rc
;
dir
=
opendir
(
"/dev"
);
if
(
!
dir
)
{
...
...
@@ -614,7 +610,7 @@ static int mount_rootfs_file(const char *rootfs, const char *target,
DEBUG
(
"found '%s' free lodev"
,
path
);
ret
=
setup_lodev
(
rootfs
,
fd
,
&
loinfo
);
ret
=
lxc_
setup_lodev
(
rootfs
,
fd
,
&
loinfo
);
if
(
!
ret
)
ret
=
mount_unknown_fs
(
path
,
target
,
options
);
close
(
fd
);
...
...
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