back to using getmntinfo64 instead of getfsstat64 on mac
parent
7527a3d62d
commit
8edcf841f1
|
@ -10,10 +10,10 @@ TUPLE: macosx-file-system-info < unix-file-system-info
|
||||||
io-size owner type-id filesystem-subtype ;
|
io-size owner type-id filesystem-subtype ;
|
||||||
|
|
||||||
M: macosx file-systems ( -- array )
|
M: macosx file-systems ( -- array )
|
||||||
f 0 0 getfsstat64 dup io-error
|
f <void*> dup 0 getmntinfo64 dup io-error
|
||||||
"statfs" <c-array> dup dup length 0 getfsstat64 io-error
|
[ *void* ] dip
|
||||||
"statfs" heap-size group
|
"statfs64" heap-size [ * memory>byte-array ] keep group
|
||||||
[ statfs64-f_mntonname alien>native-string file-system-info ] map ;
|
[ [ new-file-system-info ] dip statfs>file-system-info ] map ;
|
||||||
|
|
||||||
M: macosx new-file-system-info macosx-file-system-info new ;
|
M: macosx new-file-system-info macosx-file-system-info new ;
|
||||||
|
|
||||||
|
|
|
@ -115,3 +115,4 @@ C-STRUCT: statfs64
|
||||||
{ { "uint32_t" 8 } "f_reserved" } ;
|
{ { "uint32_t" 8 } "f_reserved" } ;
|
||||||
|
|
||||||
FUNCTION: int statfs64 ( char* path, statfs64* buf ) ;
|
FUNCTION: int statfs64 ( char* path, statfs64* buf ) ;
|
||||||
|
FUNCTION: int getmntinfo64 ( statfs64** mntbufp, int flags ) ;
|
||||||
|
|
Loading…
Reference in New Issue