Add 'append', LIBGUESTFS_APPEND to set additional kernel options.
[libguestfs.git] / haskell / Guestfs.hs
index aedf3b5..4721376 100644 (file)
@@ -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)