summaryrefslogtreecommitdiff
path: root/libs/binder/Parcel.cpp
diff options
context:
space:
mode:
author Tomasz Wasilczyk <twasilczyk@google.com> 2023-10-06 20:28:49 +0000
committer Tomasz Wasilczyk <twasilczyk@google.com> 2023-10-16 18:38:10 +0000
commit0d9dec207e5c9b208ff841a4f73a91046c92ed25 (patch)
tree16e0c9a48c02e39d91ea6c1d34031b696e692339 /libs/binder/Parcel.cpp
parent74a858c03904bb7bd096bf9f2dc330e6bae8c814 (diff)
Binder: Split OS to Android and Unix part, abstract GetThreadId out
Bug: 302723053 Test: mma in binder folder Test: aosp/2616196 Change-Id: I73df8fc453df0edf496960853cb0004f1c3a6a43
Diffstat (limited to 'libs/binder/Parcel.cpp')
-rw-r--r--libs/binder/Parcel.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index d92de1b151..16944a6221 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -621,7 +621,7 @@ status_t Parcel::appendFrom(const Parcel* parcel, size_t offset, size_t len) {
// To match kernel binder behavior, we always dup, even if the
// FD was unowned in the source parcel.
int newFd = -1;
- if (status_t status = dupFileDescriptor(oldFd, &newFd); status != OK) {
+ if (status_t status = binder::os::dupFileDescriptor(oldFd, &newFd); status != OK) {
ALOGW("Failed to duplicate file descriptor %d: %s", oldFd, strerror(-status));
}
rpcFields->mFds->emplace_back(base::unique_fd(newFd));
@@ -1513,7 +1513,7 @@ status_t Parcel::writeFileDescriptor(int fd, bool takeOwnership) {
status_t Parcel::writeDupFileDescriptor(int fd)
{
int dupFd;
- if (status_t err = dupFileDescriptor(fd, &dupFd); err != OK) {
+ if (status_t err = binder::os::dupFileDescriptor(fd, &dupFd); err != OK) {
return err;
}
status_t err = writeFileDescriptor(dupFd, true /*takeOwnership*/);
@@ -1532,7 +1532,7 @@ status_t Parcel::writeParcelFileDescriptor(int fd, bool takeOwnership)
status_t Parcel::writeDupParcelFileDescriptor(int fd)
{
int dupFd;
- if (status_t err = dupFileDescriptor(fd, &dupFd); err != OK) {
+ if (status_t err = binder::os::dupFileDescriptor(fd, &dupFd); err != OK) {
return err;
}
status_t err = writeParcelFileDescriptor(dupFd, true /*takeOwnership*/);
@@ -2345,7 +2345,7 @@ status_t Parcel::readUniqueFileDescriptor(base::unique_fd* val) const
}
int dupFd;
- if (status_t err = dupFileDescriptor(got, &dupFd); err != OK) {
+ if (status_t err = binder::os::dupFileDescriptor(got, &dupFd); err != OK) {
return BAD_VALUE;
}
@@ -2367,7 +2367,7 @@ status_t Parcel::readUniqueParcelFileDescriptor(base::unique_fd* val) const
}
int dupFd;
- if (status_t err = dupFileDescriptor(got, &dupFd); err != OK) {
+ if (status_t err = binder::os::dupFileDescriptor(got, &dupFd); err != OK) {
return BAD_VALUE;
}