libbinder: RpcState stop narrowing errors
We want better errors (luckily DEAD_OBJECT is -EPIPE. The way libbinder
uses status_t is very compatible with the errnos returned from the
system calls we're using). Whether this is a good design remains to be
seen.
Bug: N/A
Test: binderRpcTest
Change-Id: Ice446ec48307d697334538687676f806c08289a1
diff --git a/libs/binder/RpcState.h b/libs/binder/RpcState.h
index 78e8997..8a0610e 100644
--- a/libs/binder/RpcState.h
+++ b/libs/binder/RpcState.h
@@ -119,10 +119,10 @@
size_t mSize;
};
- [[nodiscard]] bool rpcSend(const base::unique_fd& fd, const char* what, const void* data,
- size_t size);
- [[nodiscard]] bool rpcRec(const base::unique_fd& fd, const sp<RpcSession>& session,
- const char* what, void* data, size_t size);
+ [[nodiscard]] status_t rpcSend(const base::unique_fd& fd, const char* what, const void* data,
+ size_t size);
+ [[nodiscard]] status_t rpcRec(const base::unique_fd& fd, const sp<RpcSession>& session,
+ const char* what, void* data, size_t size);
[[nodiscard]] status_t waitForReply(const base::unique_fd& fd, const sp<RpcSession>& session,
Parcel* reply);