{ "NT_STATUS_DS_NO_MORE_RIDS", NT_STATUS_DS_NO_MORE_RIDS },
{ "NT_STATUS_NOT_A_REPARSE_POINT", NT_STATUS_NOT_A_REPARSE_POINT },
{ "NT_STATUS_DOWNGRADE_DETECTED", NT_STATUS_DOWNGRADE_DETECTED },
- { "NT_STATUS_NO_MORE_ENTRIES", NT_STATUS_NO_MORE_ENTRIES },
+ { "NT_STATUS_NO_MORE_ENTRIES", NT_STATUS_NO_MORE_ENTRIES },
{ "STATUS_MORE_ENTRIES", STATUS_MORE_ENTRIES },
{ "STATUS_SOME_UNMAPPED", STATUS_SOME_UNMAPPED },
{ "STATUS_NO_MORE_FILES", STATUS_NO_MORE_FILES },
const char *nt_errstr(NTSTATUS nt_code)
{
- int idx = 0;
+ int idx = 0;
char *result;
#ifdef HAVE_LDAP
- if (NT_STATUS_IS_LDAP(nt_code)) {
- return ldap_err2string(NT_STATUS_LDAP_CODE(nt_code));
+ if (NT_STATUS_IS_LDAP(nt_code)) {
+ return ldap_err2string(NT_STATUS_LDAP_CODE(nt_code));
}
#endif
while (nt_errs[idx].nt_errstr != NULL) {
if (NT_STATUS_EQUAL(nt_errs[idx].nt_errcode, nt_code)) {
- return nt_errs[idx].nt_errstr;
+ return nt_errs[idx].nt_errstr;
}
idx++;
}
const char *get_friendly_nt_error_msg(NTSTATUS nt_code)
{
- int idx = 0;
+ int idx = 0;
while (nt_err_desc[idx].nt_errstr != NULL) {
if (NT_STATUS_V(nt_err_desc[idx].nt_errcode) == NT_STATUS_V(nt_code)) {
- return nt_err_desc[idx].nt_errstr;
+ return nt_err_desc[idx].nt_errstr;
}
idx++;
}
const char *get_nt_error_c_code(NTSTATUS nt_code)
{
char *result;
- int idx = 0;
+ int idx = 0;
while (nt_errs[idx].nt_errstr != NULL) {
if (NT_STATUS_V(nt_errs[idx].nt_errcode) ==
- NT_STATUS_V(nt_code)) {
- return nt_errs[idx].nt_errstr;
+ NT_STATUS_V(nt_code)) {
+ return nt_errs[idx].nt_errstr;
}
idx++;
}
NTSTATUS nt_status_string_to_code(const char *nt_status_str)
{
- int idx = 0;
+ int idx = 0;
while (nt_errs[idx].nt_errstr != NULL) {
if (strcmp(nt_errs[idx].nt_errstr, nt_status_str) == 0) {
- return nt_errs[idx].nt_errcode;
+ return nt_errs[idx].nt_errcode;
}
idx++;
}
{ "NT_STATUS_QUOTA_LIST_INCONSISTENT", NT_STATUS_QUOTA_LIST_INCONSISTENT },
{ "NT_STATUS_FILE_IS_OFFLINE", NT_STATUS_FILE_IS_OFFLINE },
{ "NT_STATUS_DS_NO_MORE_RIDS", NT_STATUS_DS_NO_MORE_RIDS },
- { "NT_STATUS_NO_MORE_ENTRIES", NT_STATUS_NO_MORE_ENTRIES },
+ { "NT_STATUS_NO_MORE_ENTRIES", NT_STATUS_NO_MORE_ENTRIES },
{ "NT_STATUS_RPC_PROTSEQ_NOT_SUPPORTED", NT_STATUS_RPC_PROTSEQ_NOT_SUPPORTED },
{ "NT_STATUS_RPC_UNSUPPORTED_NAME_SYNTAX", NT_STATUS_RPC_UNSUPPORTED_NAME_SYNTAX },
{ "NT_STATUS_RPC_UNKNOWN_IF", NT_STATUS_RPC_UNKNOWN_IF },
*****************************************************************************/
const char *nt_errstr(NTSTATUS nt_code)
{
- static char msg[40];
- int idx = 0;
+ static char msg[40];
+ int idx = 0;
while (nt_errs[idx].nt_errstr != NULL) {
if (NT_STATUS_V(nt_errs[idx].nt_errcode) ==
- NT_STATUS_V(nt_code)) {
- return nt_errs[idx].nt_errstr;
+ NT_STATUS_V(nt_code)) {
+ return nt_errs[idx].nt_errstr;
}
idx++;
}
slprintf(msg, sizeof(msg), "NT code 0x%08x", NT_STATUS_V(nt_code));
- return msg;
+ return msg;
}
/************************************************************************
***********************************************************************/
const char *get_friendly_nt_error_msg(NTSTATUS nt_code)
{
- int idx = 0;
+ int idx = 0;
while (nt_err_desc[idx].nt_errstr != NULL) {
if (NT_STATUS_V(nt_err_desc[idx].nt_errcode) == NT_STATUS_V(nt_code)) {
- return nt_err_desc[idx].nt_errstr;
+ return nt_err_desc[idx].nt_errstr;
}
idx++;
}
*****************************************************************************/
const char *get_nt_error_c_code(NTSTATUS nt_code)
{
- static char out[40];
- int idx = 0;
+ static char out[40];
+ int idx = 0;
while (nt_errs[idx].nt_errstr != NULL) {
if (NT_STATUS_V(nt_errs[idx].nt_errcode) ==
- NT_STATUS_V(nt_code)) {
- return nt_errs[idx].nt_errstr;
+ NT_STATUS_V(nt_code)) {
+ return nt_errs[idx].nt_errstr;
}
idx++;
}
slprintf(out, sizeof(out), "NT_STATUS(0x%08x)", NT_STATUS_V(nt_code));
- return out;
+ return out;
}
/*****************************************************************************
*****************************************************************************/
NTSTATUS nt_status_string_to_code(const char *nt_status_str)
{
- int idx = 0;
+ int idx = 0;
while (nt_errs[idx].nt_errstr != NULL) {
if (strcasecmp(nt_errs[idx].nt_errstr, nt_status_str) == 0) {
- return nt_errs[idx].nt_errcode;
+ return nt_errs[idx].nt_errcode;
}
idx++;
}