No description
Find a file
Tom Cherry 130e3d7204 init: pass errors from one Result<T> to another better
Result<T> currently has two problems,
1) A failing Result<T> cannot be easily constructed from a Result<U>'s
error.
2) errno is lost when passing .error() through multiple Result<T>'s

This change fixes both problems having Result<T>::error() return a
ResultError class that contains the std::string error message and int
errno.

It additionally has ostream operators to continue to allow printing
the error string directly to an ostream and also to pass the errno
through to another Result<T> class via Error() creation.

Lastly, it provides a new constructor for Result<T> for ResultError,
such that a Result<T> can be constructed from Result<U>::error().

Test: boot bullhead, init unit tests
Change-Id: Id9614b727cdabd2f5498b0da0e598e9aff7d9ae0
2017-08-23 11:04:32 -07:00
adb Merge "Don't preserve file attributes when pulling bugreport file..." 2017-08-22 22:41:26 +00:00
adf libadfhwc: Fix adf_hwc_close 2017-03-02 17:40:16 +00:00
base Merge "Revert "base: work around thread safety analysis bug."" 2017-08-02 23:10:42 +00:00
bootstat bootstat: switch from root.root to system.log 2017-08-09 15:08:21 -07:00
cpio Possible null pointer miss on realloc 2017-03-23 22:41:14 +01:00
debuggerd Merge "crash_dump: print the identity of tracers." 2017-08-19 01:20:24 +00:00
demangle Mark libdemangle as vendor_available 2017-06-14 18:58:22 +09:00
fastboot fastboot: gracefully handle failure to open a USB device on OS X. 2017-08-18 18:25:44 -07:00
fs_mgr Merge "Allow the use of a custom Android DT directory" 2017-07-29 07:05:18 +00:00
gatekeeperd Merge "Stop asking for old versions of C++ in system/core." 2017-08-03 02:23:09 +00:00
healthd Merge "healthd: notify listeners using local copy of list, drop lock" 2017-06-29 22:29:36 +00:00
include Move android_filesystem_config.h => fs_config.h 2017-08-02 16:31:19 -07:00
init init: pass errors from one Result<T> to another better 2017-08-23 11:04:32 -07:00
libappfuse libappfuse: use an explicit buffer size 2017-08-02 14:11:25 -07:00
libbacktrace Add demangling of function name. 2017-08-11 15:17:46 -07:00
libbinderwrapper libbinderwrapper: Android.mk -> Android.bp 2017-04-25 15:55:26 -07:00
libcrypto_utils Add vendor_available:true to libcrypto_utils 2017-05-16 11:51:09 -07:00
libcutils Merge "Add HSM AID." 2017-08-10 21:35:47 +00:00
libdiskconfig Mark libdiskconfig vendor_available. 2017-05-31 01:54:31 +00:00
libgrallocusage libgrallocusage: use gralloc1.h usage flags 2017-04-10 09:47:34 -07:00
libion Remove LOCAL_CLANG and clang: true 2017-07-25 14:29:50 +02:00
libkeyutils Add libkeyutils. 2017-05-10 10:40:11 -07:00
liblog Merge "Fix clang-tidy performance warnings in system/core." 2017-08-04 21:14:30 +00:00
libmemtrack libmemtrack: check return value for getMemory() 2017-02-27 12:21:39 -08:00
libmemunreachable Remove LOCAL_CLANG and clang: true 2017-07-25 14:29:50 +02:00
libmetricslogger Remove LOCAL_CLANG and clang: true 2017-07-25 14:29:50 +02:00
libnativebridge Remove LOCAL_CLANG and clang: true 2017-07-25 14:29:50 +02:00
libnativeloader Remove LOCAL_CLANG and clang: true 2017-07-25 14:29:50 +02:00
libnetutils Mark libnetutils vendor_available. 2017-05-31 02:02:17 +00:00
libpackagelistparser Remove LOCAL_CLANG and clang: true 2017-07-25 14:29:50 +02:00
libpixelflinger Va_end should be used with va_start 2017-03-23 22:41:42 +01:00
libprocessgroup Add memcg related configs to init. 2017-07-18 15:58:40 -07:00
libprocinfo libprocinfo: add support for parsing process state. 2017-06-27 15:06:27 -07:00
libsparse Merge "libsparse: Fix odd-sized input files total_blks" am: 652ce94f40 am: ab74c778df 2017-04-19 19:26:27 +00:00
libsuspend Mark libsuspend vendor_available. 2017-05-31 01:51:00 +00:00
libsync Merge "Remove LOCAL_CLANG and clang: true" 2017-07-25 22:28:56 +00:00
libsystem Add NATIVE_WINDOW_CONSUMER_IS_PROTECTED enum 2017-05-01 16:41:26 -07:00
libsysutils Remove old LOG_EVENT_* code from libsysutils 2017-07-11 15:14:26 -07:00
libunwindstack Fix another set of bugs. 2017-08-10 17:37:32 -07:00
libusbhost Merge "Convert libusbhost to Android.bp" am: a58c4b5bcd am: dff208c80c 2017-04-20 17:24:57 +00:00
libutils Merge "Remove TODOs for std::string removal." 2017-08-02 20:49:46 +00:00
libvndksupport Merge "libvndksupport: Do not lookup default namespace for sphal failure" into oc-dev 2017-05-31 07:01:41 +00:00
libziparchive libziparchive: Use ReadAtOffset exclusively 2017-07-25 18:12:12 +00:00
lmkd lmkd: Android.mk -> Android.bp 2017-04-28 15:20:18 -07:00
logcat Don't try to strip a shell script 2017-08-09 20:20:48 -07:00
logd Merge "Decrease size of LogBufferElements to 32 bytes." 2017-08-15 17:00:02 +00:00
logwrapper Merge "logwrapper: add a benchmark for android_fork_execvp_ext" 2017-03-23 11:56:10 +00:00
mkbootimg mkbootimg: use int for os_version and os_patch_level 2016-03-29 16:06:37 -07:00
reboot Convert more Android.mk files to Android.bp 2016-07-13 17:41:45 -07:00
rootdir Merge "Include asan options from data partition." 2017-08-10 01:11:22 +00:00
run-as Define range of GIDs for cached app data. 2016-12-13 13:28:08 -07:00
sdcard Merge "Remove LOCAL_CLANG and clang: true" 2017-07-25 22:28:56 +00:00
shell_and_utilities Remove reference to deleted gzip module 2017-07-06 22:33:22 +00:00
storaged storaged: stop binder threads before exiting 2017-04-04 19:44:01 +00:00
toolbox Merge "Add building and installing of grep for vendor." 2017-06-16 23:24:32 +00:00
trusty Merge "Pass in message_version_ received from the secure side." 2017-08-15 23:35:48 +00:00
.clang-format Add a 2 width option of clang format. 2017-03-10 13:01:39 -08:00
.clang-format-2 Only allow short functions in class definitions. 2017-03-28 12:31:37 -07:00
.clang-format-4 Only allow short functions in class definitions. 2017-03-28 12:31:37 -07:00
.gitignore
Android.bp Export android_filesystem_config.h as a filegroup 2017-01-17 18:20:28 -08:00
Android.mk
CleanSpec.mk init.rc: have hwservicemanager start the HAL class 2016-09-26 00:23:51 -07:00
MODULE_LICENSE_APACHE2
NOTICE
platform_tools_tool_version.mk Fix warning on the build servers 2017-05-25 12:35:40 -07:00
PREUPLOAD.cfg Add a PREUPLOAD.cfg file to run git-clang-format on every commit 2017-03-08 16:51:26 +08:00