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
6118210e
Commit
6118210e
authored
Aug 12, 2016
by
Wolfgang Bumiller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools: set configfile after load_config
In order to cause c->is_defined() to become true. Signed-off-by:
Wolfgang Bumiller
<
w.bumiller@proxmox.com
>
parent
50b737a3
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
75 additions
and
0 deletions
+75
-0
lxc_attach.c
src/lxc/tools/lxc_attach.c
+6
-0
lxc_cgroup.c
src/lxc/tools/lxc_cgroup.c
+6
-0
lxc_checkpoint.c
src/lxc/tools/lxc_checkpoint.c
+6
-0
lxc_console.c
src/lxc/tools/lxc_console.c
+6
-0
lxc_copy.c
src/lxc/tools/lxc_copy.c
+5
-0
lxc_destroy.c
src/lxc/tools/lxc_destroy.c
+6
-0
lxc_device.c
src/lxc/tools/lxc_device.c
+5
-0
lxc_freeze.c
src/lxc/tools/lxc_freeze.c
+6
-0
lxc_info.c
src/lxc/tools/lxc_info.c
+6
-0
lxc_snapshot.c
src/lxc/tools/lxc_snapshot.c
+6
-0
lxc_stop.c
src/lxc/tools/lxc_stop.c
+5
-0
lxc_unfreeze.c
src/lxc/tools/lxc_unfreeze.c
+6
-0
lxc_wait.c
src/lxc/tools/lxc_wait.c
+6
-0
No files found.
src/lxc/tools/lxc_attach.c
View file @
6118210e
...
@@ -385,6 +385,12 @@ int main(int argc, char *argv[])
...
@@ -385,6 +385,12 @@ int main(int argc, char *argv[])
lxc_container_put
(
c
);
lxc_container_put
(
c
);
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
}
}
c
->
configfile
=
strdup
(
my_args
.
rcfile
);
if
(
!
c
->
configfile
)
{
ERROR
(
"Out of memory setting new config filename"
);
lxc_container_put
(
c
);
exit
(
EXIT_FAILURE
);
}
}
}
if
(
!
c
->
may_control
(
c
))
{
if
(
!
c
->
may_control
(
c
))
{
...
...
src/lxc/tools/lxc_cgroup.c
View file @
6118210e
...
@@ -92,6 +92,12 @@ int main(int argc, char *argv[])
...
@@ -92,6 +92,12 @@ int main(int argc, char *argv[])
lxc_container_put
(
c
);
lxc_container_put
(
c
);
return
1
;
return
1
;
}
}
c
->
configfile
=
strdup
(
my_args
.
rcfile
);
if
(
!
c
->
configfile
)
{
ERROR
(
"Out of memory setting new config filename"
);
lxc_container_put
(
c
);
return
1
;
}
}
}
if
(
!
c
->
may_control
(
c
))
{
if
(
!
c
->
may_control
(
c
))
{
...
...
src/lxc/tools/lxc_checkpoint.c
View file @
6118210e
...
@@ -222,6 +222,12 @@ int main(int argc, char *argv[])
...
@@ -222,6 +222,12 @@ int main(int argc, char *argv[])
lxc_container_put
(
c
);
lxc_container_put
(
c
);
exit
(
1
);
exit
(
1
);
}
}
c
->
configfile
=
strdup
(
my_args
.
rcfile
);
if
(
!
c
->
configfile
)
{
fprintf
(
stderr
,
"Out of memory setting new config filename
\n
"
);
lxc_container_put
(
c
);
exit
(
1
);
}
}
}
if
(
!
c
->
may_control
(
c
))
{
if
(
!
c
->
may_control
(
c
))
{
...
...
src/lxc/tools/lxc_console.c
View file @
6118210e
...
@@ -120,6 +120,12 @@ int main(int argc, char *argv[])
...
@@ -120,6 +120,12 @@ int main(int argc, char *argv[])
lxc_container_put
(
c
);
lxc_container_put
(
c
);
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
}
}
c
->
configfile
=
strdup
(
my_args
.
rcfile
);
if
(
!
c
->
configfile
)
{
fprintf
(
stderr
,
"Out of memory setting new config filename
\n
"
);
lxc_container_put
(
c
);
exit
(
EXIT_FAILURE
);
}
}
}
if
(
!
c
->
may_control
(
c
))
{
if
(
!
c
->
may_control
(
c
))
{
...
...
src/lxc/tools/lxc_copy.c
View file @
6118210e
...
@@ -217,6 +217,11 @@ int main(int argc, char *argv[])
...
@@ -217,6 +217,11 @@ int main(int argc, char *argv[])
fprintf
(
stderr
,
"Failed to load rcfile
\n
"
);
fprintf
(
stderr
,
"Failed to load rcfile
\n
"
);
goto
out
;
goto
out
;
}
}
c
->
configfile
=
strdup
(
my_args
.
rcfile
);
if
(
!
c
->
configfile
)
{
fprintf
(
stderr
,
"Out of memory setting new config filename
\n
"
);
goto
out
;
}
}
}
if
(
!
c
->
may_control
(
c
))
{
if
(
!
c
->
may_control
(
c
))
{
...
...
src/lxc/tools/lxc_destroy.c
View file @
6118210e
...
@@ -96,6 +96,12 @@ int main(int argc, char *argv[])
...
@@ -96,6 +96,12 @@ int main(int argc, char *argv[])
lxc_container_put
(
c
);
lxc_container_put
(
c
);
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
}
}
c
->
configfile
=
strdup
(
my_args
.
rcfile
);
if
(
!
c
->
configfile
)
{
fprintf
(
stderr
,
"Out of memory setting new config filename
\n
"
);
lxc_container_put
(
c
);
exit
(
EXIT_FAILURE
);
}
}
}
if
(
!
c
->
may_control
(
c
))
{
if
(
!
c
->
may_control
(
c
))
{
...
...
src/lxc/tools/lxc_device.c
View file @
6118210e
...
@@ -132,6 +132,11 @@ int main(int argc, char *argv[])
...
@@ -132,6 +132,11 @@ int main(int argc, char *argv[])
ERROR
(
"Failed to load rcfile"
);
ERROR
(
"Failed to load rcfile"
);
goto
err1
;
goto
err1
;
}
}
c
->
configfile
=
strdup
(
my_args
.
rcfile
);
if
(
!
c
->
configfile
)
{
ERROR
(
"Out of memory setting new config filename"
);
goto
err1
;
}
}
}
if
(
!
c
->
is_running
(
c
))
{
if
(
!
c
->
is_running
(
c
))
{
...
...
src/lxc/tools/lxc_freeze.c
View file @
6118210e
...
@@ -82,6 +82,12 @@ int main(int argc, char *argv[])
...
@@ -82,6 +82,12 @@ int main(int argc, char *argv[])
lxc_container_put
(
c
);
lxc_container_put
(
c
);
exit
(
1
);
exit
(
1
);
}
}
c
->
configfile
=
strdup
(
my_args
.
rcfile
);
if
(
!
c
->
configfile
)
{
ERROR
(
"Out of memory setting new config filename"
);
lxc_container_put
(
c
);
exit
(
1
);
}
}
}
if
(
!
c
->
may_control
(
c
))
{
if
(
!
c
->
may_control
(
c
))
{
...
...
src/lxc/tools/lxc_info.c
View file @
6118210e
...
@@ -303,6 +303,12 @@ static int print_info(const char *name, const char *lxcpath)
...
@@ -303,6 +303,12 @@ static int print_info(const char *name, const char *lxcpath)
lxc_container_put
(
c
);
lxc_container_put
(
c
);
return
-
1
;
return
-
1
;
}
}
c
->
configfile
=
strdup
(
my_args
.
rcfile
);
if
(
!
c
->
configfile
)
{
fprintf
(
stderr
,
"Out of memory setting new config filename
\n
"
);
lxc_container_put
(
c
);
return
-
1
;
}
}
}
if
(
!
c
->
may_control
(
c
))
{
if
(
!
c
->
may_control
(
c
))
{
...
...
src/lxc/tools/lxc_snapshot.c
View file @
6118210e
...
@@ -115,6 +115,12 @@ int main(int argc, char *argv[])
...
@@ -115,6 +115,12 @@ int main(int argc, char *argv[])
lxc_container_put
(
c
);
lxc_container_put
(
c
);
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
}
}
c
->
configfile
=
strdup
(
my_args
.
rcfile
);
if
(
!
c
->
configfile
)
{
fprintf
(
stderr
,
"Out of memory setting new config filename
\n
"
);
lxc_container_put
(
c
);
exit
(
EXIT_FAILURE
);
}
}
}
if
(
!
c
->
may_control
(
c
))
{
if
(
!
c
->
may_control
(
c
))
{
...
...
src/lxc/tools/lxc_stop.c
View file @
6118210e
...
@@ -210,6 +210,11 @@ int main(int argc, char *argv[])
...
@@ -210,6 +210,11 @@ int main(int argc, char *argv[])
fprintf
(
stderr
,
"Failed to load rcfile
\n
"
);
fprintf
(
stderr
,
"Failed to load rcfile
\n
"
);
goto
out
;
goto
out
;
}
}
c
->
configfile
=
strdup
(
my_args
.
rcfile
);
if
(
!
c
->
configfile
)
{
fprintf
(
stderr
,
"Out of memory setting new config filename
\n
"
);
goto
out
;
}
}
}
if
(
!
c
->
may_control
(
c
))
{
if
(
!
c
->
may_control
(
c
))
{
...
...
src/lxc/tools/lxc_unfreeze.c
View file @
6118210e
...
@@ -86,6 +86,12 @@ int main(int argc, char *argv[])
...
@@ -86,6 +86,12 @@ int main(int argc, char *argv[])
lxc_container_put
(
c
);
lxc_container_put
(
c
);
exit
(
1
);
exit
(
1
);
}
}
c
->
configfile
=
strdup
(
my_args
.
rcfile
);
if
(
!
c
->
configfile
)
{
ERROR
(
"Out of memory setting new config filename"
);
lxc_container_put
(
c
);
exit
(
1
);
}
}
}
if
(
!
c
->
unfreeze
(
c
))
{
if
(
!
c
->
unfreeze
(
c
))
{
...
...
src/lxc/tools/lxc_wait.c
View file @
6118210e
...
@@ -112,6 +112,12 @@ int main(int argc, char *argv[])
...
@@ -112,6 +112,12 @@ int main(int argc, char *argv[])
lxc_container_put
(
c
);
lxc_container_put
(
c
);
return
1
;
return
1
;
}
}
c
->
configfile
=
strdup
(
my_args
.
rcfile
);
if
(
!
c
->
configfile
)
{
fprintf
(
stderr
,
"Out of memory setting new config filename
\n
"
);
lxc_container_put
(
c
);
return
1
;
}
}
}
if
(
!
c
->
wait
(
c
,
my_args
.
states
,
my_args
.
timeout
))
{
if
(
!
c
->
wait
(
c
,
my_args
.
states
,
my_args
.
timeout
))
{
...
...
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