summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-01-06 03:41:29 +0000
committerTim Potter <tpot@samba.org>2002-01-06 03:41:29 +0000
commitbf4c3d3659081a034110cffb2ae6bf5bd3767a22 (patch)
treee577b83fbf97635056f6cfd2149f8cc33973ab5d /source3/libsmb
parent84dbcd6147557b78e635ac70bf744020ed3253f1 (diff)
downloadsamba-bf4c3d3659081a034110cffb2ae6bf5bd3767a22.tar.gz
samba-bf4c3d3659081a034110cffb2ae6bf5bd3767a22.tar.bz2
samba-bf4c3d3659081a034110cffb2ae6bf5bd3767a22.zip
Added a get_dos_error_msg() function to mirror the get_nt_error_msg()
One day I'll get around to refactoring the DOS error handling so it mirrors the NT error handling code. (This used to be commit f4535721d350f3068e8dfb612331eb609ea03da0)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/smberr.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/libsmb/smberr.c b/source3/libsmb/smberr.c
index b6e6f03740..3ef4eaf989 100644
--- a/source3/libsmb/smberr.c
+++ b/source3/libsmb/smberr.c
@@ -77,6 +77,7 @@ err_code_struct dos_msgs[] = {
{"ERRinvgroup",ERRinvgroup,"Invalid workgroup (try the -W option)"},
{"ERRlogonfailure",ERRlogonfailure,"Logon failure"},
{"ERRdiskfull",ERRdiskfull,"Disk full"},
+ {"ERRgeneral",ERRgeneral, "General failure"},
{NULL,-1,NULL}};
/* Server Error Messages */
@@ -181,6 +182,16 @@ char *smb_dos_err_name(uint8 class, uint16 num)
return(ret);
}
+/* Return a string for a DOS error */
+
+char *get_dos_error_msg(WERROR result)
+{
+ uint16 errnum;
+
+ errnum = W_ERROR_V(result);
+
+ return smb_dos_err_name(ERRDOS, errnum);
+}
/****************************************************************************
return a SMB error class name as a string.