From bf4c3d3659081a034110cffb2ae6bf5bd3767a22 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sun, 6 Jan 2002 03:41:29 +0000 Subject: 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) --- source3/libsmb/smberr.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source3') 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. -- cgit