Re: [PATCH] qemu: Fix detection of drive readonly option

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

 



On 10/25/2010 07:47 AM, Jiri Denemark wrote:
So far, readonly=on option is used when qemu supports -device. However,
there are qemu versions which support readonly option with -drive
although they don't have support for -device.
---
  src/qemu/qemu_conf.c                               |   12 ++-
  src/qemu/qemu_conf.h                               |    1 +
  tests/qemuhelpdata/kvm-83-rhel56                   |  141 ++++++++++++++++++++
  tests/qemuhelptest.c                               |   26 ++++
  ...qemuxml2argv-disk-drive-readonly-no-device.args |    1 +
  .../qemuxml2argv-disk-drive-readonly-no-device.xml |   31 +++++
  tests/qemuxml2argvtest.c                           |    5 +-
  7 files changed, 214 insertions(+), 3 deletions(-)
  create mode 100644 tests/qemuhelpdata/kvm-83-rhel56
  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-no-device.args
  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-no-device.xml

ACK.

+++ b/src/qemu/qemu_conf.h
@@ -96,6 +96,7 @@ enum qemud_cmd_flags {
      QEMUD_CMD_FLAG_FSDEV         = (1LL<<  40), /* -fstype filesystem passthrough */
      QEMUD_CMD_FLAG_NESTING       = (1LL<<  41), /* -enable-nesting (SVM/VMX) */
      QEMUD_CMD_FLAG_NAME_PROCESS  = (1LL<<  42), /* Is -name process= available */
+    QEMUD_CMD_FLAG_DRIVE_READONLY    = (1LL<<  43), /* -drive readonly=on|off */

It feels like we're burning through these flag bits rather quickly: 15 flags added since January of this year. While it doesn't affect your patch, it means that at the current pace we have less than 18 months before we have to add a second flag variable.

--
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

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