diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2009-07-02 17:38:55 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2009-07-02 17:38:55 +0100 |
commit | c7a3729f459a845f4e7b30c09ea378c54ee49c32 (patch) | |
tree | bed8d08b51aa041cd051c9308e1d51153016da33 /src | |
parent | 8863ecde5dba262c0736da7505a9fa3655ed42f6 (diff) | |
download | libguestfs-c7a3729f459a845f4e7b30c09ea378c54ee49c32.tar.gz libguestfs-c7a3729f459a845f4e7b30c09ea378c54ee49c32.tar.xz libguestfs-c7a3729f459a845f4e7b30c09ea378c54ee49c32.zip |
Add ./configure --with-drive-if=(ide|scsi|virtio)
With this flag the packager can decide to default to a particular
qemu drive model. The current default is 'ide', however note that
we intend to change this in future to 'virtio' once some upstream
regressions are fixed. Packagers can force a particular drive
model if they wish.
Diffstat (limited to 'src')
-rwxr-xr-x | src/generator.ml | 4 | ||||
-rw-r--r-- | src/guestfs.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/generator.ml b/src/generator.ml index f41413e8..239f021f 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -378,7 +378,7 @@ just want to read the image or write access if you want to modify the image). This is equivalent to the qemu parameter -C<-drive file=filename,cache=off,if=virtio>. +C<-drive file=filename,cache=off,if=...>. Note that this call checks for the existence of C<filename>. This stops you from specifying other types of drive which are supported @@ -412,7 +412,7 @@ handle is closed. We don't currently have any method to enable changes to be committed, although qemu can support this. This is equivalent to the qemu parameter -C<-drive file=filename,snapshot=on,if=virtio>. +C<-drive file=filename,snapshot=on,if=...>. Note that this call checks for the existence of C<filename>. This stops you from specifying other types of drive which are supported diff --git a/src/guestfs.c b/src/guestfs.c index 9cdb2dde..c3bce0b8 100644 --- a/src/guestfs.c +++ b/src/guestfs.c @@ -708,7 +708,7 @@ guestfs_add_drive (guestfs_h *g, const char *filename) } /* cache=off improves reliability in the event of a host crash. */ - snprintf (buf, len, "file=%s,cache=off,if=virtio", filename); + snprintf (buf, len, "file=%s,cache=off,if=%s", filename, DRIVE_IF); return guestfs_config (g, "-drive", buf); } @@ -729,7 +729,7 @@ guestfs_add_drive_ro (guestfs_h *g, const char *filename) return -1; } - snprintf (buf, len, "file=%s,snapshot=on,if=virtio", filename); + snprintf (buf, len, "file=%s,snapshot=on,if=%s", filename, DRIVE_IF); return guestfs_config (g, "-drive", buf); } |