tree-wide: use read_full_virtual_file() where appropriate

Wherever we read virtual files we better should use
read_full_virtual_file(), to make sure we get a consistent response
given how weird the kernel's handling with partial read on such file
systems is.
This commit is contained in:
Lennart Poettering
2021-03-17 18:43:42 +01:00
parent 04820600e7
commit 627055ce9a
8 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -1548,7 +1548,7 @@ int pidfd_get_pid(int fd, pid_t *ret) {
xsprintf(path, "/proc/self/fdinfo/%i", fd);
r = read_full_file(path, &fdinfo, NULL);
r = read_full_virtual_file(path, &fdinfo, NULL);
if (r == -ENOENT) /* if fdinfo doesn't exist we assume the process does not exist */
return -ESRCH;
if (r < 0)