chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nspawn: a bench of special fileystems that should not be shifted
[elogind.git]
/
src
/
basic
/
fd-util.h
diff --git
a/src/basic/fd-util.h
b/src/basic/fd-util.h
index 2575bcc3532d314f9adb9426ba62c821441b982b..522ea6894955c10233e04d304566d65849e8fe1c 100644
(file)
--- a/
src/basic/fd-util.h
+++ b/
src/basic/fd-util.h
@@
-19,9
+19,9
@@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <stdio.h>
#include <dirent.h>
#include <stdbool.h>
#include <dirent.h>
#include <stdbool.h>
+#include <stdio.h>
#include <sys/socket.h>
#include "macro.h"
#include <sys/socket.h>
#include "macro.h"
@@
-74,4
+74,10
@@
int same_fd(int a, int b);
void cmsg_close_all(struct msghdr *mh);
bool fdname_is_valid(const char *s);
void cmsg_close_all(struct msghdr *mh);
bool fdname_is_valid(const char *s);
+
+int fd_get_path(int fd, char **ret);
#endif // 0
#endif // 0
+
+/* Hint: ENETUNREACH happens if we try to connect to "non-existing" special IP addresses, such as ::5 */
+#define ERRNO_IS_DISCONNECT(r) \
+ IN_SET(r, ENOTCONN, ECONNRESET, ECONNREFUSED, ECONNABORTED, EPIPE, ENETUNREACH)