mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 03:54:33 +02:00
6815768: File.getxxxSpace() methods fail for very large file systems under 32bit Java
Reviewed-by: ohair
This commit is contained in:
parent
32d811b1f7
commit
ab0eb81f5b
1 changed files with 3 additions and 3 deletions
|
@ -414,9 +414,9 @@ Java_java_io_UnixFileSystem_getSpace(JNIEnv *env, jobject this,
|
||||||
jlong rv = 0L;
|
jlong rv = 0L;
|
||||||
|
|
||||||
WITH_FIELD_PLATFORM_STRING(env, file, ids.path, path) {
|
WITH_FIELD_PLATFORM_STRING(env, file, ids.path, path) {
|
||||||
struct statvfs fsstat;
|
struct statvfs64 fsstat;
|
||||||
memset(&fsstat, 0, sizeof(struct statvfs));
|
memset(&fsstat, 0, sizeof(fsstat));
|
||||||
if (statvfs(path, &fsstat) == 0) {
|
if (statvfs64(path, &fsstat) == 0) {
|
||||||
switch(t) {
|
switch(t) {
|
||||||
case java_io_FileSystem_SPACE_TOTAL:
|
case java_io_FileSystem_SPACE_TOTAL:
|
||||||
rv = jlong_mul(long_to_jlong(fsstat.f_frsize),
|
rv = jlong_mul(long_to_jlong(fsstat.f_frsize),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue