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
d03ab308
Unverified
Commit
d03ab308
authored
Feb 24, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lxccontainer: do_lxcapi_load_config()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
e3246ab9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
lxccontainer.c
src/lxc/lxccontainer.c
+7
-5
No files found.
src/lxc/lxccontainer.c
View file @
d03ab308
...
@@ -595,9 +595,10 @@ static bool load_config_locked(struct lxc_container *c, const char *fname)
...
@@ -595,9 +595,10 @@ static bool load_config_locked(struct lxc_container *c, const char *fname)
static
bool
do_lxcapi_load_config
(
struct
lxc_container
*
c
,
const
char
*
alt_file
)
static
bool
do_lxcapi_load_config
(
struct
lxc_container
*
c
,
const
char
*
alt_file
)
{
{
bool
ret
=
false
,
need_disklock
=
false
;
int
lret
;
int
lret
;
const
char
*
fname
;
const
char
*
fname
;
bool
need_disklock
=
false
,
ret
=
false
;
if
(
!
c
)
if
(
!
c
)
return
false
;
return
false
;
...
@@ -606,10 +607,10 @@ static bool do_lxcapi_load_config(struct lxc_container *c, const char *alt_file)
...
@@ -606,10 +607,10 @@ static bool do_lxcapi_load_config(struct lxc_container *c, const char *alt_file)
fname
=
alt_file
;
fname
=
alt_file
;
if
(
!
fname
)
if
(
!
fname
)
return
false
;
return
false
;
/*
* If we're reading something other than the container's config,
/* If we're reading something other than the container's config, we only
*
we only need to lock the in-memory container. If loading the
*
need to lock the in-memory container. If loading the container's
* con
tainer's con
fig file, take the disk lock.
* config file, take the disk lock.
*/
*/
if
(
strcmp
(
fname
,
c
->
configfile
)
==
0
)
if
(
strcmp
(
fname
,
c
->
configfile
)
==
0
)
need_disklock
=
true
;
need_disklock
=
true
;
...
@@ -627,6 +628,7 @@ static bool do_lxcapi_load_config(struct lxc_container *c, const char *alt_file)
...
@@ -627,6 +628,7 @@ static bool do_lxcapi_load_config(struct lxc_container *c, const char *alt_file)
container_disk_unlock
(
c
);
container_disk_unlock
(
c
);
else
else
container_mem_unlock
(
c
);
container_mem_unlock
(
c
);
return
ret
;
return
ret
;
}
}
...
...
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