diff options
author | Richard Jones <rjones@redhat.com> | 2009-05-18 20:22:53 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-05-18 20:22:53 +0100 |
commit | ca49c50e06834bbc68e21630a5552c57494f2b53 (patch) | |
tree | 0d1c98fd038abf05d7491f044c8affbfb461ce00 /haskell | |
parent | 0695593702b8612b500ff0b3bf800e5934f9b56e (diff) | |
download | libguestfs-ca49c50e06834bbc68e21630a5552c57494f2b53.tar.gz libguestfs-ca49c50e06834bbc68e21630a5552c57494f2b53.tar.xz libguestfs-ca49c50e06834bbc68e21630a5552c57494f2b53.zip |
Generated code for lvresize, resize2fs.
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 170f0403..8f90ee8c 100644 --- a/haskell/Guestfs.hs +++ b/haskell/Guestfs.hs @@ -80,7 +80,8 @@ module Guestfs ( mv, ping_daemon, zerofree, - pvresize + pvresize, + resize2fs ) where import Foreign import Foreign.C @@ -814,3 +815,15 @@ pvresize h device = do fail err else return () +foreign import ccall unsafe "guestfs_resize2fs" c_resize2fs + :: GuestfsP -> CString -> IO (CInt) + +resize2fs :: GuestfsH -> String -> IO () +resize2fs h device = do + r <- withCString device $ \device -> withForeignPtr h (\p -> c_resize2fs p device) + if (r == -1) + then do + err <- last_error h + fail err + else return () + |