From 89e9fa8b6bdd1c994a0e64a2bd7534aff1039354 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Wed, 22 Oct 2008 19:56:46 -0500 Subject: [PATCH] mounted* -> mounted --- basis/unix/statfs/macosx/macosx.factor | 5 +++-- basis/unix/statfs/statfs.factor | 10 +--------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/basis/unix/statfs/macosx/macosx.factor b/basis/unix/statfs/macosx/macosx.factor index 4bd9f55132..675e65a2d8 100644 --- a/basis/unix/statfs/macosx/macosx.factor +++ b/basis/unix/statfs/macosx/macosx.factor @@ -123,10 +123,11 @@ block-size io-size blocks blocks-free blocks-available files files-free file-system-id owner type flags filesystem-subtype file-system-type-name mount-from ; -M: macosx mounted* ( -- array ) +M: macosx mounted ( -- array ) f dup 0 getmntinfo64 dup io-error [ *void* ] dip - "statfs64" heap-size [ * memory>byte-array ] keep group ; + "statfs64" heap-size [ * memory>byte-array ] keep group + [ >file-system-info ] map ; M: macosx >file-system-info ( byte-array -- file-system-info ) [ \ macosx-file-system-info new ] dip diff --git a/basis/unix/statfs/statfs.factor b/basis/unix/statfs/statfs.factor index cfa0c159d1..20010370ae 100644 --- a/basis/unix/statfs/statfs.factor +++ b/basis/unix/statfs/statfs.factor @@ -9,19 +9,11 @@ blocks-available files files-free file-system-id owner type flags filesystem-subtype file-system-type-name mount-on mount-from ; -HOOK: mounted* os ( -- array ) -HOOK: >mounted os ( byte-array -- mounted ) - TUPLE: file-system-info root-directory total-free-size total-size ; HOOK: >file-system-info os ( struct -- statfs ) -: mounted ( -- array ) mounted* [ >file-system-info ] map ; - -: mounted-drive ( path -- mounted/f ) - mounted - [ [ mount-on>> ] bi@ <=> ] sort - [ mount-on>> head? ] with find nip ; +HOOK: mounted os ( -- array ) os { { linux [ "unix.statfs.linux" require ] }