mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
fish: For -N option, add drive with explicit format = "raw".
Although autodetecting is safe (we always have just created a drive), it saves a little bit of time if we don't have to run qemu-img to detect the disk format with the libvirt backend. Note that for prepared drives the format is always raw and we don't anticipate creating drives in other formats.
This commit is contained in:
@@ -367,13 +367,10 @@ add_drives (struct drv *drv, char next_drive)
|
||||
|
||||
#if COMPILING_GUESTFISH
|
||||
case drv_N:
|
||||
/* guestfs_add_drive (ie. autodetecting) should be safe here
|
||||
* since we have just created the prepared disk. At the moment
|
||||
* it will always be "raw" but in a theoretical future we might
|
||||
* create other formats.
|
||||
*/
|
||||
/* -N option is not affected by --ro */
|
||||
r = guestfs_add_drive (g, drv->N.filename);
|
||||
r = guestfs_add_drive_opts (g, drv->N.filename,
|
||||
GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw",
|
||||
-1);
|
||||
if (r == -1)
|
||||
exit (EXIT_FAILURE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user