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
0590e82c
Commit
0590e82c
authored
Oct 30, 2013
by
Serge Hallyn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
api_create: undo unneeded chunk in previous commit
lxc_conf exists after api_save_config Signed-off-by:
Serge Hallyn
<
serge.hallyn@ubuntu.com
>
parent
cf465fe4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
18 deletions
+16
-18
lxccontainer.c
src/lxc/lxccontainer.c
+16
-18
No files found.
src/lxc/lxccontainer.c
View file @
0590e82c
...
@@ -1128,24 +1128,22 @@ static bool lxcapi_create(struct lxc_container *c, const char *t,
...
@@ -1128,24 +1128,22 @@ static bool lxcapi_create(struct lxc_container *c, const char *t,
goto
out
;
goto
out
;
}
}
if
(
c
->
lxc_conf
)
{
/*
/*
* either template or rootfs.path should be set.
* either template or rootfs.path should be set.
* if both template and rootfs.path are set, template is setup as rootfs.path.
* if both template and rootfs.path are set, template is setup as rootfs.path.
* container is already created if we have a config and rootfs.path is accessible
* container is already created if we have a config and rootfs.path is accessible
*/
*/
if
(
!
c
->
lxc_conf
->
rootfs
.
path
&&
!
tpath
)
if
(
!
c
->
lxc_conf
->
rootfs
.
path
&&
!
tpath
)
/* no template passed in and rootfs does not exist: error */
/* no template passed in and rootfs does not exist: error */
goto
out
;
goto
out
;
if
(
c
->
lxc_conf
->
rootfs
.
path
&&
access
(
c
->
lxc_conf
->
rootfs
.
path
,
F_OK
)
!=
0
)
if
(
c
->
lxc_conf
->
rootfs
.
path
&&
access
(
c
->
lxc_conf
->
rootfs
.
path
,
F_OK
)
!=
0
)
/* rootfs passed into configuration, but does not exist: error */
/* rootfs passed into configuration, but does not exist: error */
goto
out
;
goto
out
;
if
(
lxcapi_is_defined
(
c
)
&&
c
->
lxc_conf
->
rootfs
.
path
&&
!
tpath
)
{
if
(
lxcapi_is_defined
(
c
)
&&
c
->
lxc_conf
->
rootfs
.
path
&&
!
tpath
)
{
/* Rootfs already existed, user just wanted to save the
/* Rootfs already existed, user just wanted to save the
* loaded configuration */
* loaded configuration */
ret
=
true
;
ret
=
true
;
goto
out
;
goto
out
;
}
}
}
/* Mark that this container is being created */
/* Mark that this container is being created */
...
...
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