summaryrefslogtreecommitdiffstats
path: root/haskell
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2009-06-29 16:05:22 +0100
committerRichard W.M. Jones <rjones@redhat.com>2009-06-29 16:05:22 +0100
commit5d6b6a3fbbfea19c606b984bac9cf64b6b81cafe (patch)
treeb1d34b141b935fc6acc46930acd0496dfcc0df8b /haskell
parenta548d51b703f5385797594a37287f4532af289a2 (diff)
downloadlibguestfs-5d6b6a3fbbfea19c606b984bac9cf64b6b81cafe.tar.gz
libguestfs-5d6b6a3fbbfea19c606b984bac9cf64b6b81cafe.tar.xz
libguestfs-5d6b6a3fbbfea19c606b984bac9cf64b6b81cafe.zip
Generated code for mount-loop command.
Diffstat (limited to 'haskell')
-rw-r--r--haskell/Guestfs.hs15
1 files changed, 14 insertions, 1 deletions
diff --git a/haskell/Guestfs.hs b/haskell/Guestfs.hs
index 9eefda11..32e7aedd 100644
--- a/haskell/Guestfs.hs
+++ b/haskell/Guestfs.hs
@@ -120,7 +120,8 @@ module Guestfs (
wc_l,
wc_w,
wc_c,
- du
+ du,
+ mount_loop
) where
import Foreign
import Foreign.C
@@ -1335,3 +1336,15 @@ du h path = do
fail err
else return (fromIntegral r)
+foreign import ccall unsafe "guestfs_mount_loop" c_mount_loop
+ :: GuestfsP -> CString -> CString -> IO (CInt)
+
+mount_loop :: GuestfsH -> String -> String -> IO ()
+mount_loop h file mountpoint = do
+ r <- withCString file $ \file -> withCString mountpoint $ \mountpoint -> withForeignPtr h (\p -> c_mount_loop p file mountpoint)
+ if (r == -1)
+ then do
+ err <- last_error h
+ fail err
+ else return ()
+