diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2009-06-30 11:17:06 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2009-06-30 13:10:44 +0100 |
commit | f68b3ac861ae607a333211c775dded82ae2b2c4a (patch) | |
tree | 03dfee58ccfd723bcbc9dc6c6d7270629ae4489d /haskell | |
parent | 3d15f7e652340777514ff30c3cfc560a90b612ec (diff) | |
download | libguestfs-f68b3ac861ae607a333211c775dded82ae2b2c4a.tar.gz libguestfs-f68b3ac861ae607a333211c775dded82ae2b2c4a.tar.xz libguestfs-f68b3ac861ae607a333211c775dded82ae2b2c4a.zip |
Generated code for 'set_memsize'/'get_memsize' calls.
Diffstat (limited to 'haskell')
-rw-r--r-- | haskell/Guestfs.hs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/haskell/Guestfs.hs b/haskell/Guestfs.hs index adf416f1..3148450d 100644 --- a/haskell/Guestfs.hs +++ b/haskell/Guestfs.hs @@ -45,6 +45,8 @@ module Guestfs ( set_busy, set_ready, end_busy, + set_memsize, + get_memsize, mount, sync, touch, @@ -427,6 +429,30 @@ end_busy h = do fail err else return () +foreign import ccall unsafe "guestfs_set_memsize" c_set_memsize + :: GuestfsP -> CInt -> IO (CInt) + +set_memsize :: GuestfsH -> Int -> IO () +set_memsize h memsize = do + r <- withForeignPtr h (\p -> c_set_memsize p (fromIntegral memsize)) + if (r == -1) + then do + err <- last_error h + fail err + else return () + +foreign import ccall unsafe "guestfs_get_memsize" c_get_memsize + :: GuestfsP -> IO (CInt) + +get_memsize :: GuestfsH -> IO (Int) +get_memsize h = do + r <- withForeignPtr h (\p -> c_get_memsize p) + if (r == -1) + then do + err <- last_error h + fail err + else return (fromIntegral r) + foreign import ccall unsafe "guestfs_mount" c_mount :: GuestfsP -> CString -> CString -> IO (CInt) |