[PATCH 07/35] utils: storage: Mark that a virStorageSource is going to be used as a floppy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 src/qemu/qemu_domain.c    | 3 +++
 src/util/virstoragefile.h | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 109f4f7f36..f8254bfdd5 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -11862,6 +11862,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 b450da55ae..57d39f98c2 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 */
 };


-- 
2.16.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux