summaryrefslogtreecommitdiffstats
path: root/dalvik
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2011-03-18 14:13:08 -0700
committerElliott Hughes <enh@google.com>2011-03-18 14:13:08 -0700
commitf5333fd2094bdac4d6506177b1964b79afa64d77 (patch)
tree7b602466867949269e751d3e2650b2bec356b71f /dalvik
parentcdf58e136192aae3130feb502a6cdf26668f17fe (diff)
downloadlibcore-f5333fd2094bdac4d6506177b1964b79afa64d77.zip
libcore-f5333fd2094bdac4d6506177b1964b79afa64d77.tar.gz
libcore-f5333fd2094bdac4d6506177b1964b79afa64d77.tar.bz2
Add ftruncate(2).
The claim that "the port library" modifies the file offset appears to only ever have been true of Harmony's Win32 implementation. Certainly, this is not the behavior of ftruncate(2), so we can lose the cruft. Bug: 3107501 Change-Id: I35092fd986296b78c4847c7215765f9997339f37
Diffstat (limited to 'dalvik')
-rw-r--r--dalvik/src/main/java/dalvik/system/BlockGuard.java5
1 files changed, 0 insertions, 5 deletions
diff --git a/dalvik/src/main/java/dalvik/system/BlockGuard.java b/dalvik/src/main/java/dalvik/system/BlockGuard.java
index 65cb301..cd44ad2 100644
--- a/dalvik/src/main/java/dalvik/system/BlockGuard.java
+++ b/dalvik/src/main/java/dalvik/system/BlockGuard.java
@@ -215,11 +215,6 @@ public final class BlockGuard {
return mFileSystem.seek(fileDescriptor, offset, whence);
}
- public void truncate(int fileDescriptor, long size) throws IOException {
- BlockGuard.getThreadPolicy().onWriteToDisk();
- mFileSystem.truncate(fileDescriptor, size);
- }
-
public int open(String path, int mode) throws FileNotFoundException {
BlockGuard.getThreadPolicy().onReadFromDisk();
if (mode != 0) { // 0 is read-only