提交 02eba688 编写于 作者: A alanb

6815768: File.getxxxSpace() methods fail for very large file systems under 32bit Java

Reviewed-by: ohair
上级 2027ec53
......@@ -414,9 +414,9 @@ Java_java_io_UnixFileSystem_getSpace(JNIEnv *env, jobject this,
jlong rv = 0L;
WITH_FIELD_PLATFORM_STRING(env, file, ids.path, path) {
struct statvfs fsstat;
memset(&fsstat, 0, sizeof(struct statvfs));
if (statvfs(path, &fsstat) == 0) {
struct statvfs64 fsstat;
memset(&fsstat, 0, sizeof(fsstat));
if (statvfs64(path, &fsstat) == 0) {
switch(t) {
case java_io_FileSystem_SPACE_TOTAL:
rv = jlong_mul(long_to_jlong(fsstat.f_frsize),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册