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
8db92302
Unverified
Commit
8db92302
authored
Feb 19, 2019
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf: cleanup macros lxc_mount_auto_mounts
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
957c4704
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
8 deletions
+1
-8
conf.c
src/lxc/conf.c
+1
-8
No files found.
src/lxc/conf.c
View file @
8db92302
...
@@ -689,10 +689,9 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha
...
@@ -689,10 +689,9 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha
};
};
for
(
i
=
0
;
default_mounts
[
i
].
match_mask
;
i
++
)
{
for
(
i
=
0
;
default_mounts
[
i
].
match_mask
;
i
++
)
{
__do_free
char
*
destination
=
NULL
,
*
source
=
NULL
;
int
saved_errno
;
int
saved_errno
;
unsigned
long
mflags
;
unsigned
long
mflags
;
char
*
destination
=
NULL
;
char
*
source
=
NULL
;
if
((
flags
&
default_mounts
[
i
].
match_mask
)
!=
default_mounts
[
i
].
match_flag
)
if
((
flags
&
default_mounts
[
i
].
match_mask
)
!=
default_mounts
[
i
].
match_flag
)
continue
;
continue
;
...
@@ -705,16 +704,12 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha
...
@@ -705,16 +704,12 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha
if
(
!
default_mounts
[
i
].
destination
)
{
if
(
!
default_mounts
[
i
].
destination
)
{
ERROR
(
"BUG: auto mounts destination %d was NULL"
,
i
);
ERROR
(
"BUG: auto mounts destination %d was NULL"
,
i
);
free
(
source
);
return
-
1
;
return
-
1
;
}
}
/* will act like strdup if %r is not present */
/* will act like strdup if %r is not present */
destination
=
lxc_string_replace
(
"%r"
,
conf
->
rootfs
.
path
?
conf
->
rootfs
.
mount
:
""
,
default_mounts
[
i
].
destination
);
destination
=
lxc_string_replace
(
"%r"
,
conf
->
rootfs
.
path
?
conf
->
rootfs
.
mount
:
""
,
default_mounts
[
i
].
destination
);
if
(
!
destination
)
{
if
(
!
destination
)
{
saved_errno
=
errno
;
free
(
source
);
errno
=
saved_errno
;
return
-
1
;
return
-
1
;
}
}
...
@@ -732,8 +727,6 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha
...
@@ -732,8 +727,6 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha
SYSERROR
(
"Failed to mount
\"
%s
\"
on
\"
%s
\"
with flags %lu"
,
source
,
destination
,
mflags
);
SYSERROR
(
"Failed to mount
\"
%s
\"
on
\"
%s
\"
with flags %lu"
,
source
,
destination
,
mflags
);
}
}
free
(
source
);
free
(
destination
);
if
(
r
<
0
)
{
if
(
r
<
0
)
{
errno
=
saved_errno
;
errno
=
saved_errno
;
return
-
1
;
return
-
1
;
...
...
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