All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>
Subject: Re: [Qemu-devel] [PATCH qemu v2 1/2] memory/hmp: Print owners/parents in "info mtree"
Date: Thu, 3 May 2018 15:40:51 +1000	[thread overview]
Message-ID: <d15375ef-2a6a-9a72-d0ef-0394c8e6832c@ozlabs.ru> (raw)
In-Reply-To: <00093926-1d43-0213-34ba-68f72e4057ac@redhat.com>

On 30/4/18 7:53 pm, Paolo Bonzini wrote:
> On 30/04/2018 08:25, Alexey Kardashevskiy wrote:
>> +    DeviceState *dev = (DeviceState *) object_dynamic_cast(obj, TYPE_DEVICE);
>> +    const char *id = object_property_print(obj, "id", true, NULL);
> 
> The only objects that have an "id" property are memdevs.  If you want to
> special case their printing too, it's probably a good idea (that is,
> print one of "dev id=ID"/"memdev id=ID"/"obj path=PATH").
> 
> Otherwise, I can also queue this patch as is, but I'd remove the "id"
> property handling because I'm going to submit a small series to remove
> the "id" property altogether.
> 
> Let me know what you prefer!


I choose to wait and repost, thanks :)


> 
> Thanks,
> 
> Paolo
> 
>> +    mon_printf(f, " %s:{%s", label, dev ? "dev" : "obj");
>> +    if (dev ? dev->id : id) {
>> +        mon_printf(f, " id=%s", dev ? dev->id : id);
>> +    } else {
>> +        gchar *canonical_path = object_get_canonical_path(obj);
>> +        mon_printf(f, " path=%s", canonical_path);
>> +        g_free(canonical_path);
>> +    }
>> +    mon_printf(f, "}");
> 


-- 
Alexey

  reply	other threads:[~2018-05-03  5:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-30  6:25 [Qemu-devel] [PATCH qemu v2 0/2] memory/hmp: Print owners/parents in "info mtree" Alexey Kardashevskiy
2018-04-30  6:25 ` [Qemu-devel] [PATCH qemu v2 1/2] " Alexey Kardashevskiy
2018-04-30  9:53   ` Paolo Bonzini
2018-05-03  5:40     ` Alexey Kardashevskiy [this message]
2018-05-30  4:57       ` Alexey Kardashevskiy
2018-05-30 10:30         ` Paolo Bonzini
2018-04-30  6:25 ` [Qemu-devel] [PATCH qemu v2 2/2] object: Handle objects with no parents Alexey Kardashevskiy
2018-04-30  9:51   ` Paolo Bonzini

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=d15375ef-2a6a-9a72-d0ef-0394c8e6832c@ozlabs.ru \
    --to=aik@ozlabs.ru \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=pbonzini@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.