-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
Hi,
I just implemented the statfs following the documentation in the Internet, and everything seems to be set fine, except that wrong values are returned to the caller for some of the fields. Trying to find the root cause, I printed the StructStatvfs, and it looks like this:
StructStatvfs$NotFreeBSD$ByReference(native@0x11fff5d10) (64 bytes) {
NativeLong f_bsize@0=0
NativeLong f_frsize@8=0
TypeBlkCnt f_blocks@10=0
TypeBlkCnt f_bfree@18=0
TypeBlkCnt f_bavail@20=0
TypeFsFilCnt f_files@28=0
TypeFsFilCnt f_ffree@30=0
TypeFsFilCnt f_favail@38=0
}
memory dump
[00000000]
[00000000]
[00000000]
[00000000]
[00000000]
[00000000]
[00000000]
[00000000]
[00000000]
[00000000]
[00000000]
[00000000]
[00000000]
[00000000]
[00000000]
[00000000]
If you look carefully at the addresses in f_frsize, f_bfree and f_files, even when their types should be 8, seems like only 2 bytes are used to store them natively (it's just an assumption, I don't know much of JNA), which would explain why I'm getting wrong values for those fields. Could it be a JNA issue?
Btw, I'm using a Mac and OSX Fuse for testing.
Thanks,
Alfonso
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels