implement user mode catchable exceptions, refactor system status codes to use NTLSTATUS_ prefix, update build scripts to use shared literal macros for linker arguments, update named queue lifetime cleanup to include KeNamedQueueUnpublishHandle.
This commit is contained in:
1 parent
1f5477cf66
commit
b7fcfce6f7
140 files changed
+7649
-3943
No files matched your search
@@ -9,23 +9,23 @@ int errno = 0;
|
||||
// Implements the status To Errno operation.
|
||||
int PosixStatusToErrno(uint32_t s) {
|
||||
switch (s) {
|
||||
case STATUS_SUCCESS: return 0;
|
||||
case STATUS_NOT_SUPPORTED: return ENOSYS;
|
||||
case STATUS_TIMEOUT: return EAGAIN;
|
||||
case STATUS_WOULD_BLOCK: return EAGAIN;
|
||||
case STATUS_INVALID_PARAMETER: return EINVAL;
|
||||
case STATUS_INVALID_HANDLE: return EBADF;
|
||||
case STATUS_BUFFER_TOO_SMALL: return ERANGE;
|
||||
case STATUS_NO_MEMORY: return ENOMEM;
|
||||
case STATUS_ACCESS_DENIED: return EACCES;
|
||||
case STATUS_NOT_FOUND: return ENOENT;
|
||||
case STATUS_ALREADY_EXISTS: return EEXIST;
|
||||
case STATUS_OBJECT_NAME_COLLISION: return EEXIST;
|
||||
case STATUS_OBJECT_DEAD: return ECONNRESET;
|
||||
case STATUS_QUEUE_FULL: return EAGAIN;
|
||||
case STATUS_QUEUE_EMPTY: return EAGAIN;
|
||||
case STATUS_CANCELLED: return ECANCELED;
|
||||
case STATUS_NO_MORE_FILES: return ENOENT;
|
||||
case NTLSTATUS_SUCCESS: return 0;
|
||||
case NTLSTATUS_NOT_SUPPORTED: return ENOSYS;
|
||||
case NTLSTATUS_TIMEOUT: return EAGAIN;
|
||||
case NTLSTATUS_WOULD_BLOCK: return EAGAIN;
|
||||
case NTLSTATUS_INVALID_PARAMETER: return EINVAL;
|
||||
case NTLSTATUS_INVALID_HANDLE: return EBADF;
|
||||
case NTLSTATUS_BUFFER_TOO_SMALL: return ERANGE;
|
||||
case NTLSTATUS_NO_MEMORY: return ENOMEM;
|
||||
case NTLSTATUS_ACCESS_DENIED: return EACCES;
|
||||
case NTLSTATUS_NOT_FOUND: return ENOENT;
|
||||
case NTLSTATUS_ALREADY_EXISTS: return EEXIST;
|
||||
case NTLSTATUS_OBJECT_NAME_COLLISION: return EEXIST;
|
||||
case NTLSTATUS_OBJECT_DEAD: return ECONNRESET;
|
||||
case NTLSTATUS_QUEUE_FULL: return EAGAIN;
|
||||
case NTLSTATUS_QUEUE_EMPTY: return EAGAIN;
|
||||
case NTLSTATUS_CANCELLED: return ECANCELED;
|
||||
case NTLSTATUS_NO_MORE_FILES: return ENOENT;
|
||||
default: return EIO;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user