fileio: teach read_full_file_full() to read from offset/with maximum size

This commit is contained in:
Lennart Poettering
2020-12-01 14:17:47 +01:00
parent c61f46fe31
commit 986311c2da
12 changed files with 130 additions and 36 deletions
+4 -1
View File
@@ -1589,7 +1589,10 @@ static int parse_argv(int argc, char *argv[]) {
return log_oom();
}
r = read_full_file_full(AT_FDCWD, j ?: p, flags, NULL, &data, &size);
r = read_full_file_full(AT_FDCWD, j ?: p, UINT64_MAX, SIZE_MAX,
flags,
NULL,
&data, &size);
if (r < 0)
return log_error_errno(r, "Failed to read credential '%s': %m", j ?: p);