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
+5 -1
View File
@@ -100,7 +100,11 @@ static int run(int argc, char *argv[]) {
if (r < 0)
return log_error_errno(r, "Failed to parse root hash signature '%s': %m", argv[6]);
} else {
r = read_full_file_full(AT_FDCWD, argv[6], READ_FULL_FILE_CONNECT_SOCKET, NULL, &hash_sig, &hash_sig_size);
r = read_full_file_full(
AT_FDCWD, argv[6], UINT64_MAX, SIZE_MAX,
READ_FULL_FILE_CONNECT_SOCKET,
NULL,
&hash_sig, &hash_sig_size);
if (r < 0)
return log_error_errno(r, "Failed to read root hash signature: %m");
}