diff options
author | Günther Deschner <gd@samba.org> | 2011-03-03 00:41:11 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2011-03-04 01:18:42 +0100 |
commit | 9f4b3b103fea1f2b5f54bae79a86b1490ddc21eb (patch) | |
tree | 1dbf3b6f4d05e820e9fb25f538fa47127ff0b9d2 /source4/libcli/util/nterr.c | |
parent | d36777735282b7d22c7d5e21f525c4f24fd774b1 (diff) | |
download | samba-9f4b3b103fea1f2b5f54bae79a86b1490ddc21eb.tar.gz samba-9f4b3b103fea1f2b5f54bae79a86b1490ddc21eb.tar.bz2 samba-9f4b3b103fea1f2b5f54bae79a86b1490ddc21eb.zip |
s4-nterr: some minor cosmetic edits to further match s3 nterr.
Guenther
Diffstat (limited to 'source4/libcli/util/nterr.c')
-rw-r--r-- | source4/libcli/util/nterr.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source4/libcli/util/nterr.c b/source4/libcli/util/nterr.c index d854d7d142..cb0c081602 100644 --- a/source4/libcli/util/nterr.c +++ b/source4/libcli/util/nterr.c @@ -741,6 +741,8 @@ static const nt_err_code_struct nt_errs[] = { NULL, NT_STATUS(0) } }; +/* These need sorting..... */ + static const nt_err_code_struct nt_err_desc[] = { { N_("Success"), NT_STATUS_OK }, @@ -843,8 +845,9 @@ static const nt_err_code_struct nt_err_desc[] = }; /***************************************************************************** - returns an NT error message. not amazingly helpful, but better than a number. + Returns an NT error message. not amazingly helpful, but better than a number. *****************************************************************************/ + const char *nt_errstr(NTSTATUS nt_code) { static char msg[40]; @@ -871,6 +874,7 @@ const char *nt_errstr(NTSTATUS nt_code) /************************************************************************ Print friendler version fo NT error code ***********************************************************************/ + const char *get_friendly_nt_error_msg(NTSTATUS nt_code) { int idx = 0; @@ -883,12 +887,14 @@ const char *get_friendly_nt_error_msg(NTSTATUS nt_code) } /* fall back to NT_STATUS_XXX string */ + return nt_errstr(nt_code); } /***************************************************************************** - returns an NT_STATUS constant as a string for inclusion in autogen C code + Returns an NT_STATUS constant as a string for inclusion in autogen C code. *****************************************************************************/ + const char *get_nt_error_c_code(NTSTATUS nt_code) { static char out[40]; @@ -908,8 +914,9 @@ const char *get_nt_error_c_code(NTSTATUS nt_code) } /***************************************************************************** - returns the NT_STATUS constant matching the string supplied (as an NTSTATUS) + Returns the NT_STATUS constant matching the string supplied (as an NTSTATUS) *****************************************************************************/ + NTSTATUS nt_status_string_to_code(const char *nt_status_str) { int idx = 0; |