Re: [Qemu-devel] [PATCH 07/12] qapi: add human mode to StringOutputVisitor

2014-02-10 Thread Andreas Färber
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: P

Re: [Qemu-devel] [PATCH 07/12] qapi: add human mode to StringOutputVisitor

2014-01-30 Thread Eric Blake
On 01/30/2014 06:09 AM, Paolo Bonzini wrote: > 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. Nice idea! But nee

Re: [Qemu-devel] [PATCH 07/12] qapi: add human mode to StringOutputVisitor

2014-01-30 Thread Eric Blake
On 01/30/2014 07:12 AM, Paolo Bonzini wrote: > Il 30/01/2014 15:09, Eric Blake ha scritto: > | Also, I like how your int printout was both decimal and hex; but > | here you are throwing away information (and the bigger the number, > | the more we lose as to how much got rounded away). I'd rather s

Re: [Qemu-devel] [PATCH 07/12] qapi: add human mode to StringOutputVisitor

2014-01-30 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 30/01/2014 15:09, Eric Blake ha scritto: | Also, I like how your int printout was both decimal and hex; but | here you are throwing away information (and the bigger the number, | the more we lose as to how much got rounded away). I'd rather see |

[Qemu-devel] [PATCH 07/12] qapi: add human mode to StringOutputVisitor

2014-01-30 Thread 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 --- include/qapi/string-output-visitor.h