summaryrefslogtreecommitdiff
path: root/src/basic/fileio.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-05-10 16:22:16 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-05-13 21:48:17 +0900
commit28fe6a8072350134f7ff62b6ab7f01081fa11c9a (patch)
treeaafe8acb7f0830984237a92e456084f627afd129 /src/basic/fileio.c
parentdfa2b389a627652e0e190473817073c44cf19f2b (diff)
downloadsystemd-28fe6a8072350134f7ff62b6ab7f01081fa11c9a.tar.gz
fileio: propagate original error if we notice AF_UNIX connect() is not going to work
let's not make up new errors in these checks that validate if connect() work at all. After all, we don't really know if the ENXIO we saw earlier actually is really caused by the inode being an AF_UNIX socket, we just have the suspicion...
Diffstat (limited to 'src/basic/fileio.c')
-rw-r--r--src/basic/fileio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/fileio.c b/src/basic/fileio.c
index e7b670ab2e..1483c76228 100644
--- a/src/basic/fileio.c
+++ b/src/basic/fileio.c
@@ -776,7 +776,7 @@ int read_full_file_full(
/* Seeking is not supported on AF_UNIX sockets */
if (offset != UINT64_MAX)
- return -ESPIPE;
+ return -ENXIO;
if (dir_fd == AT_FDCWD)
r = sockaddr_un_set_path(&sa.un, filename);