summaryrefslogtreecommitdiffstats
path: root/libs/binder
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-11-21 18:43:51 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2013-11-21 18:43:51 -0800
commit0d103b596dd9883898a062beaacf980d4439b835 (patch)
tree51a5aed45a2189447ca8b0f19cef1993beea0d8e /libs/binder
parent1ee45c2d2d816ee912624d81ff1b0aaa98e8fa74 (diff)
parentf2f74ca65f34ae0cae6f0cca40f1c18aa771739d (diff)
downloadframeworks_native-0d103b596dd9883898a062beaacf980d4439b835.zip
frameworks_native-0d103b596dd9883898a062beaacf980d4439b835.tar.gz
frameworks_native-0d103b596dd9883898a062beaacf980d4439b835.tar.bz2
am f2f74ca6: Merge "Remove references to obsolete pmem functionality."
* commit 'f2f74ca65f34ae0cae6f0cca40f1c18aa771739d': Remove references to obsolete pmem functionality.
Diffstat (limited to 'libs/binder')
-rw-r--r--libs/binder/MemoryHeapBase.cpp20
1 files changed, 3 insertions, 17 deletions
diff --git a/libs/binder/MemoryHeapBase.cpp b/libs/binder/MemoryHeapBase.cpp
index d1cbf1c..43a01e4 100644
--- a/libs/binder/MemoryHeapBase.cpp
+++ b/libs/binder/MemoryHeapBase.cpp
@@ -31,11 +31,6 @@
#include <binder/MemoryHeapBase.h>
-#ifdef HAVE_ANDROID_OS
-#include <linux/android_pmem.h>
-#endif
-
-
namespace android {
// ---------------------------------------------------------------------------
@@ -108,18 +103,9 @@ status_t MemoryHeapBase::mapfd(int fd, size_t size, uint32_t offset)
{
if (size == 0) {
// try to figure out the size automatically
-#ifdef HAVE_ANDROID_OS
- // first try the PMEM ioctl
- pmem_region reg;
- int err = ioctl(fd, PMEM_GET_TOTAL_SIZE, &reg);
- if (err == 0)
- size = reg.len;
-#endif
- if (size == 0) { // try fstat
- struct stat sb;
- if (fstat(fd, &sb) == 0)
- size = sb.st_size;
- }
+ struct stat sb;
+ if (fstat(fd, &sb) == 0)
+ size = sb.st_size;
// if it didn't work, let mmap() fail.
}