From 28fe6a8072350134f7ff62b6ab7f01081fa11c9a Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 10 May 2022 16:22:16 +0200 Subject: [PATCH] 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... --- src/basic/fileio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);