#include "precompiled.h"
#include "lib/status.h"
#include <cstring>
#include <cstdio>
#include "lib/posix/posix_errno.h"
Go to the source code of this file.
int ErrnoFromStatus |
( |
Status |
status | ) |
|
- Returns
- the errno equivalent of a Status.
used in wposix - underlying functions return Status but must be translated to errno at e.g. the mmap interface level. higher-level code that calls mmap will in turn convert back to Status.
Definition at line 93 of file status.cpp.
(called via STATUS_ADD_DEFINITIONS)
- Parameters
-
bucket | is being added; its definitions and numDefinitions must already be initialized. |
- Returns
- previous bucket in list, suitable for initializing bucket->next.
(this function must be callable as a static initializer; initializing next avoids the need for a separate dummy variable)
Definition at line 40 of file status.cpp.
generate textual description of a Status.
- Parameters
-
buf | destination buffer (allows generating strings with the code's numerical value if no definition is found) |
max_chars | size of buffer [characters] |
- Returns
- buf (allows using this function in expressions)
Definition at line 79 of file status.cpp.
- Returns
- Status equivalent of errno, or ERR::FAIL if there's no equivalent.
NB: reset errno to 0 before calling POSIX functions to avoid confusion with previous errors.
Definition at line 105 of file status.cpp.