From: Peter Krempa Date: Thu, 19 Apr 2018 13:31:55 +0000 (+0200) Subject: utils: storage: Mark that a virStorageSource is going to be used as a floppy X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=043b9069c594d94b45ec23243f9710d0fb954750;p=libvirt.git utils: storage: Mark that a virStorageSource is going to be used as a floppy Add a flag denoting that a virStorageSource is going to be used as a floppy image. This will be useful in cases where the user passes in files which shall be exposed as an image to the guest. Signed-off-by: Peter Krempa Reviewed-by: John Ferlan --- diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 48628466de..901132854c 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -11852,6 +11852,9 @@ qemuDomainPrepareDiskSourceChain(virDomainDiskDefPtr disk, n->iomode = disk->iomode; n->cachemode = disk->cachemode; n->discard = disk->discard; + + if (disk->device == VIR_DOMAIN_DISK_DEVICE_FLOPPY) + n->floppyimg = true; } return 0; diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h index 03e9ba9d2d..9286436827 100644 --- a/src/util/virstoragefile.h +++ b/src/util/virstoragefile.h @@ -313,6 +313,9 @@ struct _virStorageSource { int cachemode; /* enum virDomainDiskCache */ int discard; /* enum virDomainDiskDiscard */ int detect_zeroes; /* enum virDomainDiskDetectZeroes */ + + bool floppyimg; /* set to true if the storage source is going to be used + as a source for floppy drive */ };