Blame SOURCES/kvm-iscsi-Drop-deprecated-drive-parameter-filename.patch

357786
From 975a41d8556024bed3fafc5118f084adf4cb391e Mon Sep 17 00:00:00 2001
357786
From: Markus Armbruster <armbru@redhat.com>
357786
Date: Mon, 18 Jun 2018 08:43:14 +0200
357786
Subject: [PATCH 07/54] iscsi: Drop deprecated -drive parameter "filename"
357786
357786
RH-Author: Markus Armbruster <armbru@redhat.com>
357786
Message-id: <20180618084330.30009-8-armbru@redhat.com>
357786
Patchwork-id: 80740
357786
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 07/23] iscsi: Drop deprecated -drive parameter "filename"
357786
Bugzilla: 1557995
357786
RH-Acked-by: Max Reitz <mreitz@redhat.com>
357786
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
357786
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
357786
357786
Parameter "filename" is deprecated since commit 5c3ad1a6a8f, v2.10.0.
357786
Time to get rid of it.
357786
357786
Signed-off-by: Markus Armbruster <armbru@redhat.com>
357786
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
357786
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
357786
(cherry picked from commit deadbb8ebb5c253da9b8ed02ab51a0fadf60edc7)
357786
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
357786
---
357786
 block/iscsi.c | 23 ++---------------------
357786
 1 file changed, 2 insertions(+), 21 deletions(-)
357786
357786
diff --git a/block/iscsi.c b/block/iscsi.c
357786
index d19ae0e..658462b 100644
357786
--- a/block/iscsi.c
357786
+++ b/block/iscsi.c
357786
@@ -1732,10 +1732,6 @@ static QemuOptsList runtime_opts = {
357786
             .name = "timeout",
357786
             .type = QEMU_OPT_NUMBER,
357786
         },
357786
-        {
357786
-            .name = "filename",
357786
-            .type = QEMU_OPT_STRING,
357786
-        },
357786
         { /* end of list */ }
357786
     },
357786
 };
357786
@@ -1751,27 +1747,12 @@ static int iscsi_open(BlockDriverState *bs, QDict *options, int flags,
357786
     char *initiator_name = NULL;
357786
     QemuOpts *opts;
357786
     Error *local_err = NULL;
357786
-    const char *transport_name, *portal, *target, *filename;
357786
+    const char *transport_name, *portal, *target;
357786
 #if LIBISCSI_API_VERSION >= (20160603)
357786
     enum iscsi_transport_type transport;
357786
 #endif
357786
     int i, ret = 0, timeout = 0, lun;
357786
 
357786
-    /* If we are given a filename, parse the filename, with precedence given to
357786
-     * filename encoded options */
357786
-    filename = qdict_get_try_str(options, "filename");
357786
-    if (filename) {
357786
-        warn_report("'filename' option specified. "
357786
-                    "This is an unsupported option, and may be deprecated "
357786
-                    "in the future");
357786
-        iscsi_parse_filename(filename, options, &local_err);
357786
-        if (local_err) {
357786
-            ret = -EINVAL;
357786
-            error_propagate(errp, local_err);
357786
-            goto exit;
357786
-        }
357786
-    }
357786
-
357786
     opts = qemu_opts_create(&runtime_opts, NULL, 0, &error_abort);
357786
     qemu_opts_absorb_qdict(opts, options, &local_err);
357786
     if (local_err) {
357786
@@ -1989,7 +1970,7 @@ out:
357786
         }
357786
         memset(iscsilun, 0, sizeof(IscsiLun));
357786
     }
357786
-exit:
357786
+
357786
     return ret;
357786
 }
357786
 
357786
-- 
357786
1.8.3.1
357786