cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-blockdev-Move-parsing-of-boot-option-to-drive_init.patch

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