summaryrefslogtreecommitdiffstats
path: root/src/virt.c
diff options
context:
space:
mode:
authorMatthew Booth <mbooth@redhat.com>2011-10-17 15:28:47 +0100
committerRichard W.M. Jones <rjones@redhat.com>2011-10-19 16:26:42 +0100
commitf1041e912b72116d66274d2f15e50ce34a9531fd (patch)
tree8b7d72acd49f65b37e9906dd3d602135d05fa8ee /src/virt.c
parent472f02d08b077a5c1ee233d9dcef92ac9b09d4ae (diff)
downloadlibguestfs-f1041e912b72116d66274d2f15e50ce34a9531fd.tar.gz
libguestfs-f1041e912b72116d66274d2f15e50ce34a9531fd.tar.xz
libguestfs-f1041e912b72116d66274d2f15e50ce34a9531fd.zip
launch: Store drive information in guestfs_h
This is a NFC on its own, but provides a place-holder for drive metadata which can be used after launch. Fixes by RWMJ: - Fix the tests: this requires a new internal function 'debug-drives' that dumps out the g->drives information so it can be checked in two of the tests. Previously these tests used 'debug-cmdline'. - Test file existence / use_cache_off in the add_drive_opts function, not when launching qemu in the child process. - Call free along error paths. - Add comments.
Diffstat (limited to 'src/virt.c')
-rw-r--r--src/virt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/virt.c b/src/virt.c
index 58cb999d..cc11c68a 100644
--- a/src/virt.c
+++ b/src/virt.c
@@ -392,10 +392,10 @@ guestfs___add_libvirt_dom (guestfs_h *g, virDomainPtr dom,
/* Checkpoint the command line around the operation so that either
* all disks are added or none are added.
*/
- cmdline_pos = guestfs___checkpoint_cmdline (g);
+ struct drive **cp = guestfs___checkpoint_drives (g);
r = guestfs___for_each_disk (g, dom, add_disk, &optargs2);
if (r == -1)
- guestfs___rollback_cmdline (g, cmdline_pos);
+ guestfs___rollback_drives (g, cp);
return r;
}