All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL v2 10/10] option: Drop unused get_param_value(), get_next_param_value()
Date: Wed, 20 Dec 2017 09:19:27 +0100	[thread overview]
Message-ID: <20171220081927.8761-11-armbru@redhat.com> (raw)
In-Reply-To: <20171220081927.8761-1-armbru@redhat.com>

Their last user went away in commit f51074cdc6, "pci-hotplug-old: Has
been dead for five major releases, bury", v2.3.0.  Remove them, as new
code should use QemuOpts or maybe keyval_parse() instead.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20171006131645.17729-1-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
 include/qemu/option.h |  5 -----
 util/qemu-option.c    | 34 ----------------------------------
 2 files changed, 39 deletions(-)

diff --git a/include/qemu/option.h b/include/qemu/option.h
index f7338dbe80..a88c5f02b1 100644
--- a/include/qemu/option.h
+++ b/include/qemu/option.h
@@ -31,11 +31,6 @@
 
 const char *get_opt_name(char *buf, int buf_size, const char *p, char delim);
 const char *get_opt_value(char *buf, int buf_size, const char *p);
-int get_next_param_value(char *buf, int buf_size,
-                         const char *tag, const char **pstr);
-int get_param_value(char *buf, int buf_size,
-                    const char *tag, const char *str);
-
 
 void parse_option_size(const char *name, const char *value,
                        uint64_t *ret, Error **errp);
diff --git a/util/qemu-option.c b/util/qemu-option.c
index 877c5b4d67..553d3dc552 100644
--- a/util/qemu-option.c
+++ b/util/qemu-option.c
@@ -91,40 +91,6 @@ const char *get_opt_value(char *buf, int buf_size, const char *p)
     return p;
 }
 
-int get_next_param_value(char *buf, int buf_size,
-                         const char *tag, const char **pstr)
-{
-    const char *p;
-    char option[128];
-
-    p = *pstr;
-    for(;;) {
-        p = get_opt_name(option, sizeof(option), p, '=');
-        if (*p != '=')
-            break;
-        p++;
-        if (!strcmp(tag, option)) {
-            *pstr = get_opt_value(buf, buf_size, p);
-            if (**pstr == ',') {
-                (*pstr)++;
-            }
-            return strlen(buf);
-        } else {
-            p = get_opt_value(NULL, 0, p);
-        }
-        if (*p != ',')
-            break;
-        p++;
-    }
-    return 0;
-}
-
-int get_param_value(char *buf, int buf_size,
-                    const char *tag, const char *str)
-{
-    return get_next_param_value(buf, buf_size, tag, &str);
-}
-
 static void parse_option_bool(const char *name, const char *value, bool *ret,
                               Error **errp)
 {
-- 
2.13.6

  parent reply	other threads:[~2017-12-20  8:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-20  8:19 [Qemu-devel] [PULL v2 00/10] Command line patches for 2017-12-18 Markus Armbruster
2017-12-20  8:19 ` [Qemu-devel] [PULL v2 01/10] qemu-options: Remove stray colons from output of --help Markus Armbruster
2017-12-20  8:19 ` [Qemu-devel] [PULL v2 02/10] qemu-options: Fix markup of -netdev l2tpv3 Markus Armbruster
2017-12-20  8:19 ` [Qemu-devel] [PULL v2 03/10] qemu-options qemu-doc: Move "Device URL Syntax" to qemu-doc Markus Armbruster
2017-12-20  8:19 ` [Qemu-devel] [PULL v2 04/10] qemu-options: Move -iscsi under "Block device options" Markus Armbruster
2017-12-20  8:19 ` [Qemu-devel] [PULL v2 05/10] qemu-options: Add missing -iscsi Texinfo documentation Markus Armbruster
2017-12-20  8:19 ` [Qemu-devel] [PULL v2 06/10] qemu-options: Polish section "TPM device options" Markus Armbruster
2017-12-20  8:19 ` [Qemu-devel] [PULL v2 07/10] qemu-options: Polish section "Character " Markus Armbruster
2017-12-20  8:19 ` [Qemu-devel] [PULL v2 08/10] qemu-options: Belatedly document --watchdog-action inject-nmi Markus Armbruster
2017-12-20  8:19 ` [Qemu-devel] [PULL v2 09/10] option: Remove shadowing opt decl from qemu_opt_print() Markus Armbruster
2017-12-20  8:19 ` Markus Armbruster [this message]
2017-12-20 15:26 ` [Qemu-devel] [PULL v2 00/10] Command line patches for 2017-12-18 Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171220081927.8761-11-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.