From: Lennart Poettering Date: Tue, 10 May 2022 14:22:16 +0000 (+0200) Subject: fileio: propagate original error if we notice AF_UNIX connect() is not going to work X-Git-Tag: v251-rc3~1^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=28fe6a8072350134f7ff62b6ab7f01081fa11c9a;p=thirdparty%2Fsystemd.git 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... --- diff --git a/src/basic/fileio.c b/src/basic/fileio.c index e7b670ab2e4..1483c762280 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);