[PATCH 3/4] qemu: Add caps to indentify if setting wwn is supported by qemu

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

 



This assumes ide-drive.wwn, ide-hd.wwn, ide-cd.wwn were supported
at the same time, similar for scsi-disk.wwn, scsi-hd.wwn, and
scsi-cd.wwn. So only two new caps (QEMU_CAPS_IDE_DRIVE_WWN,
and QEMU_CAPS_SCSI_DISK_WWN) are introduced.
---
 src/qemu/qemu_capabilities.c |    4 ++++
 src/qemu/qemu_capabilities.h |    2 ++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 5472267..9d06232 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -172,6 +172,8 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST,
               "bridge", /* 100 */
               "lsi",
               "virtio-scsi-pci",
+              "ide-drive.wwn",
+              "scsi-disk.wwn",
 
     );
 
@@ -1493,6 +1495,8 @@ qemuCapsParseDeviceStr(const char *str, virBitmapPtr flags)
         qemuCapsSet(flags, QEMU_CAPS_VIRTIO_BLK_SCSI);
     if (strstr(str, "scsi-disk.channel"))
         qemuCapsSet(flags, QEMU_CAPS_SCSI_DISK_CHANNEL);
+    if (strstr(str, "scsi-disk.wwn"))
+        qemuCapsSet(flags, QEMU_CAPS_SCSI_DISK_WWN);
     if (strstr(str, "scsi-block"))
         qemuCapsSet(flags, QEMU_CAPS_SCSI_BLOCK);
     if (strstr(str, "scsi-cd"))
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index d606890..9271dee 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -138,6 +138,8 @@ enum qemuCapsFlags {
     QEMU_CAPS_NETDEV_BRIDGE      = 100, /* bridge helper support */
     QEMU_CAPS_SCSI_LSI           = 101, /* -device lsi */
     QEMU_CAPS_VIRTIO_SCSI_PCI    = 102, /* -device virtio-scsi-pci */
+    QEMU_CAPS_IDE_DRIVE_WWN      = 103, /* Is ide-drive.wwn available? */
+    QEMU_CAPS_SCSI_DISK_WWN      = 104, /* Is scsi-disk.wwn available? */
 
     QEMU_CAPS_LAST,                   /* this must always be the last item */
 };
-- 
1.7.7.3

--
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]