Patchwork [22/28] Issue warning when deprecated drive parameter boot=on|off is used

login
register
mail settings
Submitter Marcelo Tosatti
Date Oct. 31, 2012, 9:40 a.m.
Message ID <0d92d17a6d0d65af8cb905bdd5f9e04e210564ff.1351676406.git.mtosatti@redhat.com>
Download mbox | patch
Permalink /patch/195835/
State New
Headers show

Comments

Marcelo Tosatti - Oct. 31, 2012, 9:40 a.m.
From: Jan Kiszka <jan.kiszka@siemens.com>

Releases of qemu-kvm will be interrupted at qemu 1.3.0.
Users should switch to plain qemu releases.
To avoid breaking scenarios which are setup with command line
options specific to qemu-kvm, port these switches from qemu-kvm
to qemu.git.

Port drive boot option. From the qemu-kvm original commit message:

We do not want to maintain this option forever. It will be removed after
a grace period of a few releases. So warn the user that this option has
no effect and will become invalid soon.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
---
 blockdev.c    |    6 ++++++
 qemu-config.c |    4 ++++
 2 files changed, 10 insertions(+), 0 deletions(-)

Patch

diff --git a/blockdev.c b/blockdev.c
index a068a4b..e73fd6e 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -433,6 +433,12 @@  DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi)
         return NULL;
     }
 
+    if (qemu_opt_get(opts, "boot") != NULL) {
+        fprintf(stderr, "qemu-kvm: boot=on|off is deprecated and will be "
+                "ignored. Future versions will reject this parameter. Please "
+                "update your scripts.\n");
+    }
+
     on_write_error = BLOCKDEV_ON_ERROR_ENOSPC;
     if ((buf = qemu_opt_get(opts, "werror")) != NULL) {
         if (type != IF_IDE && type != IF_SCSI && type != IF_VIRTIO && type != IF_NONE) {
diff --git a/qemu-config.c b/qemu-config.c
index e854fff..3154cac 100644
--- a/qemu-config.c
+++ b/qemu-config.c
@@ -114,6 +114,10 @@  static QemuOptsList qemu_drive_opts = {
             .name = "copy-on-read",
             .type = QEMU_OPT_BOOL,
             .help = "copy read data from backing file into image file",
+        },{
+            .name = "boot",
+            .type = QEMU_OPT_BOOL,
+            .help = "(deprecated, ignored)",
         },
         { /* end of list */ }
     },