summaryrefslogtreecommitdiffstats
path: root/src/basic/fileio.c
diff options
context:
space:
mode:
authorTopi Miettinen <toiwoton@gmail.com>2019-02-01 22:25:53 +0100
committerTopi Miettinen <toiwoton@gmail.com>2019-02-01 23:25:57 +0100
commitd6062e3b4fa041b070e0571f90f6c57faddcd56d (patch)
tree56d0267b68d875cc21eb4f38f043fa5626aca7a7 /src/basic/fileio.c
parentpager: improve english a bit (diff)
downloadsystemd-d6062e3b4fa041b070e0571f90f6c57faddcd56d.tar.xz
systemd-d6062e3b4fa041b070e0571f90f6c57faddcd56d.zip
basic: change read_one_line_file() to return number of bytes read
Change detect_vm_xen_dom0() to match new usage.
Diffstat (limited to 'src/basic/fileio.c')
-rw-r--r--src/basic/fileio.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/basic/fileio.c b/src/basic/fileio.c
index e18b842999..91e0c9ec8b 100644
--- a/src/basic/fileio.c
+++ b/src/basic/fileio.c
@@ -212,7 +212,6 @@ int write_string_filef(
int read_one_line_file(const char *fn, char **line) {
_cleanup_fclose_ FILE *f = NULL;
- int r;
assert(fn);
assert(line);
@@ -223,8 +222,7 @@ int read_one_line_file(const char *fn, char **line) {
(void) __fsetlocking(f, FSETLOCKING_BYCALLER);
- r = read_line(f, LONG_LINE_MAX, line);
- return r < 0 ? r : 0;
+ return read_line(f, LONG_LINE_MAX, line);
}
int verify_file(const char *fn, const char *blob, bool accept_extra_nl) {