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
44dec7ef
Unverified
Commit
44dec7ef
authored
Feb 26, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parse: error out on invalid config key
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
4ad78f87
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
parse.c
src/lxc/parse.c
+3
-2
No files found.
src/lxc/parse.c
View file @
44dec7ef
...
@@ -67,9 +67,10 @@ int lxc_strmunmap(void *addr, size_t length)
...
@@ -67,9 +67,10 @@ int lxc_strmunmap(void *addr, size_t length)
int
lxc_file_for_each_line_mmap
(
const
char
*
file
,
lxc_file_cb
callback
,
int
lxc_file_for_each_line_mmap
(
const
char
*
file
,
lxc_file_cb
callback
,
void
*
data
)
void
*
data
)
{
{
int
fd
,
ret
;
int
fd
;
char
*
buf
,
*
line
;
char
*
buf
,
*
line
;
struct
stat
st
;
struct
stat
st
;
int
ret
=
0
;
char
*
saveptr
=
NULL
;
char
*
saveptr
=
NULL
;
fd
=
open
(
file
,
O_RDONLY
|
O_CLOEXEC
);
fd
=
open
(
file
,
O_RDONLY
|
O_CLOEXEC
);
...
@@ -105,7 +106,7 @@ int lxc_file_for_each_line_mmap(const char *file, lxc_file_cb callback,
...
@@ -105,7 +106,7 @@ int lxc_file_for_each_line_mmap(const char *file, lxc_file_cb callback,
lxc_strmunmap
(
buf
,
st
.
st_size
);
lxc_strmunmap
(
buf
,
st
.
st_size
);
close
(
fd
);
close
(
fd
);
return
0
;
return
ret
;
}
}
int
lxc_file_for_each_line
(
const
char
*
file
,
lxc_file_cb
callback
,
void
*
data
)
int
lxc_file_for_each_line
(
const
char
*
file
,
lxc_file_cb
callback
,
void
*
data
)
...
...
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