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 <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
Peter Krempa 2018-04-19 15:31:55 +02:00
parent bbf204dab7
commit 043b9069c5
2 changed files with 6 additions and 0 deletions

View File

@ -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;

View File

@ -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 */
};