X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=haskell%2FGuestfs.hs;h=170f0403736fbac97be057663d54b17129650696;hp=c061a7a65dddf33af14f8b9212941f075d0ed877;hb=5cd39c83e23eb300d1bdfa806902a31b409ff420;hpb=b8e5f51c79f539a740827506cc9da3ffcb6c87f8 diff --git a/haskell/Guestfs.hs b/haskell/Guestfs.hs index c061a7a..170f040 100644 --- a/haskell/Guestfs.hs +++ b/haskell/Guestfs.hs @@ -79,7 +79,8 @@ module Guestfs ( cp_a, mv, ping_daemon, - zerofree + zerofree, + pvresize ) where import Foreign import Foreign.C @@ -801,3 +802,15 @@ zerofree h device = do fail err else return () +foreign import ccall unsafe "guestfs_pvresize" c_pvresize + :: GuestfsP -> CString -> IO (CInt) + +pvresize :: GuestfsH -> String -> IO () +pvresize h device = do + r <- withCString device $ \device -> withForeignPtr h (\p -> c_pvresize p device) + if (r == -1) + then do + err <- last_error h + fail err + else return () +