summaryrefslogtreecommitdiffstats
path: root/include/utils
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-02-27 13:33:25 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-02-27 13:33:25 +0000
commit665b0bb4f930c451904dff86a434c59f1ca4c9b0 (patch)
tree455875ea62cf6d57ad149c126be21c01543bcc2c /include/utils
parentdc6d9241dec3db9d8989df5e7cebfee21ce88190 (diff)
parentbfed136068feb299b3ca8a07d6eaf5d93e3ff2a3 (diff)
downloadsystem_core-665b0bb4f930c451904dff86a434c59f1ca4c9b0.zip
system_core-665b0bb4f930c451904dff86a434c59f1ca4c9b0.tar.gz
system_core-665b0bb4f930c451904dff86a434c59f1ca4c9b0.tar.bz2
am bfed1360: am 1ed1d341: am 26fa5cd3: Merge "AArch64: Use negative values in error enumeration"
* commit 'bfed136068feb299b3ca8a07d6eaf5d93e3ff2a3': AArch64: Use negative values in error enumeration
Diffstat (limited to 'include/utils')
-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