diff options
author | Jesse Hall <jessehall@google.com> | 2014-11-04 17:35:23 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-11-04 17:35:23 +0000 |
commit | 06ce1094706bb0856f6cc876e1f5276adc642446 (patch) | |
tree | a225c62fcae99b08db060daf24f673cb6a3759d8 /libs/binder | |
parent | 88361aaaf4f2339f50dc32438a261283c642d471 (diff) | |
parent | fee99040de000a64f6036a7db172fb7c68d9764a (diff) | |
download | frameworks_native-06ce1094706bb0856f6cc876e1f5276adc642446.zip frameworks_native-06ce1094706bb0856f6cc876e1f5276adc642446.tar.gz frameworks_native-06ce1094706bb0856f6cc876e1f5276adc642446.tar.bz2 |
am fee99040: Revert "Add more logging for dup(fd) failure"
* commit 'fee99040de000a64f6036a7db172fb7c68d9764a':
Revert "Add more logging for dup(fd) failure"
Diffstat (limited to 'libs/binder')
-rw-r--r-- | libs/binder/Parcel.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index 61bdbc6..09238c2 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -36,7 +36,6 @@ #include <private/binder/binder_module.h> -#include <fcntl.h> #include <inttypes.h> #include <stdio.h> #include <stdlib.h> @@ -1281,22 +1280,11 @@ status_t Parcel::read(FlattenableHelperInterface& val) const status_t err = NO_ERROR; for (size_t i=0 ; i<fd_count && err==NO_ERROR ; i++) { - int oldfd = this->readFileDescriptor(); - fds[i] = dup(oldfd); + fds[i] = dup(this->readFileDescriptor()); if (fds[i] < 0) { - int dupErrno = errno; err = BAD_VALUE; - int flags = fcntl(oldfd, F_GETFD); - int fcntlErrno = errno; - const flat_binder_object* flat = readObject(true); - ALOGE("dup failed in Parcel::read, fd %zu of %zu\n" - " dup(%d) = %d [errno: %d (%s)]\n" - " fcntl(%d, F_GETFD) = %d [errno: %d (%s)]\n" - " flat %p type %d", - i, fd_count, - oldfd, fds[i], dupErrno, strerror(dupErrno), - oldfd, flags, fcntlErrno, strerror(fcntlErrno), - flat, flat ? flat->type : 0); + ALOGE("dup() failed in Parcel::read, i is %zu, fds[i] is %d, fd_count is %zu, error: %s", + i, fds[i], fd_count, strerror(errno)); } } |