mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 12:23:53 -06:00
qapi: Add human mode to StringOutputVisitor
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. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
98a6528461
commit
0b7593e085
7 changed files with 60 additions and 10 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue