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
0c233eee
Commit
0c233eee
authored
Nov 17, 2015
by
Stéphane Graber
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #701 from hallyn/fixunexp
lxcapi_clone: restore the unexpanded config len
parents
ab5e52f6
3b392519
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
lxccontainer.c
src/lxc/lxccontainer.c
+3
-0
No files found.
src/lxc/lxccontainer.c
View file @
0c233eee
...
...
@@ -3059,6 +3059,7 @@ static struct lxc_container *do_lxcapi_clone(struct lxc_container *c, const char
int
ret
,
storage_copied
=
0
;
char
*
origroot
=
NULL
,
*
saved_unexp_conf
=
NULL
;
struct
clone_update_data
data
;
size_t
saved_unexp_len
;
FILE
*
fout
;
pid_t
pid
;
...
...
@@ -3106,6 +3107,7 @@ static struct lxc_container *do_lxcapi_clone(struct lxc_container *c, const char
}
saved_unexp_conf
=
c
->
lxc_conf
->
unexpanded_config
;
saved_unexp_len
=
c
->
lxc_conf
->
unexpanded_len
;
c
->
lxc_conf
->
unexpanded_config
=
strdup
(
saved_unexp_conf
);
if
(
!
c
->
lxc_conf
->
unexpanded_config
)
{
ERROR
(
"Out of memory"
);
...
...
@@ -3118,6 +3120,7 @@ static struct lxc_container *do_lxcapi_clone(struct lxc_container *c, const char
free
(
c
->
lxc_conf
->
unexpanded_config
);
c
->
lxc_conf
->
unexpanded_config
=
saved_unexp_conf
;
saved_unexp_conf
=
NULL
;
c
->
lxc_conf
->
unexpanded_len
=
saved_unexp_len
;
sprintf
(
newpath
,
"%s/%s/rootfs"
,
lxcpath
,
newname
);
if
(
mkdir
(
newpath
,
0755
)
<
0
)
{
...
...
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