qemu/qapi
Markus Armbruster 54addb01d8 string-output-visitor: Fix to use sufficient precision
The string output visitor should serialize numbers so that the string
input visitor deserializes them back to the same number.  It fails to
do so.

print_type_number() uses format %f.  This is prone to nasty rounding
errors.  For instance, numbers between 0 and 0.0000005 get flushed to
zero.

We currently use this visitor only for HMP info migrate, info network,
info qtree, and info memdev.  No double values occur there as far as I
can tell.

Fix anyway by formatting with %.17g.  17 decimal digits always suffice
for IEEE double.

See also recent commit "qobject: Fix qnum_to_string() to use
sufficient precision".

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20201210161452.2813491-9-armbru@redhat.com>
2020-12-19 10:37:16 +01:00
..
acpi.json
audio.json qapi: Fix missing headers in QMP Reference Manual 2020-11-09 09:14:17 +01:00
authz.json qapi: Fix missing headers in QMP Reference Manual 2020-11-09 09:14:17 +01:00
block-core.json qapi: Normalize version references x.y.0 to just x.y 2020-12-10 17:16:44 +01:00
block-export.json fuse: Allow growable exports 2020-12-11 17:52:40 +01:00
block.json qapi: Normalize version references x.y.0 to just x.y 2020-12-10 17:16:44 +01:00
char.json qapi: Normalize version references x.y.0 to just x.y 2020-12-10 17:16:44 +01:00
common.json
control.json monitor: allow quitting while in preconfig state 2020-12-15 12:51:57 -05:00
crypto.json
dump.json
error.json
introspect.json
job.json
machine-target.json qapi: Normalize version references x.y.0 to just x.y 2020-12-10 17:16:44 +01:00
machine.json qapi: Normalize version references x.y.0 to just x.y 2020-12-10 17:16:44 +01:00
meson.build
migration.json qapi: Normalize version references x.y.0 to just x.y 2020-12-10 17:16:44 +01:00
misc-target.json sev: add sev-inject-launch-secret 2020-12-10 17:33:17 -05:00
misc.json qapi: Normalize version references x.y.0 to just x.y 2020-12-10 17:16:44 +01:00
net.json qapi: Normalize version references x.y.0 to just x.y 2020-12-10 17:16:44 +01:00
opts-visitor.c qapi, qemu-options: make all parsing visitors parse boolean options the same 2020-11-04 12:00:40 -05:00
pci.json qapi: Normalize version references x.y.0 to just x.y 2020-12-10 17:16:44 +01:00
pragma.json
qapi-clone-visitor.c
qapi-dealloc-visitor.c
qapi-schema.json
qapi-util.c qapi, qemu-options: make all parsing visitors parse boolean options the same 2020-11-04 12:00:40 -05:00
qapi-visit-core.c
qdev.json qapi: Normalize version references x.y.0 to just x.y 2020-12-10 17:16:44 +01:00
qmp-dispatch.c remove preconfig state 2020-12-15 12:51:48 -05:00
qmp-event.c
qmp-registry.c
qobject-input-visitor.c qapi, qemu-options: make all parsing visitors parse boolean options the same 2020-11-04 12:00:40 -05:00
qobject-output-visitor.c
qom.json
rdma.json
replay.json
rocker.json
run-state.json vl: Add option to avoid stopping VM upon guest panic 2020-12-15 12:51:58 -05:00
sockets.json sockets: Make abstract UnixSocketAddress depend on CONFIG_LINUX 2020-11-03 13:17:25 +00:00
string-input-visitor.c qapi, qemu-options: make all parsing visitors parse boolean options the same 2020-11-04 12:00:40 -05:00
string-output-visitor.c string-output-visitor: Fix to use sufficient precision 2020-12-19 10:37:16 +01:00
tpm.json
trace-events
trace.h
trace.json
transaction.json
ui.json qapi: Normalize version references x.y.0 to just x.y 2020-12-10 17:16:44 +01:00