9ae3a8
From f57c1d76bbddfd3a12f35c59c043eaed7be44206 Mon Sep 17 00:00:00 2001
9ae3a8
From: Kevin Wolf <kwolf@redhat.com>
9ae3a8
Date: Tue, 5 Nov 2013 14:09:07 +0100
9ae3a8
Subject: [PATCH 54/87] blockdev: Move parsing of 'boot' option to drive_init
9ae3a8
9ae3a8
RH-Author: Kevin Wolf <kwolf@redhat.com>
9ae3a8
Message-id: <1383660558-32096-14-git-send-email-kwolf@redhat.com>
9ae3a8
Patchwork-id: 55392
9ae3a8
O-Subject: [RHEL-7.0 qemu-kvm PATCH 13/24] blockdev: Move parsing of 'boot' option to drive_init
9ae3a8
Bugzilla: 978402
9ae3a8
RH-Acked-by: Fam Zheng <famz@redhat.com>
9ae3a8
RH-Acked-by: Max Reitz <mreitz@redhat.com>
9ae3a8
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
9ae3a8
9ae3a8
It's already ignored and only prints a deprecation message. No use in
9ae3a8
making it available in new interfaces.
9ae3a8
9ae3a8
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
9ae3a8
Reviewed-by: Eric Blake <eblake@redhat.com>
9ae3a8
(cherry picked from commit 26929298023b0592dc6ac8bc15163b5a24341670)
9ae3a8
9ae3a8
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
9ae3a8
---
9ae3a8
 blockdev.c | 21 +++++++++++----------
9ae3a8
 1 file changed, 11 insertions(+), 10 deletions(-)
9ae3a8
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 blockdev.c |   21 +++++++++++----------
9ae3a8
 1 files changed, 11 insertions(+), 10 deletions(-)
9ae3a8
9ae3a8
diff --git a/blockdev.c b/blockdev.c
9ae3a8
index d69c4a8..9f9cbba 100644
9ae3a8
--- a/blockdev.c
9ae3a8
+++ b/blockdev.c
9ae3a8
@@ -456,12 +456,6 @@ static DriveInfo *blockdev_init(QDict *bs_opts,
9ae3a8
         return NULL;
9ae3a8
     }
9ae3a8
 
9ae3a8
-    if (qemu_opt_get(opts, "boot") != NULL) {
9ae3a8
-        fprintf(stderr, "qemu-kvm: boot=on|off is deprecated and will be "
9ae3a8
-                "ignored. Future versions will reject this parameter. Please "
9ae3a8
-                "update your scripts.\n");
9ae3a8
-    }
9ae3a8
-
9ae3a8
     on_write_error = BLOCKDEV_ON_ERROR_ENOSPC;
9ae3a8
     if ((buf = qemu_opt_get(opts, "werror")) != NULL) {
9ae3a8
         if (type != IF_IDE && type != IF_SCSI && type != IF_VIRTIO && type != IF_NONE) {
9ae3a8
@@ -710,6 +704,10 @@ QemuOptsList qemu_legacy_drive_opts = {
9ae3a8
             .name = "trans",
9ae3a8
             .type = QEMU_OPT_STRING,
9ae3a8
             .help = "chs translation (auto, lba, none)",
9ae3a8
+        },{
9ae3a8
+            .name = "boot",
9ae3a8
+            .type = QEMU_OPT_BOOL,
9ae3a8
+            .help = "(deprecated, ignored)",
9ae3a8
         },
9ae3a8
         { /* end of list */ }
9ae3a8
     },
9ae3a8
@@ -774,6 +772,13 @@ DriveInfo *drive_init(QemuOpts *all_opts, BlockInterfaceType block_default_type)
9ae3a8
         goto fail;
9ae3a8
     }
9ae3a8
 
9ae3a8
+    /* Deprecated option boot=[on|off] */
9ae3a8
+    if (qemu_opt_get(legacy_opts, "boot") != NULL) {
9ae3a8
+        fprintf(stderr, "qemu-kvm: boot=on|off is deprecated and will be "
9ae3a8
+                "ignored. Future versions will reject this parameter. Please "
9ae3a8
+                "update your scripts.\n");
9ae3a8
+    }
9ae3a8
+
9ae3a8
     /* Media type */
9ae3a8
     value = qemu_opt_get(legacy_opts, "media");
9ae3a8
     if (value) {
9ae3a8
@@ -1890,10 +1895,6 @@ QemuOptsList qemu_common_drive_opts = {
9ae3a8
             .name = "copy-on-read",
9ae3a8
             .type = QEMU_OPT_BOOL,
9ae3a8
             .help = "copy read data from backing file into image file",
9ae3a8
-        },{
9ae3a8
-            .name = "boot",
9ae3a8
-            .type = QEMU_OPT_BOOL,
9ae3a8
-            .help = "(deprecated, ignored)",
9ae3a8
         },
9ae3a8
         { /* end of list */ }
9ae3a8
     },
9ae3a8
-- 
9ae3a8
1.7.1
9ae3a8