OSDN Git Service

Revert "Add more logging for dup(fd) failure"
authorJesse Hall <jessehall@google.com>
Tue, 4 Nov 2014 16:36:31 +0000 (08:36 -0800)
committerJesse Hall <jessehall@google.com>
Tue, 4 Nov 2014 16:48:16 +0000 (08:48 -0800)
Underlying bug has been fixed, extra debug code no longer needed

This reverts commit 36273c991b189c5516819f4d5e3f83061c320593.

Change-Id: Ia47f1ae9ee7338329bfb8d710aff57e15e944f20

libs/binder/Parcel.cpp

index 61bdbc6..09238c2 100644 (file)
@@ -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));
         }
     }