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
61e3ec8f
Unverified
Commit
61e3ec8f
authored
May 30, 2017
by
Christian Brauner
Committed by
Stéphane Graber
Jul 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
confile: config_ephemeral()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
71162625
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
confile.c
src/lxc/confile.c
+5
-2
No files found.
src/lxc/confile.c
View file @
61e3ec8f
...
@@ -3016,7 +3016,6 @@ static bool new_hwaddr(char *hwaddr)
...
@@ -3016,7 +3016,6 @@ static bool new_hwaddr(char *hwaddr)
{
{
int
ret
;
int
ret
;
/* COMMENT(brauner): Initialize random number generator. */
(
void
)
randseed
(
true
);
(
void
)
randseed
(
true
);
ret
=
snprintf
(
hwaddr
,
18
,
"00:16:3e:%02x:%02x:%02x"
,
rand
()
%
255
,
ret
=
snprintf
(
hwaddr
,
18
,
"00:16:3e:%02x:%02x:%02x"
,
rand
()
%
255
,
...
@@ -3105,9 +3104,13 @@ bool network_new_hwaddrs(struct lxc_conf *conf)
...
@@ -3105,9 +3104,13 @@ bool network_new_hwaddrs(struct lxc_conf *conf)
static
int
config_ephemeral
(
const
char
*
key
,
const
char
*
value
,
static
int
config_ephemeral
(
const
char
*
key
,
const
char
*
value
,
struct
lxc_conf
*
lxc_conf
)
struct
lxc_conf
*
lxc_conf
)
{
{
if
(
config_value_empty
(
value
))
/* Set config value to default. */
if
(
config_value_empty
(
value
))
{
lxc_conf
->
ephemeral
=
0
;
return
0
;
return
0
;
}
/* Parse new config value. */
if
(
lxc_safe_uint
(
value
,
&
lxc_conf
->
ephemeral
)
<
0
)
if
(
lxc_safe_uint
(
value
,
&
lxc_conf
->
ephemeral
)
<
0
)
return
-
1
;
return
-
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