git.samba.org
/
ira
/
wip.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
errormap: Add unix_to_werror() function
[ira/wip.git]
/
libcli
/
util
/
errormap.c
diff --git
a/libcli/util/errormap.c
b/libcli/util/errormap.c
index f96d83fa62a95fdfed162902b13da22b3f77d74e..714e62c0d79ce2260c848811411620fde5cc8d23 100644
(file)
--- a/
libcli/util/errormap.c
+++ b/
libcli/util/errormap.c
@@
-1238,3
+1238,8
@@
WERROR ntstatus_to_werror(NTSTATUS error)
return W_ERROR(NT_STATUS_V(error) & 0xffff);
}
+/* Convert a Unix error code to a WERROR. */
+WERROR unix_to_werror(int unix_error)
+{
+ return ntstatus_to_werror(map_nt_error_from_unix_common(unix_error));
+}