projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbf6dea
)
make xsocket die with address family printed (if VERBOSE_RESOLUTION_ERRORS=y)
author
Denis Vlasenko
<vda.linux@googlemail.com>
Fri, 13 Apr 2007 21:26:20 +0000
(21:26 -0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Fri, 13 Apr 2007 21:26:20 +0000
(21:26 -0000)
libbb/xfuncs.c
patch
|
blob
|
history
diff --git
a/libbb/xfuncs.c
b/libbb/xfuncs.c
index 7fe5c3a45952c221194c79d97c9b12672da7d214..7e1109470114ab82706458b76417cfe367fa33d1 100644
(file)
--- a/
libbb/xfuncs.c
+++ b/
libbb/xfuncs.c
@@
-540,7
+540,18
@@
int xsocket(int domain, int type, int protocol)
{
int r = socket(domain, type, protocol);
- if (r < 0) bb_perror_msg_and_die("socket");
+ if (r < 0) {
+ /* Hijack vaguely related config option */
+#if ENABLE_VERBOSE_RESOLUTION_ERRORS
+ const char *s = "INET";
+ if (domain == AF_PACKET) s = "PACKET";
+ if (domain == AF_NETLINK) s = "NETLINK";
+USE_FEATURE_IPV6(if (domain == AF_INET6) s = "INET6";)
+ bb_perror_msg_and_die("socket(AF_%s)", s);
+#else
+ bb_perror_msg_and_die("socket");
+#endif
+ }
return r;
}