mirror of
https://github.com/winfsp/winfsp.git
synced 2025-07-03 01:12:58 -05:00
sys: add NtStatusSym()
This commit is contained in:
22
src/sys/debug.c
Normal file
22
src/sys/debug.c
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @file sys/debug.c
|
||||
*
|
||||
* @copyright 2015 Bill Zissimopoulos
|
||||
*/
|
||||
|
||||
#include <sys/driver.h>
|
||||
|
||||
#if DBG
|
||||
const char *NtStatusSym(NTSTATUS Status)
|
||||
{
|
||||
switch (Status)
|
||||
{
|
||||
#define SYM(x) case x: return #x;
|
||||
/* cygwin: sed -n '/_WAIT_0/!s/^#define[ \t]*\(STATUS_[^ \t]*\).*NTSTATUS.*$/SYM(\1)/p' ntstatus.h >ntstatus.i */
|
||||
#include "ntstatus.i"
|
||||
#undef SYM
|
||||
default:
|
||||
return "UNKNOWN";
|
||||
}
|
||||
}
|
||||
#endif
|
Reference in New Issue
Block a user