mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
Generated code for 'du' command.
This commit is contained in:
@@ -119,7 +119,8 @@ module Guestfs (
|
||||
scrub_freespace,
|
||||
wc_l,
|
||||
wc_w,
|
||||
wc_c
|
||||
wc_c,
|
||||
du
|
||||
) where
|
||||
import Foreign
|
||||
import Foreign.C
|
||||
@@ -1322,3 +1323,15 @@ wc_c h path = do
|
||||
fail err
|
||||
else return (fromIntegral r)
|
||||
|
||||
foreign import ccall unsafe "guestfs_du" c_du
|
||||
:: GuestfsP -> CString -> IO (Int64)
|
||||
|
||||
du :: GuestfsH -> String -> IO (Integer)
|
||||
du h path = do
|
||||
r <- withCString path $ \path -> withForeignPtr h (\p -> c_du p path)
|
||||
if (r == -1)
|
||||
then do
|
||||
err <- last_error h
|
||||
fail err
|
||||
else return (fromIntegral r)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user