mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
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 f4535721d3
)
This commit is contained in:
@ -77,6 +77,7 @@ err_code_struct dos_msgs[] = {
|
|||||||
{"ERRinvgroup",ERRinvgroup,"Invalid workgroup (try the -W option)"},
|
{"ERRinvgroup",ERRinvgroup,"Invalid workgroup (try the -W option)"},
|
||||||
{"ERRlogonfailure",ERRlogonfailure,"Logon failure"},
|
{"ERRlogonfailure",ERRlogonfailure,"Logon failure"},
|
||||||
{"ERRdiskfull",ERRdiskfull,"Disk full"},
|
{"ERRdiskfull",ERRdiskfull,"Disk full"},
|
||||||
|
{"ERRgeneral",ERRgeneral, "General failure"},
|
||||||
{NULL,-1,NULL}};
|
{NULL,-1,NULL}};
|
||||||
|
|
||||||
/* Server Error Messages */
|
/* Server Error Messages */
|
||||||
@ -181,6 +182,16 @@ char *smb_dos_err_name(uint8 class, uint16 num)
|
|||||||
return(ret);
|
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.
|
return a SMB error class name as a string.
|
||||||
|
Reference in New Issue
Block a user