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
bfa3f007
Commit
bfa3f007
authored
Sep 10, 2013
by
Serge Hallyn
Committed by
Stéphane Graber
Sep 10, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unused lxc_read_line_from_file()
Signed-off-by:
Serge Hallyn
<
serge.hallyn@ubuntu.com
>
parent
0e95426b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
28 deletions
+0
-28
utils.c
src/lxc/utils.c
+0
-27
utils.h
src/lxc/utils.h
+0
-1
No files found.
src/lxc/utils.c
View file @
bfa3f007
...
...
@@ -869,30 +869,3 @@ int lxc_read_from_file(const char *filename, void* buf, size_t count)
errno
=
saved_errno
;
return
ret
;
}
char
*
lxc_read_line_from_file
(
const
char
*
filename
)
{
FILE
*
f
;
char
*
line
=
NULL
;
int
saved_errno
;
size_t
sz
=
0
;
f
=
fopen_cloexec
(
filename
,
"r"
);
if
(
!
f
)
return
NULL
;
if
(
getline
(
&
line
,
&
sz
,
f
)
==
-
1
)
{
saved_errno
=
errno
;
fclose
(
f
);
errno
=
saved_errno
;
return
NULL
;
}
fclose
(
f
);
/* trim line, if necessary */
if
(
strlen
(
line
)
>
0
&&
line
[
strlen
(
line
)
-
1
]
==
'\n'
)
line
[
strlen
(
line
)
-
1
]
=
'\0'
;
return
line
;
}
src/lxc/utils.h
View file @
bfa3f007
...
...
@@ -197,7 +197,6 @@ extern int sha1sum_file(char *fnam, unsigned char *md_value);
/* read and write whole files */
extern
int
lxc_write_to_file
(
const
char
*
filename
,
const
void
*
buf
,
size_t
count
,
bool
add_newline
);
extern
int
lxc_read_from_file
(
const
char
*
filename
,
void
*
buf
,
size_t
count
);
extern
char
*
lxc_read_line_from_file
(
const
char
*
filename
);
/* convert variadic argument lists to arrays (for execl type argument lists) */
extern
char
**
lxc_va_arg_list_to_argv
(
va_list
ap
,
size_t
skip
,
int
do_strdup
);
...
...
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