summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2011-01-26 22:17:43 +0100
committerKai Blin <kai@samba.org>2011-01-26 23:07:24 +0100
commit278c6f8fc538ad8ee069f0682229fad34abb3513 (patch)
treea02ec1140558787fbf5c2f2435cdcddbac13d91e /source4
parent67e578ab5aa604cc409480479c2f2b3bc9a969da (diff)
downloadsamba-278c6f8fc538ad8ee069f0682229fad34abb3513.tar.gz
samba-278c6f8fc538ad8ee069f0682229fad34abb3513.tar.bz2
samba-278c6f8fc538ad8ee069f0682229fad34abb3513.zip
errormap: Add unix_to_werror() function
While this function technically is closest to the map_nt_status_from_unix() function, I think it is better to keep the new function in line with our usual fooerror_to_barerror() naming scheme. Signed-off-by: Kai Blin <kai@samba.org> Autobuild-User: Kai Blin <kai@samba.org> Autobuild-Date: Wed Jan 26 23:07:24 CET 2011 on sn-devel-104
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/util/errormap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/libcli/util/errormap.c b/source4/libcli/util/errormap.c
index 8fcf60b44e..29f2331cde 100644
--- a/source4/libcli/util/errormap.c
+++ b/source4/libcli/util/errormap.c
@@ -1383,6 +1383,12 @@ NTSTATUS map_nt_error_from_unix(int unix_error)
return NT_STATUS_UNSUCCESSFUL;
}
+/* Convert a Unix error code to WERROR */
+WERROR unix_to_werror(int unix_error)
+{
+ return ntstatus_to_werror(map_nt_error_from_unix(unix_error));
+}
+
NTSTATUS ndr_map_error2ntstatus(enum ndr_err_code ndr_err)
{
switch (ndr_err) {