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
b29b29be
Unverified
Commit
b29b29be
authored
May 31, 2017
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
confile: add getter for lxc.loglevel
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
5014ff2e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
confile.c
src/lxc/confile.c
+12
-4
No files found.
src/lxc/confile.c
View file @
b29b29be
...
@@ -95,6 +95,8 @@ static int set_config_idmaps(const char *, const char *, struct lxc_conf *);
...
@@ -95,6 +95,8 @@ static int set_config_idmaps(const char *, const char *, struct lxc_conf *);
static
int
get_config_idmaps
(
struct
lxc_container
*
,
const
char
*
,
char
*
,
int
);
static
int
get_config_idmaps
(
struct
lxc_container
*
,
const
char
*
,
char
*
,
int
);
static
int
set_config_loglevel
(
const
char
*
,
const
char
*
,
struct
lxc_conf
*
);
static
int
set_config_loglevel
(
const
char
*
,
const
char
*
,
struct
lxc_conf
*
);
static
int
get_config_loglevel
(
struct
lxc_container
*
,
const
char
*
,
char
*
,
int
);
static
int
set_config_logfile
(
const
char
*
,
const
char
*
,
struct
lxc_conf
*
);
static
int
set_config_logfile
(
const
char
*
,
const
char
*
,
struct
lxc_conf
*
);
static
int
set_config_mount
(
const
char
*
,
const
char
*
,
struct
lxc_conf
*
);
static
int
set_config_mount
(
const
char
*
,
const
char
*
,
struct
lxc_conf
*
);
static
int
set_config_mount_auto
(
const
char
*
,
const
char
*
,
struct
lxc_conf
*
);
static
int
set_config_mount_auto
(
const
char
*
,
const
char
*
,
struct
lxc_conf
*
);
...
@@ -156,7 +158,7 @@ static struct lxc_config_t config[] = {
...
@@ -156,7 +158,7 @@ static struct lxc_config_t config[] = {
{
"lxc.se_context"
,
set_config_lsm_se_context
,
get_config_lsm_se_context
,
NULL
},
{
"lxc.se_context"
,
set_config_lsm_se_context
,
get_config_lsm_se_context
,
NULL
},
{
"lxc.cgroup"
,
set_config_cgroup
,
get_config_cgroup
,
NULL
},
{
"lxc.cgroup"
,
set_config_cgroup
,
get_config_cgroup
,
NULL
},
{
"lxc.id_map"
,
set_config_idmaps
,
get_config_idmaps
,
NULL
},
{
"lxc.id_map"
,
set_config_idmaps
,
get_config_idmaps
,
NULL
},
{
"lxc.loglevel"
,
set_config_loglevel
,
NULL
,
NULL
},
{
"lxc.loglevel"
,
set_config_loglevel
,
get_config_loglevel
,
NULL
},
{
"lxc.logfile"
,
set_config_logfile
,
NULL
,
NULL
},
{
"lxc.logfile"
,
set_config_logfile
,
NULL
,
NULL
},
{
"lxc.mount.entry"
,
set_config_mount
,
NULL
,
NULL
},
{
"lxc.mount.entry"
,
set_config_mount
,
NULL
,
NULL
},
{
"lxc.mount.auto"
,
set_config_mount_auto
,
NULL
,
NULL
},
{
"lxc.mount.auto"
,
set_config_mount_auto
,
NULL
,
NULL
},
...
@@ -2944,8 +2946,6 @@ int lxc_get_config_item(struct lxc_conf *c, const char *key, char *retv,
...
@@ -2944,8 +2946,6 @@ int lxc_get_config_item(struct lxc_conf *c, const char *key, char *retv,
v
=
c
->
fstab
;
v
=
c
->
fstab
;
else
if
(
strcmp
(
key
,
"lxc.logfile"
)
==
0
)
else
if
(
strcmp
(
key
,
"lxc.logfile"
)
==
0
)
v
=
c
->
logfile
;
v
=
c
->
logfile
;
else
if
(
strcmp
(
key
,
"lxc.loglevel"
)
==
0
)
v
=
lxc_log_priority_to_string
(
c
->
loglevel
);
else
if
(
strcmp
(
key
,
"lxc.utsname"
)
==
0
)
else
if
(
strcmp
(
key
,
"lxc.utsname"
)
==
0
)
v
=
c
->
utsname
?
c
->
utsname
->
nodename
:
NULL
;
v
=
c
->
utsname
?
c
->
utsname
->
nodename
:
NULL
;
else
if
(
strcmp
(
key
,
"lxc.console.logfile"
)
==
0
)
else
if
(
strcmp
(
key
,
"lxc.console.logfile"
)
==
0
)
...
@@ -3625,7 +3625,7 @@ static int get_config_tty(struct lxc_container *c, const char *key, char *retv,
...
@@ -3625,7 +3625,7 @@ static int get_config_tty(struct lxc_container *c, const char *key, char *retv,
return
lxc_get_conf_int
(
c
->
lxc_conf
,
retv
,
inlen
,
c
->
lxc_conf
->
tty
);
return
lxc_get_conf_int
(
c
->
lxc_conf
,
retv
,
inlen
,
c
->
lxc_conf
->
tty
);
}
}
static
inline
int
lxc_get_conf_str
(
char
*
retv
,
int
inlen
,
char
*
value
)
static
inline
int
lxc_get_conf_str
(
char
*
retv
,
int
inlen
,
c
onst
c
har
*
value
)
{
{
if
(
!
value
)
if
(
!
value
)
return
0
;
return
0
;
...
@@ -3755,3 +3755,11 @@ static int get_config_idmaps(struct lxc_container *c, const char *key,
...
@@ -3755,3 +3755,11 @@ static int get_config_idmaps(struct lxc_container *c, const char *key,
}
}
return
fulllen
;
return
fulllen
;
}
}
static
int
get_config_loglevel
(
struct
lxc_container
*
c
,
const
char
*
key
,
char
*
retv
,
int
inlen
)
{
const
char
*
v
;
v
=
lxc_log_priority_to_string
(
c
->
lxc_conf
->
loglevel
);
return
lxc_get_conf_str
(
retv
,
inlen
,
v
);
}
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