summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-11-21 12:22:39 -0800
committerElliott Hughes <enh@google.com>2013-11-21 12:22:39 -0800
commita5a13a3ecf72554120ce5e856d514b72b70f5cf1 (patch)
treece30c9c4d7f9dc37baf73f6f072a870d51bdd5ad
parent51b27e823373f1cfc709f20d0d704a7d4e558894 (diff)
downloadnative-a5a13a3ecf72554120ce5e856d514b72b70f5cf1.tar.gz
Remove references to obsolete pmem functionality.
Change-Id: I5d3befd075e51614e6801115388a0a9f32fbb6ea
-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 d1cbf1cbae..43a01e472c 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.
}