diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2009-05-13 17:51:14 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2009-05-13 17:51:14 +0100 |
commit | e8ecc08f663b44f3d79517affe52f137858dfe00 (patch) | |
tree | 0bee77cb454884699d671f5b1ef264ba4fde5f9e /haskell | |
parent | 5b17af107f75a0d6f3a39b88b9c18714014eb7af (diff) | |
download | libguestfs-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.hs | 13 |
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) |