History | View | Annotate | Download (15 kB)
qapi: Add missing null check to opts_start_struct()
Argument is null when visiting an unboxed struct. I can't see such avisit in the current code. Fix it anyway.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>...
OptsVisitor: don't try to flatten overlong integer ranges
Prevent mistyped command line options from incurring high memory and CPUusage at startup. 64K elements in a range should be enough for everyone(TM).
The OPTS_VISITOR_RANGE_MAX macro is public so that unit tests can...
OptsVisitor: introduce basic list modes
We're going to need more state while processing a list of repeatedoptions. This change eliminates "repeated_opts_first" and adds a new statevariable:
list_mode repeated_opts repeated_opts_first -------------- ------------- -------------------...
OptsVisitor: introduce list modes for interval flattening
The new modes are equal-rank, exclusive alternatives of LM_IN_PROGRESS.Teach opts_next_list(), opts_type_int() and opts_type_uint64() to handlethem.
Also enumerate explicitly what functions are valid to call in what modes:...
OptsVisitor: opts_type_int(): recognize intervals when LM_IN_PROGRESS
When a well-formed range value, bounded by signed integers, is encounteredwhile processing a repeated option, enter LM_SIGNED_INTERVAL and returnthe low bound.
Signed-off-by: Laszlo Ersek <lersek@redhat.com>...
OptsVisitor: rebase opts_type_uint64() to parse_uint_full()
Simplify the code in preparation for the next patch.
Signed-off-by: Laszlo Ersek <lersek@redhat.com>Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
OptsVisitor: opts_type_uint64(): recognize intervals when LM_IN_PROGRESS
When a well-formed range value, bounded by unsigned integers, isencountered while processing a repeated option, enter LM_UNSIGNED_INTERVALand return the low bound.
misc: move include files to include/qemu/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qapi: move include files to include/qobject/
qapi: move inclusions of qemu-common.h from headers to .c files
qapi: remove qapi/qapi-types-core.h
The file is only including error.h and qerror.h. Prefer explicitinclusion of whatever files are needed.Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qapi: Fix memory leak
valgrind report:
qapi: introduce OptsVisitor
This visitor supports parsing
-option [type=]discriminator[,optarg1=val1][,optarg2=val2][,...]
style QemuOpts objects into "native" C structures. After defining the typetree in the qapi schema (see below), a root type traversal with this...