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
856a5733
Commit
856a5733
authored
Oct 28, 2016
by
Christian Brauner
Committed by
Stéphane Graber
Nov 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf/ile: use lxc_safe_uint() in config_autodev()
Signed-off-by:
Christian Brauner
<
christian.brauner@canonical.com
>
parent
e245c633
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
conf.h
src/lxc/conf.h
+1
-1
confile.c
src/lxc/confile.c
+6
-2
No files found.
src/lxc/conf.h
View file @
856a5733
...
@@ -325,7 +325,7 @@ struct lxc_conf {
...
@@ -325,7 +325,7 @@ struct lxc_conf {
scmp_filter_ctx
seccomp_ctx
;
scmp_filter_ctx
seccomp_ctx
;
#endif
#endif
int
maincmd_fd
;
int
maincmd_fd
;
int
autodev
;
// if 1, mount and fill a /dev at start
unsigned
int
autodev
;
// if 1, mount and fill a /dev at start
int
haltsignal
;
// signal used to halt container
int
haltsignal
;
// signal used to halt container
int
rebootsignal
;
// signal used to reboot container
int
rebootsignal
;
// signal used to reboot container
int
stopsignal
;
// signal used to hard stop container
int
stopsignal
;
// signal used to hard stop container
...
...
src/lxc/confile.c
View file @
856a5733
...
@@ -1341,9 +1341,13 @@ static int config_loglevel(const char *key, const char *value,
...
@@ -1341,9 +1341,13 @@ static int config_loglevel(const char *key, const char *value,
static
int
config_autodev
(
const
char
*
key
,
const
char
*
value
,
static
int
config_autodev
(
const
char
*
key
,
const
char
*
value
,
struct
lxc_conf
*
lxc_conf
)
struct
lxc_conf
*
lxc_conf
)
{
{
int
v
=
atoi
(
value
);
if
(
lxc_safe_uint
(
value
,
&
lxc_conf
->
autodev
)
<
0
)
return
-
1
;
lxc_conf
->
autodev
=
v
;
if
(
lxc_conf
->
autodev
>
1
)
{
ERROR
(
"Wrong value for lxc.autodev. Can only be set to 0 or 1"
);
return
-
1
;
}
return
0
;
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