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
dad87e3b
Commit
dad87e3b
authored
Jan 09, 2014
by
Stéphane Graber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop usage of LXC_DEFAULT_CONFIG in our code
Signed-off-by:
Stéphane Graber
<
stgraber@ubuntu.com
>
Acked-by:
Serge E. Hallyn
<
serge.hallyn@ubuntu.com
>
parent
593e8478
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
9 deletions
+9
-9
lxc_create.c
src/lxc/lxc_create.c
+1
-1
lxccontainer.c
src/lxc/lxccontainer.c
+4
-4
containertests.c
src/tests/containertests.c
+1
-1
destroytest.c
src/tests/destroytest.c
+1
-1
saveconfig.c
src/tests/saveconfig.c
+1
-1
startone.c
src/tests/startone.c
+1
-1
No files found.
src/lxc/lxc_create.c
View file @
dad87e3b
...
...
@@ -229,7 +229,7 @@ int main(int argc, char *argv[])
if
(
my_args
.
configfile
)
c
->
load_config
(
c
,
my_args
.
configfile
);
else
c
->
load_config
(
c
,
LXC_DEFAULT_CONFIG
);
c
->
load_config
(
c
,
lxc_global_config_value
(
"lxc.default_config"
)
);
if
(
my_args
.
fstype
)
spec
.
fstype
=
my_args
.
fstype
;
...
...
src/lxc/lxccontainer.c
View file @
dad87e3b
...
...
@@ -1186,8 +1186,8 @@ static bool lxcapi_create(struct lxc_container *c, const char *t,
}
if
(
!
c
->
lxc_conf
)
{
if
(
!
c
->
load_config
(
c
,
LXC_DEFAULT_CONFIG
))
{
ERROR
(
"Error loading default configuration file %s
\n
"
,
LXC_DEFAULT_CONFIG
);
if
(
!
c
->
load_config
(
c
,
lxc_global_config_value
(
"lxc.default_config"
)
))
{
ERROR
(
"Error loading default configuration file %s
\n
"
,
lxc_global_config_value
(
"lxc.default_config"
)
);
goto
free_tpath
;
}
}
...
...
@@ -1658,8 +1658,8 @@ static bool lxcapi_save_config(struct lxc_container *c, const char *alt_file)
// If we haven't yet loaded a config, load the stock config
if
(
!
c
->
lxc_conf
)
{
if
(
!
c
->
load_config
(
c
,
LXC_DEFAULT_CONFIG
))
{
ERROR
(
"Error loading default configuration file %s while saving %s
\n
"
,
LXC_DEFAULT_CONFIG
,
c
->
name
);
if
(
!
c
->
load_config
(
c
,
lxc_global_config_value
(
"lxc.default_config"
)
))
{
ERROR
(
"Error loading default configuration file %s while saving %s
\n
"
,
lxc_global_config_value
(
"lxc.default_config"
)
,
c
->
name
);
return
false
;
}
}
...
...
src/tests/containertests.c
View file @
dad87e3b
...
...
@@ -72,7 +72,7 @@ static int create_busybox(void)
return
-
1
;
}
if
(
pid
==
0
)
{
ret
=
execlp
(
"lxc-create"
,
"lxc-create"
,
"-t"
,
"busybox"
,
"-
f"
,
LXC_DEFAULT_CONFIG
,
"-
n"
,
MYNAME
,
NULL
);
ret
=
execlp
(
"lxc-create"
,
"lxc-create"
,
"-t"
,
"busybox"
,
"-n"
,
MYNAME
,
NULL
);
// Should not return
perror
(
"execl"
);
exit
(
1
);
...
...
src/tests/destroytest.c
View file @
dad87e3b
...
...
@@ -38,7 +38,7 @@ static int create_ubuntu(void)
return
-
1
;
}
if
(
pid
==
0
)
{
ret
=
execlp
(
"lxc-create"
,
"lxc-create"
,
"-t"
,
"ubuntu"
,
"-
f"
,
LXC_DEFAULT_CONFIG
,
"-
n"
,
MYNAME
,
NULL
);
ret
=
execlp
(
"lxc-create"
,
"lxc-create"
,
"-t"
,
"ubuntu"
,
"-n"
,
MYNAME
,
NULL
);
// Should not return
perror
(
"execl"
);
exit
(
1
);
...
...
src/tests/saveconfig.c
View file @
dad87e3b
...
...
@@ -38,7 +38,7 @@ static int create_ubuntu(void)
return
-
1
;
}
if
(
pid
==
0
)
{
ret
=
execlp
(
"lxc-create"
,
"lxc-create"
,
"-t"
,
"ubuntu"
,
"-
f"
,
LXC_DEFAULT_CONFIG
,
"-
n"
,
MYNAME
,
NULL
);
ret
=
execlp
(
"lxc-create"
,
"lxc-create"
,
"-t"
,
"ubuntu"
,
"-n"
,
MYNAME
,
NULL
);
// Should not return
perror
(
"execl"
);
exit
(
1
);
...
...
src/tests/startone.c
View file @
dad87e3b
...
...
@@ -71,7 +71,7 @@ static int create_ubuntu(void)
return
-
1
;
}
if
(
pid
==
0
)
{
ret
=
execlp
(
"lxc-create"
,
"lxc-create"
,
"-t"
,
"ubuntu"
,
"-
f"
,
LXC_DEFAULT_CONFIG
,
"-
n"
,
MYNAME
,
NULL
);
ret
=
execlp
(
"lxc-create"
,
"lxc-create"
,
"-t"
,
"ubuntu"
,
"-n"
,
MYNAME
,
NULL
);
// Should not return
perror
(
"execl"
);
exit
(
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