From: "Andreas Färber" <afaerber@suse.de>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH 07/12] qapi: add human mode to StringOutputVisitor
Date: Mon, 10 Feb 2014 18:57:13 +0100 [thread overview]
Message-ID: <52F912F9.8050400@suse.de> (raw)
In-Reply-To: <1391087394-17914-8-git-send-email-pbonzini@redhat.com>
Am 30.01.2014 14:09, schrieb Paolo Bonzini:
> This will be used by "info qtree". For numbers it prints both the
> decimal and hex values. For sizes it rounds to the nearest power
> of 2^10. For strings, it puts quotes around the string and separates
> NULL and empty string.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> include/qapi/string-output-visitor.h | 2 +-
> include/qom/object.h | 3 +-
> qapi/string-output-visitor.c | 55 ++++++++++++++++++++++++++++++++++--
> qdev-monitor.c | 2 +-
> qom/object.c | 4 +--
> tests/test-string-output-visitor.c | 2 +-
> tests/test-visitor-serialization.c | 2 +-
> 7 files changed, 60 insertions(+), 10 deletions(-)
>
> diff --git a/include/qapi/string-output-visitor.h b/include/qapi/string-output-visitor.h
> index ec81e42..d99717f 100644
> --- a/include/qapi/string-output-visitor.h
> +++ b/include/qapi/string-output-visitor.h
> @@ -17,7 +17,7 @@
>
> typedef struct StringOutputVisitor StringOutputVisitor;
>
> -StringOutputVisitor *string_output_visitor_new(void);
> +StringOutputVisitor *string_output_visitor_new(bool human);
> void string_output_visitor_cleanup(StringOutputVisitor *v);
>
> char *string_output_get_string(StringOutputVisitor *v);
> diff --git a/include/qom/object.h b/include/qom/object.h
> index e0ff212..9c7c361 100644
> --- a/include/qom/object.h
> +++ b/include/qom/object.h
> @@ -946,12 +946,13 @@ void object_property_parse(Object *obj, const char *string,
> * object_property_print:
> * @obj: the object
> * @name: the name of the property
> + * @human: if true, print for human consumption
This would ideally be %true, but I better not fiddle with that to not
create merge conflicts, so hoping it can be fixed in the follow-up.
Andreas
> * @errp: returns an error if this function fails
> *
> * Returns a string representation of the value of the property. The
> * caller shall free the string.
> */
> -char *object_property_print(Object *obj, const char *name,
> +char *object_property_print(Object *obj, const char *name, bool human,
> Error **errp);
>
> /**
[snip]
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2014-02-10 17:57 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-30 13:09 [Qemu-devel] [PATCH 00/12] qdev: cleanup legacy properties Paolo Bonzini
2014-01-30 13:09 ` [Qemu-devel] [PATCH 01/12] qapi: add size parser to StringInputVisitor Paolo Bonzini
2014-01-30 13:45 ` Eric Blake
2014-02-05 17:13 ` Andreas Färber
2014-02-05 17:18 ` Paolo Bonzini
2014-02-05 17:30 ` Eric Blake
2014-01-30 13:09 ` [Qemu-devel] [PATCH 02/12] qdev: sizes are now parsed by StringInputVisitor Paolo Bonzini
2014-01-30 13:46 ` Eric Blake
2014-01-30 13:09 ` [Qemu-devel] [PATCH 03/12] qdev: remove legacy parsers for hex8/32/64 Paolo Bonzini
2014-01-30 13:46 ` Eric Blake
2014-01-30 13:09 ` [Qemu-devel] [PATCH 04/12] qdev: legacy properties are now read-only Paolo Bonzini
2014-01-30 13:49 ` Eric Blake
2014-01-30 13:09 ` [Qemu-devel] [PATCH 05/12] qdev: legacy properties are just strings Paolo Bonzini
2014-01-30 13:52 ` Eric Blake
2014-01-30 13:09 ` [Qemu-devel] [PATCH 06/12] qdev: inline qdev_prop_parse Paolo Bonzini
2014-01-30 13:53 ` Eric Blake
2014-01-30 13:09 ` [Qemu-devel] [PATCH 07/12] qapi: add human mode to StringOutputVisitor Paolo Bonzini
2014-01-30 14:09 ` Eric Blake
2014-01-30 14:12 ` Paolo Bonzini
2014-01-30 14:20 ` Eric Blake
2014-02-10 17:57 ` Andreas Färber [this message]
2014-01-30 13:09 ` [Qemu-devel] [PATCH 08/12] qdev: use human mode in "info qtree" Paolo Bonzini
2014-01-30 15:01 ` Eric Blake
2014-01-30 13:09 ` [Qemu-devel] [PATCH 09/12] qdev: remove most legacy printers Paolo Bonzini
2014-01-30 15:03 ` Eric Blake
2014-01-30 13:09 ` [Qemu-devel] [PATCH 10/12] qdev: remove hex8/32/64 property types Paolo Bonzini
2014-01-30 15:17 ` Eric Blake
2014-01-30 13:09 ` [Qemu-devel] [PATCH 11/12] qdev: add enum property types to QAPI schema Paolo Bonzini
2014-01-30 15:22 ` Eric Blake
2014-01-31 8:05 ` Markus Armbruster
2014-01-31 11:26 ` Paolo Bonzini
2014-01-30 13:09 ` [Qemu-devel] [PATCH 12/12] qdev: use QAPI type names for properties Paolo Bonzini
2014-01-30 15:26 ` Eric Blake
2014-01-30 16:42 ` [Qemu-devel] [PATCH 13/12] qapi: refine human printing of sizes Paolo Bonzini
2014-01-30 20:16 ` Eric Blake
2014-02-05 11:10 ` Igor Mammedov
2014-02-05 11:12 ` [Qemu-devel] [PATCH 00/12] qdev: cleanup legacy properties Igor Mammedov
2014-02-05 16:36 ` Paolo Bonzini
2014-02-05 16:39 ` Andreas Färber
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=52F912F9.8050400@suse.de \
--to=afaerber@suse.de \
--cc=armbru@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.