summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-02-27 13:18:17 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-02-27 13:18:18 +0000
commit26fa5cd39d39c2954d4c9abd866e39bf1d8d39ae (patch)
tree73f0430370df26f0c315b97d3c58cad58f894a32 /include
parent62f12bd9b134a7a991d1d80bda563e870cb56e8e (diff)
parent1ee7570052487671b889d7b123ba049ee41bd9e8 (diff)
downloadsystem_core-26fa5cd39d39c2954d4c9abd866e39bf1d8d39ae.zip
system_core-26fa5cd39d39c2954d4c9abd866e39bf1d8d39ae.tar.gz
system_core-26fa5cd39d39c2954d4c9abd866e39bf1d8d39ae.tar.bz2
Merge "AArch64: Use negative values in error enumeration"
Diffstat (limited to 'include')
-rw-r--r--include/utils/Errors.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/utils/Errors.h b/include/utils/Errors.h
index 0b75b19..46173db 100644
--- a/include/utils/Errors.h
+++ b/include/utils/Errors.h
@@ -41,23 +41,23 @@ typedef int32_t status_t;
#ifdef _WIN32
# undef NO_ERROR
#endif
-
+
enum {
OK = 0, // Everything's swell.
NO_ERROR = 0, // No errors.
-
- UNKNOWN_ERROR = 0x80000000,
+
+ UNKNOWN_ERROR = (-2147483647-1), // INT32_MIN value
NO_MEMORY = -ENOMEM,
INVALID_OPERATION = -ENOSYS,
BAD_VALUE = -EINVAL,
- BAD_TYPE = 0x80000001,
+ BAD_TYPE = (UNKNOWN_ERROR + 1),
NAME_NOT_FOUND = -ENOENT,
PERMISSION_DENIED = -EPERM,
NO_INIT = -ENODEV,
ALREADY_EXISTS = -EEXIST,
DEAD_OBJECT = -EPIPE,
- FAILED_TRANSACTION = 0x80000002,
+ FAILED_TRANSACTION = (UNKNOWN_ERROR + 2),
JPARKS_BROKE_IT = -EPIPE,
#if !defined(HAVE_MS_C_RUNTIME)
BAD_INDEX = -EOVERFLOW,
@@ -67,12 +67,12 @@ enum {
UNKNOWN_TRANSACTION = -EBADMSG,
#else
BAD_INDEX = -E2BIG,
- NOT_ENOUGH_DATA = 0x80000003,
- WOULD_BLOCK = 0x80000004,
- TIMED_OUT = 0x80000005,
- UNKNOWN_TRANSACTION = 0x80000006,
+ NOT_ENOUGH_DATA = (UNKNOWN_ERROR + 3),
+ WOULD_BLOCK = (UNKNOWN_ERROR + 4),
+ TIMED_OUT = (UNKNOWN_ERROR + 5),
+ UNKNOWN_TRANSACTION = (UNKNOWN_ERROR + 6),
#endif
- FDS_NOT_ALLOWED = 0x80000007,
+ FDS_NOT_ALLOWED = (UNKNOWN_ERROR + 7),
};
// Restore define; enumeration is in "android" namespace, so the value defined