diff options
author | Elliott Hughes <enh@google.com> | 2011-03-18 14:13:08 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2011-03-18 14:13:08 -0700 |
commit | f5333fd2094bdac4d6506177b1964b79afa64d77 (patch) | |
tree | 7b602466867949269e751d3e2650b2bec356b71f /dalvik | |
parent | cdf58e136192aae3130feb502a6cdf26668f17fe (diff) | |
download | libcore-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.java | 5 |
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 |