back to using getmntinfo64 instead of getfsstat64 on mac

db4
Doug Coleman 2008-12-02 23:10:27 -06:00
parent 7527a3d62d
commit 8edcf841f1
2 changed files with 5 additions and 4 deletions

View File

@ -10,10 +10,10 @@ TUPLE: macosx-file-system-info < unix-file-system-info
io-size owner type-id filesystem-subtype ;
M: macosx file-systems ( -- array )
f 0 0 getfsstat64 dup io-error
"statfs" <c-array> dup dup length 0 getfsstat64 io-error
"statfs" heap-size group
[ statfs64-f_mntonname alien>native-string file-system-info ] map ;
f <void*> dup 0 getmntinfo64 dup io-error
[ *void* ] dip
"statfs64" heap-size [ * memory>byte-array ] keep group
[ [ new-file-system-info ] dip statfs>file-system-info ] map ;
M: macosx new-file-system-info macosx-file-system-info new ;

View File

@ -115,3 +115,4 @@ C-STRUCT: statfs64
{ { "uint32_t" 8 } "f_reserved" } ;
FUNCTION: int statfs64 ( char* path, statfs64* buf ) ;
FUNCTION: int getmntinfo64 ( statfs64** mntbufp, int flags ) ;