summaryrefslogtreecommitdiffstats
path: root/haskell
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2009-06-29 10:09:13 +0100
committerRichard W.M. Jones <rjones@redhat.com>2009-06-29 10:09:13 +0100
commitf450ce75b754fb869b34433c0126f7bb592b141b (patch)
treed5871faf1cc109629f7df0b59e1eb1403199ccf4 /haskell
parent62ccc07e744d5ebfb45d9344827d36f9f61699f4 (diff)
downloadlibguestfs-f450ce75b754fb869b34433c0126f7bb592b141b.tar.gz
libguestfs-f450ce75b754fb869b34433c0126f7bb592b141b.tar.xz
libguestfs-f450ce75b754fb869b34433c0126f7bb592b141b.zip
Generated code for 'wc_*' commands.
Diffstat (limited to 'haskell')
-rw-r--r--haskell/Guestfs.hs41
1 files changed, 40 insertions, 1 deletions
diff --git a/haskell/Guestfs.hs b/haskell/Guestfs.hs
index 94152d25..8101b526 100644
--- a/haskell/Guestfs.hs
+++ b/haskell/Guestfs.hs
@@ -116,7 +116,10 @@ module Guestfs (
ntfs_3g_probe,
scrub_device,
scrub_file,
- scrub_freespace
+ scrub_freespace,
+ wc_l,
+ wc_w,
+ wc_c
) where
import Foreign
import Foreign.C
@@ -1283,3 +1286,39 @@ scrub_freespace h dir = do
fail err
else return ()
+foreign import ccall unsafe "guestfs_wc_l" c_wc_l
+ :: GuestfsP -> CString -> IO (CInt)
+
+wc_l :: GuestfsH -> String -> IO (Int)
+wc_l h path = do
+ r <- withCString path $ \path -> withForeignPtr h (\p -> c_wc_l p path)
+ if (r == -1)
+ then do
+ err <- last_error h
+ fail err
+ else return (fromIntegral r)
+
+foreign import ccall unsafe "guestfs_wc_w" c_wc_w
+ :: GuestfsP -> CString -> IO (CInt)
+
+wc_w :: GuestfsH -> String -> IO (Int)
+wc_w h path = do
+ r <- withCString path $ \path -> withForeignPtr h (\p -> c_wc_w p path)
+ if (r == -1)
+ then do
+ err <- last_error h
+ fail err
+ else return (fromIntegral r)
+
+foreign import ccall unsafe "guestfs_wc_c" c_wc_c
+ :: GuestfsP -> CString -> IO (CInt)
+
+wc_c :: GuestfsH -> String -> IO (Int)
+wc_c h path = do
+ r <- withCString path $ \path -> withForeignPtr h (\p -> c_wc_c p path)
+ if (r == -1)
+ then do
+ err <- last_error h
+ fail err
+ else return (fromIntegral r)
+