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>
NTSTATUS nt_status_squash(NTSTATUS nt_status);
+/*****************************************************************************
+convert a Unix error to a WERROR
+ *****************************************************************************/
+WERROR unix_to_werror(int unix_error);
+
#endif /* _SAMBA_ERROR_H */
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));
+}