Added a get_dos_error_msg() function to mirror the get_nt_error_msg()
authorTim Potter <tpot@samba.org>
Sun, 6 Jan 2002 03:41:29 +0000 (03:41 +0000)
committerTim Potter <tpot@samba.org>
Sun, 6 Jan 2002 03:41:29 +0000 (03:41 +0000)
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)

source3/libsmb/smberr.c

index b6e6f03740e61c454b5fdd8c818ed70b9643f93d..3ef4eaf989e7852758b900746b6329129e2eecec 100644 (file)
@@ -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.