diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2009-05-15 14:01:28 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2009-05-15 14:52:34 +0100 |
commit | 5cd39c83e23eb300d1bdfa806902a31b409ff420 (patch) | |
tree | a47e2bf9afc16cb9404ae996f512a9d3f22e553b /haskell | |
parent | b8e5f51c79f539a740827506cc9da3ffcb6c87f8 (diff) | |
download | libguestfs-5cd39c83e23eb300d1bdfa806902a31b409ff420.tar.gz libguestfs-5cd39c83e23eb300d1bdfa806902a31b409ff420.tar.xz libguestfs-5cd39c83e23eb300d1bdfa806902a31b409ff420.zip |
Add: pvresize, sfdisk-N, sfdisk-l, sfdisk-kernel-geomtry, sfdisk-disk-geometry commands. Pass --no-reread flag to sfdisk.
Diffstat (limited to 'haskell')
-rw-r--r-- | haskell/Guestfs.hs | 15 |
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 () + |