summaryrefslogtreecommitdiff
path: root/source4/libcli/util/errormap.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-11-17 00:31:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:54 -0500
commit285db3339931c47a569f49e8e18760d6185aac54 (patch)
treef7cdbd6a911c349073faadb5eed242aae760a8a0 /source4/libcli/util/errormap.c
parent7f340a29977e89b67d66473085e98db7b2ce71f6 (diff)
downloadsamba-285db3339931c47a569f49e8e18760d6185aac54.tar.gz
samba-285db3339931c47a569f49e8e18760d6185aac54.tar.bz2
samba-285db3339931c47a569f49e8e18760d6185aac54.zip
r3792: improved the posix -> nt error mapping, so we get things like
NT_STATUS_HOST_UNREACHABLE instead of NT_STATUS_UNSUCCESSFUL (This used to be commit f2a488e5668ab5d262269f1bab1b33a63265cbe9)
Diffstat (limited to 'source4/libcli/util/errormap.c')
-rw-r--r--source4/libcli/util/errormap.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source4/libcli/util/errormap.c b/source4/libcli/util/errormap.c
index 417f4571a7..6849d7d0cd 100644
--- a/source4/libcli/util/errormap.c
+++ b/source4/libcli/util/errormap.c
@@ -1518,6 +1518,18 @@ const struct unix_error_map unix_nt_errmap[] = {
{ ECONNREFUSED, NT_STATUS_CONNECTION_REFUSED },
{ EBUSY, NT_STATUS_SHARING_VIOLATION },
{ ENOTSUP, NT_STATUS_NOT_SUPPORTED},
+#ifdef EHOSTUNREACH
+ { EHOSTUNREACH, NT_STATUS_HOST_UNREACHABLE },
+#endif
+#ifdef ENETUNREACH
+ { ENETUNREACH, NT_STATUS_NETWORK_UNREACHABLE },
+#endif
+#ifdef ETIMEDOUT
+ { ETIMEDOUT, NT_STATUS_IO_TIMEOUT },
+#endif
+#ifdef EADDRINUSE
+ { EADDRINUSE, NT_STATUS_ADDRESS_ALREADY_ASSOCIATED },
+#endif
#ifdef ENOATTR
{ ENOATTR, NT_STATUS_NOT_FOUND },
#endif