[vmkit-commits] [vmkit] r144195 - /vmkit/trunk/lib/J3/ClassLib/OpenJDK/OpenJDK.inc
Will Dietz
wdietz2 at illinois.edu
Wed Nov 9 10:23:53 PST 2011
Author: wdietz2
Date: Wed Nov 9 12:23:52 2011
New Revision: 144195
URL: http://llvm.org/viewvc/llvm-project?rev=144195&view=rev
Log:
Implement JVM_SetLength
Modified:
vmkit/trunk/lib/J3/ClassLib/OpenJDK/OpenJDK.inc
Modified: vmkit/trunk/lib/J3/ClassLib/OpenJDK/OpenJDK.inc
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/ClassLib/OpenJDK/OpenJDK.inc?rev=144195&r1=144194&r2=144195&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/ClassLib/OpenJDK/OpenJDK.inc (original)
+++ vmkit/trunk/lib/J3/ClassLib/OpenJDK/OpenJDK.inc Wed Nov 9 12:23:52 2011
@@ -2360,14 +2360,13 @@
/*
* Set the length of the file associated with the given descriptor to the given
* length. If the new length is longer than the current length then the file
- * is extended; the contents of the extended portion are not defined. Th {
-NYI();
-}
+ * is extended; the contents of the extended portion are not defined. The
* value of the file pointer is undefined after this procedure returns.
*/
JNIEXPORT jint JNICALL
JVM_SetLength(jint fd, jlong length) {
- NYI();
+ int res = ftruncate64(fd, length);
+ return res != -1;
}
/*
More information about the vmkit-commits
mailing list