From 54fba5b1b875cdb549510ad1d218b39b2a3c6d64 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 4 Jul 2005 05:02:29 +0000 Subject: r8116: demonstrate a little trick that can be used to track down where an error is coming from. In this case I needed to know where a NT_STATUS_ACCESS_DENIED was being returned, which is a very common error, but I needed to know which place in the code was giving it (This used to be commit 692bb1c8a1428917ed6c516d02524c2f76157181) --- source4/include/nterr.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source4/include') diff --git a/source4/include/nterr.h b/source4/include/nterr.h index 6680b7ecec..1cf0b6a8d1 100644 --- a/source4/include/nterr.h +++ b/source4/include/nterr.h @@ -92,7 +92,12 @@ #define NT_STATUS_INVALID_VIEW_SIZE NT_STATUS(0xC0000000 | 0x001f) #define NT_STATUS_INVALID_FILE_FOR_SECTION NT_STATUS(0xC0000000 | 0x0020) #define NT_STATUS_ALREADY_COMMITTED NT_STATUS(0xC0000000 | 0x0021) +#if 0 +/* this demonstrates a little trick when tracking down error codes */ +#define NT_STATUS_ACCESS_DENIED (printf("access denied at %s\n", __location__), NT_STATUS(0xC0000000 | 0x0022)) +#else #define NT_STATUS_ACCESS_DENIED NT_STATUS(0xC0000000 | 0x0022) +#endif #define NT_STATUS_BUFFER_TOO_SMALL NT_STATUS(0xC0000000 | 0x0023) #define NT_STATUS_OBJECT_TYPE_MISMATCH NT_STATUS(0xC0000000 | 0x0024) #define NT_STATUS_NONCONTINUABLE_EXCEPTION NT_STATUS(0xC0000000 | 0x0025) -- cgit