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
6b741397
Unverified
Commit
6b741397
authored
Jul 22, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf: coding style fixes
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
fd14fdb8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
conf.c
src/lxc/conf.c
+10
-11
No files found.
src/lxc/conf.c
View file @
6b741397
...
...
@@ -648,22 +648,21 @@ unsigned long add_required_remount_flags(const char *s, const char *d,
#endif
}
static
int
add_shmount_to_list
(
struct
lxc_conf
*
conf
)
{
static
int
add_shmount_to_list
(
struct
lxc_conf
*
conf
)
{
char
new_mount
[
MAXPATHLEN
];
/* Offset for the leading '/' since the path_cont
* is absolute inside the container */
int
ret
=
-
1
,
offset
=
1
;
* is absolute inside the container.
*/
int
offset
=
1
,
ret
=
-
1
;
ret
=
snprintf
(
new_mount
,
sizeof
(
new_mount
),
"%s %s none bind,create=dir 0 0"
,
conf
->
shmount
.
path_host
,
conf
->
shmount
.
path_cont
+
offset
);
ret
=
snprintf
(
new_mount
,
sizeof
(
new_mount
),
"%s %s none bind,create=dir 0 0"
,
conf
->
shmount
.
path_host
,
conf
->
shmount
.
path_cont
+
offset
);
if
(
ret
<
0
||
(
size_t
)
ret
>=
sizeof
(
new_mount
))
return
-
1
;
ret
=
add_elem_to_mount_list
(
new_mount
,
conf
);
if
(
ret
<
0
)
ERROR
(
"Failed to add new mount
\"
%s
\"
to the config"
,
new_mount
);
return
ret
;
return
add_elem_to_mount_list
(
new_mount
,
conf
);
}
static
int
lxc_mount_auto_mounts
(
struct
lxc_conf
*
conf
,
int
flags
,
struct
lxc_handler
*
handler
)
...
...
@@ -806,7 +805,7 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha
int
ret
=
add_shmount_to_list
(
conf
);
if
(
ret
<
0
)
{
ERROR
(
"Failed to add shmount entry to container config"
);
return
ret
;
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