summaryrefslogtreecommitdiffstats
path: root/haskell/Guestfs.hs
diff options
context:
space:
mode:
Diffstat (limited to 'haskell/Guestfs.hs')
-rw-r--r--haskell/Guestfs.hs15
1 files changed, 14 insertions, 1 deletions
diff --git a/haskell/Guestfs.hs b/haskell/Guestfs.hs
index c061a7a6..170f0403 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 ()
+