basic: change read_one_line_file() to return number of bytes read

Change detect_vm_xen_dom0() to match new usage.
This commit is contained in:
Topi Miettinen
2019-02-02 00:25:57 +02:00
parent 118dccc948
commit d6062e3b4f
2 changed files with 2 additions and 4 deletions
+1 -3
View File
@@ -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) {