unicorn/qemu
Markus Armbruster 741783073f
qapi: Simplify error reporting for array types
check_type() first checks and peels off the array type, then checks
the element type. For two out of four error messages, it takes pains
to report errors for "array of T" instead of just T. Odd. Let's
examine the errors.

* Unknown element type, e.g.
tests/qapi-schema/args-array-unknown.json:

Member 'array' of 'data' for command 'oops' uses unknown type
'array of NoSuchType'

To make sense of this, you need to know that 'array of NoSuchType'
refers to '[NoSuchType]'. Easy enough. However, simply reporting

Member 'array' of 'data' for command 'oops' uses unknown type
'NoSuchType'

is at least as easy to understand.

* Element type's meta-type is inadmissible, e.g.
tests/qapi-schema/returns-whitelist.json:

'returns' for command 'no-way-this-will-get-whitelisted' cannot
use built-in type 'array of int'

'array of int' is technically not a built-in type, but that's
pedantry. However, simply reporting

'returns' for command 'no-way-this-will-get-whitelisted' cannot
use built-in type 'int'

avoids the issue, and is at least as easy to understand.

* The remaining two errors are unreachable, because the array checking
ensures that value is a string.

Thus, reporting some errors for "array of T" instead of just T works,
but doesn't really improve things. Drop it.

Backports commit eddf817bd823a90df209dfbdc2a0b2ec33b7cb77 from qemu
2018-02-19 16:31:44 -05:00
..
crypto crypto: Clean up includes 2018-02-19 00:47:40 -05:00
default-configs
docs docs: clarify memory region lifecycle 2018-02-12 15:11:21 -05:00
fpu all: Clean up includes 2018-02-19 01:34:28 -05:00
hw x86: Clean up includes 2018-02-19 01:00:09 -05:00
include qom: Make enum string tables const-correct 2018-02-19 16:02:23 -05:00
qapi qom: Make enum string tables const-correct 2018-02-19 16:02:23 -05:00
qobject qobject: Clean up includes 2018-02-19 01:30:42 -05:00
qom qom: Clean up includes 2018-02-19 01:31:35 -05:00
scripts qapi: Simplify error reporting for array types 2018-02-19 16:31:44 -05:00
target-arm tcg: Remove lingering references to gen_opc_buf 2018-02-19 01:42:55 -05:00
target-i386 tcg: Remove lingering references to gen_opc_buf 2018-02-19 01:42:55 -05:00
target-m68k m68k: Clean up includes 2018-02-19 01:06:05 -05:00
target-mips mips: Clean up includes 2018-02-19 00:45:08 -05:00
target-sparc sparc: Clean up includes 2018-02-19 00:52:41 -05:00
tcg tcg: Introduce temp_load 2018-02-19 11:44:01 -05:00
util util: Clean up includes 2018-02-19 01:27:55 -05:00
aarch64.h target-arm: Implement cpu_get_phys_page_attrs_debug 2018-02-18 22:15:50 -05:00
aarch64eb.h target-arm: Implement cpu_get_phys_page_attrs_debug 2018-02-18 22:15:50 -05:00
accel.c all: Clean up includes 2018-02-19 01:34:28 -05:00
arm.h target-arm: Implement cpu_get_phys_page_attrs_debug 2018-02-18 22:15:50 -05:00
armeb.h target-arm: Implement cpu_get_phys_page_attrs_debug 2018-02-18 22:15:50 -05:00
CODING_STYLE
configure
COPYING
COPYING.LIB
cpu-exec-common.c exec: Clean up includes 2018-02-19 00:49:55 -05:00
cpu-exec.c exec: Clean up includes 2018-02-19 00:49:55 -05:00
cpus.c exec: Clean up includes 2018-02-19 00:49:55 -05:00
cputlb.c exec: Clean up includes 2018-02-19 00:49:55 -05:00
exec.c exec: Clean up includes 2018-02-19 00:49:55 -05:00
gen_all_header.sh
glib_compat.c crypto: introduce new module for computing hash digests 2018-02-17 15:23:17 -05:00
HACKING
header_gen.py target-arm: Implement cpu_get_phys_page_attrs_debug 2018-02-18 22:15:50 -05:00
ioport.c all: Clean up includes 2018-02-19 01:34:28 -05:00
LICENSE
m68k.h target-arm: Implement cpu_get_phys_page_attrs_debug 2018-02-18 22:15:50 -05:00
Makefile qapi: Turn generators' mandatory option -i into an argument 2018-02-19 15:22:27 -05:00
Makefile.objs crypto: move crypto objects out of libqemuutil.la 2018-02-17 15:23:50 -05:00
Makefile.target tcg: split tcg_op_defs to -common 2018-02-17 15:23:51 -05:00
memory_mapping.c all: Clean up includes 2018-02-19 01:34:28 -05:00
memory.c memory: Silence unused variable warning 2018-02-18 17:52:03 -05:00
mips64.h target-arm: Implement cpu_get_phys_page_attrs_debug 2018-02-18 22:15:50 -05:00
mips64el.h target-arm: Implement cpu_get_phys_page_attrs_debug 2018-02-18 22:15:50 -05:00
mips.h target-arm: Implement cpu_get_phys_page_attrs_debug 2018-02-18 22:15:50 -05:00
mipsel.h target-arm: Implement cpu_get_phys_page_attrs_debug 2018-02-18 22:15:50 -05:00
powerpc.h target-arm: Implement cpu_get_phys_page_attrs_debug 2018-02-18 22:15:50 -05:00
qapi-schema.json qapi: Use 'struct' instead of 'type' in schema 2018-02-19 14:22:13 -05:00
qemu-log.c all: Clean up includes 2018-02-19 01:34:28 -05:00
qemu-timer.c all: Clean up includes 2018-02-19 01:34:28 -05:00
rules.mak
softmmu_template.h exec.c: Pass MemTxAttrs to iotlb_to_region so it uses the right AS 2018-02-17 23:19:00 -05:00
sparc64.h target-arm: Implement cpu_get_phys_page_attrs_debug 2018-02-18 22:15:50 -05:00
sparc.h target-arm: Implement cpu_get_phys_page_attrs_debug 2018-02-18 22:15:50 -05:00
tcg-runtime.c all: Clean up includes 2018-02-19 01:34:28 -05:00
translate-all.c all: Clean up includes 2018-02-19 01:34:28 -05:00
translate-all.h translate-all: remove unnecessary argument to tb_invalidate_phys_range 2018-02-13 09:04:51 -05:00
translate-common.c exec: Clean up includes 2018-02-19 00:49:55 -05:00
unicorn_common.h qom/cpu: Add MemoryRegion property 2018-02-18 21:54:50 -05:00
VERSION
vl.c vl.c: Remove periods and exclamation points from error messages 2018-02-17 15:24:14 -05:00
vl.h
x86_64.h target-arm: Implement cpu_get_phys_page_attrs_debug 2018-02-18 22:15:50 -05:00