mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
Generated code for mount-loop command.
This commit is contained in:
@@ -120,7 +120,8 @@ module Guestfs (
|
||||
wc_l,
|
||||
wc_w,
|
||||
wc_c,
|
||||
du
|
||||
du,
|
||||
mount_loop
|
||||
) where
|
||||
import Foreign
|
||||
import Foreign.C
|
||||
@@ -1335,3 +1336,15 @@ du h path = do
|
||||
fail err
|
||||
else return (fromIntegral r)
|
||||
|
||||
foreign import ccall unsafe "guestfs_mount_loop" c_mount_loop
|
||||
:: GuestfsP -> CString -> CString -> IO (CInt)
|
||||
|
||||
mount_loop :: GuestfsH -> String -> String -> IO ()
|
||||
mount_loop h file mountpoint = do
|
||||
r <- withCString file $ \file -> withCString mountpoint $ \mountpoint -> withForeignPtr h (\p -> c_mount_loop p file mountpoint)
|
||||
if (r == -1)
|
||||
then do
|
||||
err <- last_error h
|
||||
fail err
|
||||
else return ()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user