Re: [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]

 



On Tue, Sep 11, 2012 at 04:57:03PM +0800, Osier Yang wrote:
> 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 ed85b6f..e7afe18 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
> @@ -176,6 +176,8 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST,
>                "disable-s3",
>  
>                "disable-s4", /* 105 */
> +              "ide-drive.wwn",
> +              "scsi-disk.wwn",

You're adding 2 properties here

>      );
>  
>  struct qemu_feature_flags {
> @@ -1497,6 +1499,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);

But only checking for one of them here

>      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 49d64e5..954e51d 100644
> --- a/src/qemu/qemu_capabilities.h
> +++ b/src/qemu/qemu_capabilities.h
> @@ -141,6 +141,8 @@ enum qemuCapsFlags {
>      QEMU_CAPS_BLOCKIO            = 103, /* -device ...logical_block_size & co */
>      QEMU_CAPS_DISABLE_S3         = 104, /* S3 BIOS Advertisement on/off */
>      QEMU_CAPS_DISABLE_S4         = 105, /* S4 BIOS Advertisement on/off */
> +    QEMU_CAPS_IDE_DRIVE_WWN      = 106, /* Is ide-drive.wwn available? */
> +    QEMU_CAPS_SCSI_DISK_WWN      = 107, /* Is scsi-disk.wwn available? */

But again you have 2 caps here

>  
>      QEMU_CAPS_LAST,                   /* this must always be the last item */
>  };


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

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