Commit 5211333b authored by Anthony Liguori's avatar Anthony Liguori
Browse files

Merge remote-tracking branch 'luiz/queue/qmp' into staging



# By Laszlo Ersek (8) and others
# Via Luiz Capitulino
* luiz/queue/qmp:
  scripts/qapi.py: Avoid syntax not supported by Python 2.4
  monitor: print the invalid char in error message
  OptsVisitor: introduce unit tests, with test cases for range flattening
  add "test-int128" and "test-bitops" to .gitignore
  OptsVisitor: don't try to flatten overlong integer ranges
  OptsVisitor: opts_type_uint64(): recognize intervals when LM_IN_PROGRESS
  OptsVisitor: rebase opts_type_uint64() to parse_uint_full()
  OptsVisitor: opts_type_int(): recognize intervals when LM_IN_PROGRESS
  OptsVisitor: introduce list modes for interval flattening
  OptsVisitor: introduce basic list modes
  Convert stderr message calling error_get_pretty() to error_report()

Message-id: 1377015041-6567-1-git-send-email-lcapitulino@redhat.com
Signed-off-by: default avatarAnthony Liguori <anthony@codemonkey.ws>
parents 9fe48069 21e0043b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -45,7 +45,10 @@ qemu-bridge-helper
qemu-monitor.texi
vscclient
QMP/qmp-commands.txt
test-bitops
test-coroutine
test-int128
test-opts-visitor
test-qmp-input-visitor
test-qmp-output-visitor
test-string-input-visitor
+2 −2
Original line number Diff line number Diff line
@@ -1125,7 +1125,7 @@ void do_acpitable_option(const QemuOpts *opts)

    acpi_table_add(opts, &err);
    if (err) {
        fprintf(stderr, "Wrong acpi table provided: %s\n",
        error_report("Wrong acpi table provided: %s",
                     error_get_pretty(err));
        error_free(err);
        exit(1);
+3 −2
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include "sysemu/char.h"
#include "qemu/timer.h"
#include "exec/address-spaces.h"
#include "qemu/error-report.h"

//#define DEBUG_SERIAL

@@ -696,7 +697,7 @@ SerialState *serial_init(int base, qemu_irq irq, int baudbase,
    s->chr = chr;
    serial_realize_core(s, &err);
    if (err != NULL) {
        fprintf(stderr, "%s\n", error_get_pretty(err));
        error_report("%s", error_get_pretty(err));
        error_free(err);
        exit(1);
    }
@@ -760,7 +761,7 @@ SerialState *serial_mm_init(MemoryRegion *address_space,

    serial_realize_core(s, &err);
    if (err != NULL) {
        fprintf(stderr, "%s\n", error_get_pretty(err));
        error_report("%s", error_get_pretty(err));
        error_free(err);
        exit(1);
    }
+3 −3
Original line number Diff line number Diff line
@@ -978,7 +978,7 @@ void pc_cpus_init(const char *cpu_model, DeviceState *icc_bridge)
        cpu = pc_new_cpu(cpu_model, x86_cpu_apic_id_from_index(i),
                         icc_bridge, &error);
        if (error) {
            fprintf(stderr, "%s\n", error_get_pretty(error));
            error_report("%s", error_get_pretty(error));
            error_free(error);
            exit(1);
        }
@@ -1096,7 +1096,7 @@ void pc_acpi_init(const char *default_dsdt)

        acpi_table_add(opts, &err);
        if (err) {
            fprintf(stderr, "WARNING: failed to load %s: %s\n", filename,
            error_report("WARNING: failed to load %s: %s", filename,
                         error_get_pretty(err));
            error_free(err);
        }
+6 −0
Original line number Diff line number Diff line
@@ -16,6 +16,12 @@
#include "qapi/visitor.h"
#include "qemu/option.h"

/* Inclusive upper bound on the size of any flattened range. This is a safety
 * (= anti-annoyance) measure; wrong ranges should not cause long startup
 * delays nor exhaust virtual memory.
 */
#define OPTS_VISITOR_RANGE_MAX 65536

typedef struct OptsVisitor OptsVisitor;

/* Contrarily to qemu-option.c::parse_option_number(), OptsVisitor's "int"
Loading