mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
tests: Use new guestfs_add_drive_scratch API where possible in tests.
Replaces code such as: fd = open "test1.img" ftruncate fd, size close fd g.add_drive "test1.img" with the shorter and simpler: g.add_drive_scratch size
This commit is contained in:
@@ -24,6 +24,8 @@ import Control.Monad
|
||||
|
||||
main = do
|
||||
g <- G.create
|
||||
{- XXX replace with a call to add_drive_scratch once
|
||||
optional arguments are supported -}
|
||||
fd <- openFile "test.img" WriteMode
|
||||
hSetFileSize fd (500 * 1024 * 1024)
|
||||
hClose fd
|
||||
|
||||
Reference in New Issue
Block a user