qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, peter.crosthwaite@xilinx.com, afaerber@suse.de
Subject: [Qemu-devel] [PATCH 4/4] Revert "qom: Add automatic arrayification to object_property_add()"
Date: Wed, 12 Nov 2014 18:08:50 +0100	[thread overview]
Message-ID: <1415812130-2592-5-git-send-email-armbru@redhat.com> (raw)
In-Reply-To: <1415812130-2592-1-git-send-email-armbru@redhat.com>

This reverts commit 339659041f87a76f8b71ad3d12cadfc5f89b4bb3.

It's been replaced by object_gen_new_property_name().

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 qom/object.c | 21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/qom/object.c b/qom/object.c
index 4c46662..2aed3de 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -729,27 +729,6 @@ object_property_add(Object *obj, const char *name, const char *type,
                     void *opaque, Error **errp)
 {
     ObjectProperty *prop;
-    size_t name_len = strlen(name);
-
-    if (name_len >= 3 && !memcmp(name + name_len - 3, "[*]", 4)) {
-        int i;
-        ObjectProperty *ret;
-        char *name_no_array = g_strdup(name);
-
-        name_no_array[name_len - 3] = '\0';
-        for (i = 0; ; ++i) {
-            char *full_name = g_strdup_printf("%s[%d]", name_no_array, i);
-
-            ret = object_property_add(obj, full_name, type, get, set,
-                                      release, opaque, NULL);
-            g_free(full_name);
-            if (ret) {
-                break;
-            }
-        }
-        g_free(name_no_array);
-        return ret;
-    }
 
     QTAILQ_FOREACH(prop, &obj->properties, node) {
         if (strcmp(prop->name, name) == 0) {
-- 
1.9.3

  parent reply	other threads:[~2014-11-12 17:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-12 17:08 [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification" Markus Armbruster
2014-11-12 17:08 ` [Qemu-devel] [PATCH 1/4] qom: New object_gen_new_property_name() Markus Armbruster
2014-11-12 17:08 ` [Qemu-devel] [PATCH 2/4] memory: Use object_gen_new_property_name() instead of "arrayification" Markus Armbruster
2014-11-12 17:08 ` [Qemu-devel] [PATCH 3/4] qdev: " Markus Armbruster
2014-11-12 17:08 ` Markus Armbruster [this message]
2014-11-12 17:14   ` [Qemu-devel] [PATCH 4/4] Revert "qom: Add automatic arrayification to object_property_add()" Andreas Färber
2014-11-12 22:25     ` Paolo Bonzini
2014-11-12 22:47       ` Peter Maydell
2014-11-13 10:05         ` Paolo Bonzini
2014-11-13 10:50           ` Peter Maydell
2014-11-12 17:13 ` [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification" Paolo Bonzini
2014-11-13  8:08   ` Markus Armbruster
2014-11-13 10:08     ` Paolo Bonzini
2014-11-13 14:34       ` Markus Armbruster
2014-11-13 14:39         ` Paolo Bonzini
2014-11-14 14:21           ` Markus Armbruster
2014-11-14 14:25             ` Paolo Bonzini
2014-11-14 15:10               ` Markus Armbruster

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=1415812130-2592-5-git-send-email-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=afaerber@suse.de \
    --cc=pbonzini@redhat.com \
    --cc=peter.crosthwaite@xilinx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).