Go to 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
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
debuggerd Merge "crash_dump: print the identity of tracers." 2017-08-19 01:20:24 +00:00
demangle
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
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
libcrypto_utils
libcutils Merge "Add HSM AID." 2017-08-10 21:35:47 +00:00
libdiskconfig
libgrallocusage
libion Remove LOCAL_CLANG and clang: true 2017-07-25 14:29:50 +02:00
libkeyutils
liblog Merge "Fix clang-tidy performance warnings in system/core." 2017-08-04 21:14:30 +00:00
libmemtrack
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
libpackagelistparser Remove LOCAL_CLANG and clang: true 2017-07-25 14:29:50 +02:00
libpixelflinger
libprocessgroup
libprocinfo
libsparse
libsuspend
libsync Merge "Remove LOCAL_CLANG and clang: true" 2017-07-25 22:28:56 +00:00
libsystem
libsysutils
libunwindstack Fix another set of bugs. 2017-08-10 17:37:32 -07:00
libusbhost
libutils Merge "Remove TODOs for std::string removal." 2017-08-02 20:49:46 +00:00
libvndksupport
libziparchive libziparchive: Use ReadAtOffset exclusively 2017-07-25 18:12:12 +00:00
lmkd
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
mkbootimg
reboot
rootdir Merge "Include asan options from data partition." 2017-08-10 01:11:22 +00:00
run-as
sdcard Merge "Remove LOCAL_CLANG and clang: true" 2017-07-25 22:28:56 +00:00
shell_and_utilities
storaged
toolbox
trusty Merge "Pass in message_version_ received from the secure side." 2017-08-15 23:35:48 +00:00
.clang-format
.clang-format-2
.clang-format-4
.gitignore
Android.bp
Android.mk
CleanSpec.mk
MODULE_LICENSE_APACHE2
NOTICE
PREUPLOAD.cfg
platform_tools_tool_version.mk