* commit '1ed1d341baaba1d1453dbd061476d4263f17aa28': AArch64: Use negative values in error enumeration
This commit is contained in:
commit
bfed136068
1 changed files with 10 additions and 10 deletions
|
|
@ -41,23 +41,23 @@ typedef int32_t status_t;
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
# undef NO_ERROR
|
# undef NO_ERROR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
OK = 0, // Everything's swell.
|
OK = 0, // Everything's swell.
|
||||||
NO_ERROR = 0, // No errors.
|
NO_ERROR = 0, // No errors.
|
||||||
|
|
||||||
UNKNOWN_ERROR = 0x80000000,
|
UNKNOWN_ERROR = (-2147483647-1), // INT32_MIN value
|
||||||
|
|
||||||
NO_MEMORY = -ENOMEM,
|
NO_MEMORY = -ENOMEM,
|
||||||
INVALID_OPERATION = -ENOSYS,
|
INVALID_OPERATION = -ENOSYS,
|
||||||
BAD_VALUE = -EINVAL,
|
BAD_VALUE = -EINVAL,
|
||||||
BAD_TYPE = 0x80000001,
|
BAD_TYPE = (UNKNOWN_ERROR + 1),
|
||||||
NAME_NOT_FOUND = -ENOENT,
|
NAME_NOT_FOUND = -ENOENT,
|
||||||
PERMISSION_DENIED = -EPERM,
|
PERMISSION_DENIED = -EPERM,
|
||||||
NO_INIT = -ENODEV,
|
NO_INIT = -ENODEV,
|
||||||
ALREADY_EXISTS = -EEXIST,
|
ALREADY_EXISTS = -EEXIST,
|
||||||
DEAD_OBJECT = -EPIPE,
|
DEAD_OBJECT = -EPIPE,
|
||||||
FAILED_TRANSACTION = 0x80000002,
|
FAILED_TRANSACTION = (UNKNOWN_ERROR + 2),
|
||||||
JPARKS_BROKE_IT = -EPIPE,
|
JPARKS_BROKE_IT = -EPIPE,
|
||||||
#if !defined(HAVE_MS_C_RUNTIME)
|
#if !defined(HAVE_MS_C_RUNTIME)
|
||||||
BAD_INDEX = -EOVERFLOW,
|
BAD_INDEX = -EOVERFLOW,
|
||||||
|
|
@ -67,12 +67,12 @@ enum {
|
||||||
UNKNOWN_TRANSACTION = -EBADMSG,
|
UNKNOWN_TRANSACTION = -EBADMSG,
|
||||||
#else
|
#else
|
||||||
BAD_INDEX = -E2BIG,
|
BAD_INDEX = -E2BIG,
|
||||||
NOT_ENOUGH_DATA = 0x80000003,
|
NOT_ENOUGH_DATA = (UNKNOWN_ERROR + 3),
|
||||||
WOULD_BLOCK = 0x80000004,
|
WOULD_BLOCK = (UNKNOWN_ERROR + 4),
|
||||||
TIMED_OUT = 0x80000005,
|
TIMED_OUT = (UNKNOWN_ERROR + 5),
|
||||||
UNKNOWN_TRANSACTION = 0x80000006,
|
UNKNOWN_TRANSACTION = (UNKNOWN_ERROR + 6),
|
||||||
#endif
|
#endif
|
||||||
FDS_NOT_ALLOWED = 0x80000007,
|
FDS_NOT_ALLOWED = (UNKNOWN_ERROR + 7),
|
||||||
};
|
};
|
||||||
|
|
||||||
// Restore define; enumeration is in "android" namespace, so the value defined
|
// Restore define; enumeration is in "android" namespace, so the value defined
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue