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
8e90af3e
Unverified
Commit
8e90af3e
authored
May 31, 2017
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
confile: add clearer for lxc.init_cmd
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
832fb63a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
confile.c
src/lxc/confile.c
+9
-5
No files found.
src/lxc/confile.c
View file @
8e90af3e
...
@@ -230,6 +230,7 @@ static int clr_config_environment(const char *, struct lxc_conf *);
...
@@ -230,6 +230,7 @@ static int clr_config_environment(const char *, struct lxc_conf *);
static
int
set_config_init_cmd
(
const
char
*
,
const
char
*
,
struct
lxc_conf
*
);
static
int
set_config_init_cmd
(
const
char
*
,
const
char
*
,
struct
lxc_conf
*
);
static
int
get_config_init_cmd
(
const
char
*
,
char
*
,
int
,
struct
lxc_conf
*
);
static
int
get_config_init_cmd
(
const
char
*
,
char
*
,
int
,
struct
lxc_conf
*
);
static
int
clr_config_init_cmd
(
const
char
*
,
struct
lxc_conf
*
);
static
int
set_config_init_uid
(
const
char
*
,
const
char
*
,
struct
lxc_conf
*
);
static
int
set_config_init_uid
(
const
char
*
,
const
char
*
,
struct
lxc_conf
*
);
static
int
get_config_init_uid
(
const
char
*
,
char
*
,
int
,
struct
lxc_conf
*
);
static
int
get_config_init_uid
(
const
char
*
,
char
*
,
int
,
struct
lxc_conf
*
);
...
@@ -315,7 +316,7 @@ static struct lxc_config_t config[] = {
...
@@ -315,7 +316,7 @@ static struct lxc_config_t config[] = {
{
"lxc.monitor.unshare"
,
set_config_monitor
,
get_config_monitor
,
clr_config_monitor
,
},
{
"lxc.monitor.unshare"
,
set_config_monitor
,
get_config_monitor
,
clr_config_monitor
,
},
{
"lxc.group"
,
set_config_group
,
get_config_group
,
clr_config_group
,
},
{
"lxc.group"
,
set_config_group
,
get_config_group
,
clr_config_group
,
},
{
"lxc.environment"
,
set_config_environment
,
get_config_environment
,
clr_config_environment
,
},
{
"lxc.environment"
,
set_config_environment
,
get_config_environment
,
clr_config_environment
,
},
{
"lxc.init_cmd"
,
set_config_init_cmd
,
get_config_init_cmd
,
NULL
},
{
"lxc.init_cmd"
,
set_config_init_cmd
,
get_config_init_cmd
,
clr_config_init_cmd
,
},
{
"lxc.init_uid"
,
set_config_init_uid
,
get_config_init_uid
,
NULL
},
{
"lxc.init_uid"
,
set_config_init_uid
,
get_config_init_uid
,
NULL
},
{
"lxc.init_gid"
,
set_config_init_gid
,
get_config_init_gid
,
NULL
},
{
"lxc.init_gid"
,
set_config_init_gid
,
get_config_init_gid
,
NULL
},
{
"lxc.ephemeral"
,
set_config_ephemeral
,
get_config_ephemeral
,
NULL
},
{
"lxc.ephemeral"
,
set_config_ephemeral
,
get_config_ephemeral
,
NULL
},
...
@@ -2771,10 +2772,6 @@ int lxc_clear_config_item(struct lxc_conf *c, const char *key)
...
@@ -2771,10 +2772,6 @@ int lxc_clear_config_item(struct lxc_conf *c, const char *key)
if
(
strncmp
(
key
,
"lxc.limit"
,
9
)
==
0
)
{
if
(
strncmp
(
key
,
"lxc.limit"
,
9
)
==
0
)
{
ret
=
lxc_clear_limits
(
c
,
key
);
ret
=
lxc_clear_limits
(
c
,
key
);
}
else
if
(
strcmp
(
key
,
"lxc.init_cmd"
)
==
0
)
{
free
(
c
->
init_cmd
);
c
->
init_cmd
=
NULL
;
}
else
if
(
strcmp
(
key
,
"lxc.init_uid"
)
==
0
)
{
}
else
if
(
strcmp
(
key
,
"lxc.init_uid"
)
==
0
)
{
c
->
init_uid
=
0
;
c
->
init_uid
=
0
;
...
@@ -4225,3 +4222,10 @@ static inline int clr_config_environment(const char *key, struct lxc_conf *c)
...
@@ -4225,3 +4222,10 @@ static inline int clr_config_environment(const char *key, struct lxc_conf *c)
{
{
return
lxc_clear_environment
(
c
);
return
lxc_clear_environment
(
c
);
}
}
static
inline
int
clr_config_init_cmd
(
const
char
*
key
,
struct
lxc_conf
*
c
)
{
free
(
c
->
init_cmd
);
c
->
init_cmd
=
NULL
;
return
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