qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 0a6077: qapi: [trivial] Break long command li


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 0a6077: qapi: [trivial] Break long command lines
Date: Fri, 09 May 2014 09:00:08 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 0a60774906671391f1e9eb0e1af4bcb453688013
      
https://github.com/qemu/qemu/commit/0a60774906671391f1e9eb0e1af4bcb453688013
  Author: Lluís Vilanova <address@hidden>
  Date:   2014-05-08 (Thu, 08 May 2014)

  Changed paths:
    M Makefile
    M tests/Makefile

  Log Message:
  -----------
  qapi: [trivial] Break long command lines

Signed-off-by: Lluís Vilanova <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 98c1200af149b5aa6d63d5aad5354fd5d888a8bf
      
https://github.com/qemu/qemu/commit/98c1200af149b5aa6d63d5aad5354fd5d888a8bf
  Author: Lluís Vilanova <address@hidden>
  Date:   2014-05-08 (Thu, 08 May 2014)

  Changed paths:
    M tests/qapi-schema/test-qapi.py

  Log Message:
  -----------
  qapi: [trivial] Do not catch unknown exceptions in "test-qapi.py"

Signed-off-by: Lluís Vilanova <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 33aaad529e7391a9ddc73682415e900950553200
      
https://github.com/qemu/qemu/commit/33aaad529e7391a9ddc73682415e900950553200
  Author: Lluís Vilanova <address@hidden>
  Date:   2014-05-08 (Thu, 08 May 2014)

  Changed paths:
    M Makefile
    M docs/qapi-code-gen.txt
    M scripts/qapi-commands.py
    M scripts/qapi-types.py
    M scripts/qapi-visit.py
    M scripts/qapi.py
    M tests/Makefile
    M tests/qapi-schema/duplicate-key.err
    M tests/qapi-schema/flat-union-invalid-branch-key.err
    M tests/qapi-schema/flat-union-invalid-discriminator.err
    M tests/qapi-schema/flat-union-no-base.err
    M tests/qapi-schema/flat-union-string-discriminator.err
    M tests/qapi-schema/funny-char.err
    M tests/qapi-schema/missing-colon.err
    M tests/qapi-schema/missing-comma-list.err
    M tests/qapi-schema/missing-comma-object.err
    M tests/qapi-schema/non-objects.err
    M tests/qapi-schema/quoted-structural-chars.err
    M tests/qapi-schema/test-qapi.py
    M tests/qapi-schema/trailing-comma-list.err
    M tests/qapi-schema/trailing-comma-object.err
    M tests/qapi-schema/unclosed-list.err
    M tests/qapi-schema/unclosed-object.err
    M tests/qapi-schema/unclosed-string.err
    M tests/qapi-schema/union-invalid-base.err

  Log Message:
  -----------
  qapi: Use an explicit input file

Use an explicit input file on the command-line instead of reading from standard
input.

It also outputs the proper file name when there's an error.

Signed-off-by: Lluís Vilanova <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: a719a27c824ea5e70f5bf6f3c8d13a8c1d6b1bfe
      
https://github.com/qemu/qemu/commit/a719a27c824ea5e70f5bf6f3c8d13a8c1d6b1bfe
  Author: Lluís Vilanova <address@hidden>
  Date:   2014-05-08 (Thu, 08 May 2014)

  Changed paths:
    M docs/qapi-code-gen.txt
    M scripts/qapi.py
    M tests/Makefile
    A tests/qapi-schema/include-before-err.err
    A tests/qapi-schema/include-before-err.exit
    A tests/qapi-schema/include-before-err.json
    A tests/qapi-schema/include-before-err.out
    A tests/qapi-schema/include-cycle-b.json
    A tests/qapi-schema/include-cycle-c.json
    A tests/qapi-schema/include-cycle.err
    A tests/qapi-schema/include-cycle.exit
    A tests/qapi-schema/include-cycle.json
    A tests/qapi-schema/include-cycle.out
    A tests/qapi-schema/include-format-err.err
    A tests/qapi-schema/include-format-err.exit
    A tests/qapi-schema/include-format-err.json
    A tests/qapi-schema/include-format-err.out
    A tests/qapi-schema/include-nested-err.err
    A tests/qapi-schema/include-nested-err.exit
    A tests/qapi-schema/include-nested-err.json
    A tests/qapi-schema/include-nested-err.out
    A tests/qapi-schema/include-no-file.err
    A tests/qapi-schema/include-no-file.exit
    A tests/qapi-schema/include-no-file.json
    A tests/qapi-schema/include-no-file.out
    A tests/qapi-schema/include-non-file.err
    A tests/qapi-schema/include-non-file.exit
    A tests/qapi-schema/include-non-file.json
    A tests/qapi-schema/include-non-file.out
    A tests/qapi-schema/include-relpath-sub.json
    A tests/qapi-schema/include-relpath.err
    A tests/qapi-schema/include-relpath.exit
    A tests/qapi-schema/include-relpath.json
    A tests/qapi-schema/include-relpath.out
    A tests/qapi-schema/include-self-cycle.err
    A tests/qapi-schema/include-self-cycle.exit
    A tests/qapi-schema/include-self-cycle.json
    A tests/qapi-schema/include-self-cycle.out
    A tests/qapi-schema/include-simple-sub.json
    A tests/qapi-schema/include-simple.err
    A tests/qapi-schema/include-simple.exit
    A tests/qapi-schema/include-simple.json
    A tests/qapi-schema/include-simple.out
    A tests/qapi-schema/include/relpath.json

  Log Message:
  -----------
  qapi: Add a primitive to include other files from a QAPI schema file

The primitive uses JSON syntax, and include paths are relative to the file 
using the directive:

  { 'include': 'path/to/file.json' }

Signed-off-by: Lluís Vilanova <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: cb45de6798956975c4b13a6233f7a00d2239b61a
      
https://github.com/qemu/qemu/commit/cb45de6798956975c4b13a6233f7a00d2239b61a
  Author: Amos Kong <address@hidden>
  Date:   2014-05-08 (Thu, 08 May 2014)

  Changed paths:
    M qapi/opts-visitor.c

  Log Message:
  -----------
  qapi: treat all negative return of strtosz_suffix() as error

strtosz_suffix() might return negative error, this patch fixes
the error handling.

This patch also changes to handle error in the if statement
rather than handle success specially, this will make this use
of strtosz_suffix consistent with all other uses.

Signed-off-by: Amos Kong <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: e9c5c1f40c949c5d2d7e1eeddf3caaed32e1c641
      
https://github.com/qemu/qemu/commit/e9c5c1f40c949c5d2d7e1eeddf3caaed32e1c641
  Author: Laszlo Ersek <address@hidden>
  Date:   2014-05-08 (Thu, 08 May 2014)

  Changed paths:
    M util/cutils.c

  Log Message:
  -----------
  cutils: tighten qemu_parse_fd()

qemu_parse_fd() used to handle at least the following strings incorrectly:
o "-2":         simply let through
o "2147483648": returned as LONG_MAX==INT_MAX on ILP32 (with ERANGE
          ignored); implementation-defined behavior on LP64

Signed-off-by: Laszlo Ersek <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 5906366ef0474691e9cfd9aa54a525d43bd2df43
      
https://github.com/qemu/qemu/commit/5906366ef0474691e9cfd9aa54a525d43bd2df43
  Author: Laszlo Ersek <address@hidden>
  Date:   2014-05-08 (Thu, 08 May 2014)

  Changed paths:
    M include/monitor/monitor.h
    M monitor.c

  Log Message:
  -----------
  monitor: add Error-propagating monitor_handle_fd_param2()

and rebase monitor_handle_fd_param() to it. (Note that this will slightly
change the behavior when the qemu_parse_fd() branch is selected and it
fails: we now report (and in case of QMP, set) the error immediately,
rather than allowing the caller to set its own error message (if any)).

Signed-off-by: Laszlo Ersek <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: cf10a5b18f4eb25004cffde15c770dadaa3c4bde
      
https://github.com/qemu/qemu/commit/cf10a5b18f4eb25004cffde15c770dadaa3c4bde
  Author: Laszlo Ersek <address@hidden>
  Date:   2014-05-08 (Thu, 08 May 2014)

  Changed paths:
    M hw/i386/kvm/pci-assign.c

  Log Message:
  -----------
  pci-assign: accept Error from monitor_handle_fd_param2()

Propagate any errors in monitor fd handling up to get_real_device(), and
report them there. We'll continue the propagation upwards when
get_real_device() becomes a leaf itself (when none of its callees will
report errors internally any longer when detecting and returning an
error).

Signed-off-by: Laszlo Ersek <address@hidden>
eviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 4951013ff58a87e7f74393c6c6c2f964ee59de47
      
https://github.com/qemu/qemu/commit/4951013ff58a87e7f74393c6c6c2f964ee59de47
  Author: Laszlo Ersek <address@hidden>
  Date:   2014-05-08 (Thu, 08 May 2014)

  Changed paths:
    M hw/i386/kvm/pci-assign.c

  Log Message:
  -----------
  pci-assign: make assign_failed_examine() just format the cause

This allows us to report the entire error with one error_report() call,
easing future error propagation.

Signed-off-by: Laszlo Ersek <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: bcdcf75d6230fcd5a8a6578c5cf15e7c643328e8
      
https://github.com/qemu/qemu/commit/bcdcf75d6230fcd5a8a6578c5cf15e7c643328e8
  Author: Laszlo Ersek <address@hidden>
  Date:   2014-05-08 (Thu, 08 May 2014)

  Changed paths:
    M hw/i386/kvm/pci-assign.c

  Log Message:
  -----------
  pci-assign: propagate errors from get_real_id()

get_real_id() has two thin wrappers (and no other callers),
get_real_vendor_id() and get_real_device_id(); it's easiest to convert
them in one fell swoop.

Signed-off-by: Laszlo Ersek <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 665f119fbad97c05c2603673ac6b2dcbf0d0e9e1
      
https://github.com/qemu/qemu/commit/665f119fbad97c05c2603673ac6b2dcbf0d0e9e1
  Author: Laszlo Ersek <address@hidden>
  Date:   2014-05-08 (Thu, 08 May 2014)

  Changed paths:
    M hw/i386/kvm/pci-assign.c

  Log Message:
  -----------
  pci-assign: propagate Error from check_irqchip_in_kernel()

Rename check_irqchip_in_kernel() to verify_irqchip_in_kernel(), so that
the name reflects our expectation better. Rather than returning a bool,
make it do nothing or set an Error.

Signed-off-by: Laszlo Ersek <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: cd9aa33e2cab11fb89071dc2f48550431406e524
      
https://github.com/qemu/qemu/commit/cd9aa33e2cab11fb89071dc2f48550431406e524
  Author: Laszlo Ersek <address@hidden>
  Date:   2014-05-08 (Thu, 08 May 2014)

  Changed paths:
    M hw/pci/pci.c
    M include/hw/pci/pci.h

  Log Message:
  -----------
  pci: add Error-propagating pci_add_capability2()

... and rebase pci_add_capability() to it.

Signed-off-by: Laszlo Ersek <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 42ee4194f2ac7ff16f8e5cb7900c7d35d483f974
      
https://github.com/qemu/qemu/commit/42ee4194f2ac7ff16f8e5cb7900c7d35d483f974
  Author: Laszlo Ersek <address@hidden>
  Date:   2014-05-08 (Thu, 08 May 2014)

  Changed paths:
    M hw/i386/kvm/pci-assign.c

  Log Message:
  -----------
  pci-assign: accept Error from pci_add_capability2()

Propagate any errors while adding PCI capabilities to
assigned_device_pci_cap_init(). We'll continue the propagation upwards
when assigned_device_pci_cap_init() becomes a leaf itself (when none of
its callees will report errors internally any longer when detecting and
returning them).

Signed-off-by: Laszlo Ersek <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: f3455d47046f604f1ca7353dd519ea2d2e5fa798
      
https://github.com/qemu/qemu/commit/f3455d47046f604f1ca7353dd519ea2d2e5fa798
  Author: Laszlo Ersek <address@hidden>
  Date:   2014-05-08 (Thu, 08 May 2014)

  Changed paths:
    M hw/i386/kvm/pci-assign.c

  Log Message:
  -----------
  pci-assign: assignment should fail if we can't read config space

assigned_initfn()
  get_real_device()
    read()

Signed-off-by: Laszlo Ersek <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 5b877045d31e25aaf089f595c6a3fe8aedb8539a
      
https://github.com/qemu/qemu/commit/5b877045d31e25aaf089f595c6a3fe8aedb8539a
  Author: Laszlo Ersek <address@hidden>
  Date:   2014-05-08 (Thu, 08 May 2014)

  Changed paths:
    M hw/i386/kvm/pci-assign.c

  Log Message:
  -----------
  pci-assign: propagate errors from get_real_device()

Signed-off-by: Laszlo Ersek <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 64135217a75ac6c4e672ed67cb8fee7a4c16ada4
      
https://github.com/qemu/qemu/commit/64135217a75ac6c4e672ed67cb8fee7a4c16ada4
  Author: Laszlo Ersek <address@hidden>
  Date:   2014-05-08 (Thu, 08 May 2014)

  Changed paths:
    M hw/i386/kvm/pci-assign.c

  Log Message:
  -----------
  pci-assign: propagate errors from assigned_device_pci_cap_init()

Signed-off-by: Laszlo Ersek <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 7a98593b34d3e19d77c43a69dd47f2387250d67d
      
https://github.com/qemu/qemu/commit/7a98593b34d3e19d77c43a69dd47f2387250d67d
  Author: Laszlo Ersek <address@hidden>
  Date:   2014-05-08 (Thu, 08 May 2014)

  Changed paths:
    M hw/i386/kvm/pci-assign.c

  Log Message:
  -----------
  pci-assign: propagate errors from assigned_dev_register_msix_mmio()

The return type is also changed from "int" to "void", because it was used
in a success vs. failure sense only (the caller didn't distinguish error
codes from each other, and even assigned_dev_register_msix_mmio() masked
mmap()'s errno values with a common -EFAULT).

Signed-off-by: Laszlo Ersek <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 7d9cb533f5a475c3d87b8c7c3fd65b2b6530cdac
      
https://github.com/qemu/qemu/commit/7d9cb533f5a475c3d87b8c7c3fd65b2b6530cdac
  Author: Laszlo Ersek <address@hidden>
  Date:   2014-05-08 (Thu, 08 May 2014)

  Changed paths:
    M hw/i386/kvm/pci-assign.c

  Log Message:
  -----------
  pci-assign: propagate errors from assigned_dev_register_regions()

Signed-off-by: Laszlo Ersek <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 6877cff044cdf6da66885eab62363baf98bb39ee
      
https://github.com/qemu/qemu/commit/6877cff044cdf6da66885eab62363baf98bb39ee
  Author: Laszlo Ersek <address@hidden>
  Date:   2014-05-08 (Thu, 08 May 2014)

  Changed paths:
    M hw/i386/kvm/pci-assign.c

  Log Message:
  -----------
  pci-assign: propagate errors from assign_device()

Also, change the return type to "void"; the function is static (with a
sole caller) and the negative errno values are not distinguished from each
other.

Signed-off-by: Laszlo Ersek <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: ef47827ac4da5217243e1fec7ec75c1924eb4f40
      
https://github.com/qemu/qemu/commit/ef47827ac4da5217243e1fec7ec75c1924eb4f40
  Author: Laszlo Ersek <address@hidden>
  Date:   2014-05-08 (Thu, 08 May 2014)

  Changed paths:
    M hw/i386/kvm/pci-assign.c

  Log Message:
  -----------
  pci-assign: propagate errors from assign_intx()

Among the callers, only assigned_initfn() should set the  monitor's stored
error. Other callers may run in contexts where the monitor's stored error
makes no sense. For example:

assigned_dev_pci_write_config()
  assigned_dev_update_msix()
    assign_intx()

Signed-off-by: Laszlo Ersek <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 636713bad4240836947c04c26e1cd001d3bcbff1
      
https://github.com/qemu/qemu/commit/636713bad4240836947c04c26e1cd001d3bcbff1
  Author: Laszlo Ersek <address@hidden>
  Date:   2014-05-08 (Thu, 08 May 2014)

  Changed paths:
    M hw/i386/kvm/pci-assign.c

  Log Message:
  -----------
  pci-assign: assigned_initfn(): set monitor error in common error handler

Signed-off-by: Laszlo Ersek <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: e940f543ae7606819c9083fdb524e5b85914f032
      
https://github.com/qemu/qemu/commit/e940f543ae7606819c9083fdb524e5b85914f032
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-08 (Thu, 08 May 2014)

  Changed paths:
    M docs/writing-qmp-commands.txt
    M hmp.c
    M include/qapi/qmp/dispatch.h
    M qapi/qmp-dispatch.c
    M tests/test-qmp-input-strict.c
    M tests/test-qmp-input-visitor.c
    M tests/test-qmp-output-visitor.c
    M tests/test-string-input-visitor.c
    M tests/test-string-output-visitor.c

  Log Message:
  -----------
  qmp hmp: Consistently name Error * objects err, and not errp

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 77dbc81b0ffe5f2ce403984fc179f3ed44ac7459
      
https://github.com/qemu/qemu/commit/77dbc81b0ffe5f2ce403984fc179f3ed44ac7459
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-09 (Fri, 09 May 2014)

  Changed paths:
    M qga/commands-posix.c
    M qga/commands-win32.c
    M qga/commands.c
    M qga/vss-win32.c
    M qga/vss-win32.h

  Log Message:
  -----------
  qga: Consistently name Error ** objects errp, and not err

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 7daecb30656660610980b83ef71180bc844e1dab
      
https://github.com/qemu/qemu/commit/7daecb30656660610980b83ef71180bc844e1dab
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-09 (Fri, 09 May 2014)

  Changed paths:
    M qmp.c

  Log Message:
  -----------
  qmp: Consistently name Error ** objects errp, and not err

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 64dfefed169465c5d0fc20fda7b06104406e390c
      
https://github.com/qemu/qemu/commit/64dfefed169465c5d0fc20fda7b06104406e390c
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-09 (Fri, 09 May 2014)

  Changed paths:
    M include/qapi/error.h
    M util/error.c

  Log Message:
  -----------
  error: Consistently name Error ** objects errp, and not err

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: a903f40c314c57734ffd651786c953541cfc43a8
      
https://github.com/qemu/qemu/commit/a903f40c314c57734ffd651786c953541cfc43a8
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-09 (Fri, 09 May 2014)

  Changed paths:
    M qga/commands-posix.c
    M qga/main.c

  Log Message:
  -----------
  qga: Use return values instead of error_is_set(errp)

Using error_is_set(errp) to check whether a function call failed is
fragile: it breaks when errp is null.  ga_get_fd_handle() and
guest_file_handle_add() don't return a useful value when they fail,
but that's just stupid.  Fix that, and check them instead.  As far
as I can tell, errp can't be null there, but this is more robust and
more obviously correct.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Michael Roth <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 415168e0c7bda5371a876914d4fdb68c4556f28d
      
https://github.com/qemu/qemu/commit/415168e0c7bda5371a876914d4fdb68c4556f28d
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-09 (Fri, 09 May 2014)

  Changed paths:
    M hmp.c

  Log Message:
  -----------
  hmp: Guard against misuse of hmp_handle_error()

Null errp argument makes no sense.  Assert it's not null, to make this
explicit, and guard against misuse.  All current callers pass non-null
errp.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 4af8be1f88dc32447e085469461d02859ca5f2fc
      
https://github.com/qemu/qemu/commit/4af8be1f88dc32447e085469461d02859ca5f2fc
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-09 (Fri, 09 May 2014)

  Changed paths:
    M qapi/qmp-dispatch.c

  Log Message:
  -----------
  qapi: Drop redundant, unclean error_is_set()

do_qmp_dispatch()'s test for qmp_dispatch_check_obj() failure examines
both the return value and the error object.  The latter part is
unclean; it works only when do_qmp_dispatch()'s caller passes a
non-null errp argument.  That's the case, but it's not locally
obvious.  Unclean.

Cleanup would be easy enough, but since the unclean code is also
redundant, let's just drop it.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Michael Roth <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 196857f8bfd2d34a170c3de808dc44bd6da22f4a
      
https://github.com/qemu/qemu/commit/196857f8bfd2d34a170c3de808dc44bd6da22f4a
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-09 (Fri, 09 May 2014)

  Changed paths:
    M tests/test-qmp-input-visitor.c

  Log Message:
  -----------
  tests/qapi-schema: Drop superfluous error_is_set()

visit_type_TestStruct() does nothing when called with an error set.
Callers shouldn't do that, and no caller does.  Drop the superfluous
test.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Michael Roth <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: ee16ce93373dda1faa4aa1bb4d99bcdf158f7d7a
      
https://github.com/qemu/qemu/commit/ee16ce93373dda1faa4aa1bb4d99bcdf158f7d7a
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-09 (Fri, 09 May 2014)

  Changed paths:
    M qapi/qmp-dispatch.c

  Log Message:
  -----------
  qapi: Clean up fragile use of error_is_set()

Using error_is_set(ERRP) to find out whether a function failed is
either wrong, fragile, or unnecessarily opaque.  It's wrong when ERRP
may be null, because errors go undetected when it is.  It's fragile
when proving ERRP non-null involves a non-local argument.  Else, it's
unnecessarily opaque (see commit 84d18f0).

The error_is_set(errp) in do_qmp_dispatch() is merely fragile, because
the caller never passes a null errp argument.

Make the code more robust and more obviously correct: receive the
error in a local variable, then propagate it through the parameter.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Michael Roth <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 0f230bf70eb9d74fe87df2a44bc7a69ed01ecbe3
      
https://github.com/qemu/qemu/commit/0f230bf70eb9d74fe87df2a44bc7a69ed01ecbe3
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-09 (Fri, 09 May 2014)

  Changed paths:
    M qga/commands-posix.c
    M qga/commands-win32.c

  Log Message:
  -----------
  qga: Clean up fragile use of error_is_set()

Using error_is_set(ERRP) to find out whether a function failed is
either wrong, fragile, or unnecessarily opaque.  It's wrong when ERRP
may be null, because errors go undetected when it is.  It's fragile
when proving ERRP non-null involves a non-local argument.  Else, it's
unnecessarily opaque (see commit 84d18f0).

The error_is_set(errp) in the guest agent command handler functions
are merely fragile, because all chall chains (do_qmp_dispatch() via
the generated marshalling functions) pass a non-null errp argument.

Make the code more robust and more obviously correct: receive the
error in a local variable, then propagate it through the parameter.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Michael Roth <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 5e54769c921a3d8cd8858444f5a3fa62cc44260e
      
https://github.com/qemu/qemu/commit/5e54769c921a3d8cd8858444f5a3fa62cc44260e
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-09 (Fri, 09 May 2014)

  Changed paths:
    M qga/commands-win32.c

  Log Message:
  -----------
  qga: Drop superfluous error_is_set()

acquire_privilege(), execute_async() and check_suspend_mode() do
nothing when called with an error set.  Callers shouldn't do that, and
no caller does.  Drop the superfluous tests.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Michael Roth <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 2767ceec4ed1d6ac9785d9866c80dc7d674a3631
      
https://github.com/qemu/qemu/commit/2767ceec4ed1d6ac9785d9866c80dc7d674a3631
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-09 (Fri, 09 May 2014)

  Changed paths:
    M util/qemu-option.c

  Log Message:
  -----------
  qemu-option: Clean up fragile use of error_is_set()

Using error_is_set(ERRP) to find out whether to bail out due to
previous error is either wrong, fragile, or unnecessarily opaque.
It's wrong when ERRP may be null, because errors go undetected when it
is.  It's fragile when proving ERRP non-null involves a non-local
argument.  Else, it's unnecessarily opaque (see commit 84d18f0).

The error_is_set(state->errp) in qemu_opts_from_qdict_1() is merely
fragile, because the callers never pass state argument with null
state->errp.

Make the code more robust and more obviously correct: test
*state->errp directly.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 66ef8bd9c16b547c985cbe7468dcf60280c993eb
      
https://github.com/qemu/qemu/commit/66ef8bd9c16b547c985cbe7468dcf60280c993eb
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-09 (Fri, 09 May 2014)

  Changed paths:
    M dump.c

  Log Message:
  -----------
  dump: Drop pointless error_is_set(), DumpState member errp

In qmp_dump_guest_memory(), the error must be clear on entry, and we
always bail out after setting it, directly or via dump_init().
Therefore, both error_is_set() are always false.  Drop them.

DumpState member errp is now write-only.  Drop it, too.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: ab31979a7e835832605f8425d0eaa5c74d1e6375
      
https://github.com/qemu/qemu/commit/ab31979a7e835832605f8425d0eaa5c74d1e6375
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-09 (Fri, 09 May 2014)

  Changed paths:
    M qmp.c

  Log Message:
  -----------
  qmp: Don't use error_is_set() to suppress additional errors

Using error_is_set(errp) that way can sweep programming errors under
the carpet when we get called incorrectly with an error set.

encrypted_bdrv_it() does it, because there's no way to make
bdrv_iterate() break its loop.  Actually safe, because qmp_cont()
clears the error before the loop.  Clean it up anyway: replace
bdrv_iterate() by bdrv_next(), break the loop on error.

Replace both occurrences, for consistency.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: cd0c5389ddb7d0bb7005f993be1b8ac46a8b88b2
      
https://github.com/qemu/qemu/commit/cd0c5389ddb7d0bb7005f993be1b8ac46a8b88b2
  Author: Eric Blake <address@hidden>
  Date:   2014-05-09 (Fri, 09 May 2014)

  Changed paths:
    M qmp-commands.hx

  Log Message:
  -----------
  qmp: use valid JSON in transaction example

Our example should use the correct quotes to match what someone
could actually pass over the wire.

* qmp-commands.hx: Use correct JSON quotes.

Signed-off-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: cc1626556d264c867a07ebe8672fa06b208e209a
      
https://github.com/qemu/qemu/commit/cc1626556d264c867a07ebe8672fa06b208e209a
  Author: Eric Blake <address@hidden>
  Date:   2014-05-09 (Fri, 09 May 2014)

  Changed paths:
    M docs/qapi-code-gen.txt

  Log Message:
  -----------
  qapi: Document optional arguments' backwards compatibility

Signed-off-by: Eric Blake <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: b690d679c1ca65d71b0544a2331d50e9f0f95116
      
https://github.com/qemu/qemu/commit/b690d679c1ca65d71b0544a2331d50e9f0f95116
  Author: Peter Lieven <address@hidden>
  Date:   2014-05-09 (Fri, 09 May 2014)

  Changed paths:
    M qapi/qapi-dealloc-visitor.c

  Log Message:
  -----------
  Revert "qapi: Clean up superfluous null check in qapi_dealloc_type_str()"

This reverts commit 25a7017555f1b4aeb543b5d323ff4afb8f9c5437.

Turns out the argument *can* be null: QEMU now segfaults if it
receives an invalid parameter via a qmp command instead of throwing an
error.

For example:
{ "execute": "blockdev-add",
     "arguments": { "options" : { "driver": "invalid-driver" } } }

CC: address@hidden
Signed-off-by: Peter Lieven <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 06b4f00d53637f2c16a62c2cbaa30bffb045cf88
      
https://github.com/qemu/qemu/commit/06b4f00d53637f2c16a62c2cbaa30bffb045cf88
  Author: Peter Maydell <address@hidden>
  Date:   2014-05-09 (Fri, 09 May 2014)

  Changed paths:
    M Makefile
    M docs/qapi-code-gen.txt
    M docs/writing-qmp-commands.txt
    M dump.c
    M hmp.c
    M hw/i386/kvm/pci-assign.c
    M hw/pci/pci.c
    M include/hw/pci/pci.h
    M include/monitor/monitor.h
    M include/qapi/error.h
    M include/qapi/qmp/dispatch.h
    M monitor.c
    M qapi/opts-visitor.c
    M qapi/qapi-dealloc-visitor.c
    M qapi/qmp-dispatch.c
    M qga/commands-posix.c
    M qga/commands-win32.c
    M qga/commands.c
    M qga/main.c
    M qga/vss-win32.c
    M qga/vss-win32.h
    M qmp-commands.hx
    M qmp.c
    M scripts/qapi-commands.py
    M scripts/qapi-types.py
    M scripts/qapi-visit.py
    M scripts/qapi.py
    M tests/Makefile
    M tests/qapi-schema/duplicate-key.err
    M tests/qapi-schema/flat-union-invalid-branch-key.err
    M tests/qapi-schema/flat-union-invalid-discriminator.err
    M tests/qapi-schema/flat-union-no-base.err
    M tests/qapi-schema/flat-union-string-discriminator.err
    M tests/qapi-schema/funny-char.err
    A tests/qapi-schema/include-before-err.err
    A tests/qapi-schema/include-before-err.exit
    A tests/qapi-schema/include-before-err.json
    A tests/qapi-schema/include-before-err.out
    A tests/qapi-schema/include-cycle-b.json
    A tests/qapi-schema/include-cycle-c.json
    A tests/qapi-schema/include-cycle.err
    A tests/qapi-schema/include-cycle.exit
    A tests/qapi-schema/include-cycle.json
    A tests/qapi-schema/include-cycle.out
    A tests/qapi-schema/include-format-err.err
    A tests/qapi-schema/include-format-err.exit
    A tests/qapi-schema/include-format-err.json
    A tests/qapi-schema/include-format-err.out
    A tests/qapi-schema/include-nested-err.err
    A tests/qapi-schema/include-nested-err.exit
    A tests/qapi-schema/include-nested-err.json
    A tests/qapi-schema/include-nested-err.out
    A tests/qapi-schema/include-no-file.err
    A tests/qapi-schema/include-no-file.exit
    A tests/qapi-schema/include-no-file.json
    A tests/qapi-schema/include-no-file.out
    A tests/qapi-schema/include-non-file.err
    A tests/qapi-schema/include-non-file.exit
    A tests/qapi-schema/include-non-file.json
    A tests/qapi-schema/include-non-file.out
    A tests/qapi-schema/include-relpath-sub.json
    A tests/qapi-schema/include-relpath.err
    A tests/qapi-schema/include-relpath.exit
    A tests/qapi-schema/include-relpath.json
    A tests/qapi-schema/include-relpath.out
    A tests/qapi-schema/include-self-cycle.err
    A tests/qapi-schema/include-self-cycle.exit
    A tests/qapi-schema/include-self-cycle.json
    A tests/qapi-schema/include-self-cycle.out
    A tests/qapi-schema/include-simple-sub.json
    A tests/qapi-schema/include-simple.err
    A tests/qapi-schema/include-simple.exit
    A tests/qapi-schema/include-simple.json
    A tests/qapi-schema/include-simple.out
    A tests/qapi-schema/include/relpath.json
    M tests/qapi-schema/missing-colon.err
    M tests/qapi-schema/missing-comma-list.err
    M tests/qapi-schema/missing-comma-object.err
    M tests/qapi-schema/non-objects.err
    M tests/qapi-schema/quoted-structural-chars.err
    M tests/qapi-schema/test-qapi.py
    M tests/qapi-schema/trailing-comma-list.err
    M tests/qapi-schema/trailing-comma-object.err
    M tests/qapi-schema/unclosed-list.err
    M tests/qapi-schema/unclosed-object.err
    M tests/qapi-schema/unclosed-string.err
    M tests/qapi-schema/union-invalid-base.err
    M tests/test-qmp-input-strict.c
    M tests/test-qmp-input-visitor.c
    M tests/test-qmp-output-visitor.c
    M tests/test-string-input-visitor.c
    M tests/test-string-output-visitor.c
    M util/cutils.c
    M util/error.c
    M util/qemu-option.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging

* remotes/qmp-unstable/queue/qmp: (38 commits)
  Revert "qapi: Clean up superfluous null check in qapi_dealloc_type_str()"
  qapi: Document optional arguments' backwards compatibility
  qmp: use valid JSON in transaction example
  qmp: Don't use error_is_set() to suppress additional errors
  dump: Drop pointless error_is_set(), DumpState member errp
  qemu-option: Clean up fragile use of error_is_set()
  qga: Drop superfluous error_is_set()
  qga: Clean up fragile use of error_is_set()
  qapi: Clean up fragile use of error_is_set()
  tests/qapi-schema: Drop superfluous error_is_set()
  qapi: Drop redundant, unclean error_is_set()
  hmp: Guard against misuse of hmp_handle_error()
  qga: Use return values instead of error_is_set(errp)
  error: Consistently name Error ** objects errp, and not err
  qmp: Consistently name Error ** objects errp, and not err
  qga: Consistently name Error ** objects errp, and not err
  qmp hmp: Consistently name Error * objects err, and not errp
  pci-assign: assigned_initfn(): set monitor error in common error handler
  pci-assign: propagate errors from assign_intx()
  pci-assign: propagate errors from assign_device()
  ...

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/43cbeffb1987...06b4f00d5363

reply via email to

[Prev in Thread] Current Thread [Next in Thread]