From df88e66250375fec2d0991bf379f4fe6f2550a7c Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Wed, 26 Jan 2011 22:17:43 +0100 Subject: 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 --- libcli/util/errormap.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libcli/util/errormap.c') diff --git a/libcli/util/errormap.c b/libcli/util/errormap.c index f96d83fa62..714e62c0d7 100644 --- 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)); +} -- cgit