summaryrefslogtreecommitdiffstats
path: root/source/libsmb/smberr.c
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
commitf4535721d350f3068e8dfb612331eb609ea03da0 (patch)
treee6ccb2b40f876dc4510f89f187062c0c79900e5e /source/libsmb/smberr.c
parent950d8e365626ecbd82e9ee965dc1724dc50c64a4 (diff)
downloadsamba-f4535721d350f3068e8dfb612331eb609ea03da0.tar.gz
samba-f4535721d350f3068e8dfb612331eb609ea03da0.tar.xz
samba-f4535721d350f3068e8dfb612331eb609ea03da0.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.
Diffstat (limited to 'source/libsmb/smberr.c')
-rw-r--r--source/libsmb/smberr.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/libsmb/smberr.c b/source/libsmb/smberr.c
index b6e6f03740e..3ef4eaf989e 100644
--- a/source/libsmb/smberr.c
+++ b/source/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.