summaryrefslogtreecommitdiffstats
path: root/haskell
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2009-05-13 17:51:14 +0100
committerRichard W.M. Jones <rjones@redhat.com>2009-05-13 17:51:14 +0100
commite8ecc08f663b44f3d79517affe52f137858dfe00 (patch)
tree0bee77cb454884699d671f5b1ef264ba4fde5f9e /haskell
parent5b17af107f75a0d6f3a39b88b9c18714014eb7af (diff)
downloadlibguestfs-e8ecc08f663b44f3d79517affe52f137858dfe00.tar.gz
libguestfs-e8ecc08f663b44f3d79517affe52f137858dfe00.tar.xz
libguestfs-e8ecc08f663b44f3d79517affe52f137858dfe00.zip
Add 'append', LIBGUESTFS_APPEND to set additional kernel options.
Diffstat (limited to 'haskell')
-rw-r--r--haskell/Guestfs.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/haskell/Guestfs.hs b/haskell/Guestfs.hs
index aedf3b53..47213768 100644
--- a/haskell/Guestfs.hs
+++ b/haskell/Guestfs.hs
@@ -32,6 +32,7 @@ module Guestfs (
config,
set_qemu,
set_path,
+ set_append,
set_busy,
set_ready,
end_busy,
@@ -223,6 +224,18 @@ set_path h path = do
fail err
else return ()
+foreign import ccall unsafe "guestfs_set_append" c_set_append
+ :: GuestfsP -> CString -> IO (CInt)
+
+set_append :: GuestfsH -> String -> IO ()
+set_append h append = do
+ r <- withCString append $ \append -> withForeignPtr h (\p -> c_set_append p append)
+ if (r == -1)
+ then do
+ err <- last_error h
+ fail err
+ else return ()
+
foreign import ccall unsafe "guestfs_set_busy" c_set_busy
:: GuestfsP -> IO (CInt)