qemu-patch-raspberry4/hw/s390x
Markus Armbruster 193227f9e5 error: Use error_report_err() instead of monitor_printf()
Both error_report_err() and monitor_printf() print to the same
destination when monitor_printf() is used correctly, i.e. within an
HMP monitor.  Elsewhere, monitor_printf() does nothing, while
error_report_err() reports to stderr.

Most changed functions are HMP command handlers.  These should only
run within an HMP monitor.  The one exception is bdrv_password_cb(),
which should also only run within an HMP monitor.

Four command handlers prefix the error message with the command name:
balloon, migrate_set_capability, migrate_set_parameter, migrate.
Pointless, drop.

Unlike monitor_printf(), error_report_err() uses the error whole
instead of just its message obtained with error_get_pretty().  This
avoids suppressing its hint (see commit 50b7b00).  Example:

    (qemu) device_add ivshmem,id=666
    Parameter 'id' expects an identifier
    Identifiers consist of letters, digits, '-', '.', '_', starting with a letter.
    Try "help device_add" for more information

The "Identifiers consist of..." line is new with this patch.

Coccinelle semantic patch:

    @@
    expression M, E;
    @@
    -    monitor_printf(M, "%s\n", error_get_pretty(E));
    -    error_free(E);
    +    error_report_err(E);
    @r1@
    expression M, E;
    format F;
    position p;
    @@
    -    monitor_printf(M, "...%@F@\n", error_get_pretty(E));@p
    -    error_free(E);
    +    error_report_err(E);
    @script:python@
	p << r1.p;
    @@
    print "%s:%s:%s: prefix dropped" % (p[0].file, p[0].line, p[0].column)

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <1450452927-8346-4-git-send-email-armbru@redhat.com>
2016-01-13 15:16:16 +01:00
..
css.c hw/s390x: Remove superfluous return statements 2016-01-11 11:39:28 +03:00
css.h s390x/css: Add a callback for when subchannel gets disabled 2015-06-30 09:34:58 +02:00
event-facility.c s390x: set missing parent for hotplug and quiesce events 2015-10-02 13:31:52 +02:00
ipl.c s390x/ipl: switch error reporting to error_setg 2015-11-11 17:21:39 +01:00
ipl.h s390x/ipl: clean up qom definitions and turn into TYPE_DEVICE 2015-11-11 17:21:39 +01:00
Makefile.objs s390x: Create QOM device for s390 storage keys 2015-09-03 12:17:54 +02:00
s390-pci-bus.c hw/s390x: Remove superfluous return statements 2016-01-11 11:39:28 +03:00
s390-pci-bus.h s390x/pci: fix up IOMMU size 2015-12-01 09:57:28 +01:00
s390-pci-inst.c s390x/pci: fix up IOMMU size 2015-12-01 09:57:28 +01:00
s390-pci-inst.h s390x/kvm: Support access register mode for KVM_S390_MEM_OP ioctl 2015-04-30 13:21:42 +02:00
s390-skeys-kvm.c s390x: Create QOM device for s390 storage keys 2015-09-03 12:17:54 +02:00
s390-skeys.c error: Use error_report_err() instead of monitor_printf() 2016-01-13 15:16:16 +01:00
s390-virtio-bus.c hw/s390x/s390-virtio-bus: Remove meaningless blank Property 2015-09-11 10:59:47 +03:00
s390-virtio-bus.h virtio: move host_features 2015-05-31 16:27:18 +02:00
s390-virtio-ccw.c s390x: switch to memory_region_allocate_system_memory 2015-11-11 17:21:39 +01:00
s390-virtio-hcall.c s390x/virtio-hcall: Specification exception for illegal subcodes 2014-02-27 09:51:25 +01:00
s390-virtio.c s390x: no deprecation warning while testing 2015-12-01 09:57:27 +01:00
s390-virtio.h s390x: machine reset function with new ipl cpu handling 2015-10-21 12:21:30 +02:00
sclp.c Fix bad error handling after memory_region_init_ram() 2015-09-18 14:39:29 +02:00
sclpcpu.c s390/sclp: replace sclp event types with proper defines 2015-09-07 16:10:43 +02:00
sclpquiesce.c s390/sclp: replace sclp event types with proper defines 2015-09-07 16:10:43 +02:00
virtio-ccw.c virtio: handle non-virtio-1-capable backend for ccw 2015-12-02 19:34:11 +02:00
virtio-ccw.h 9pfs: introduce V9fsVirtioState 2016-01-12 11:04:14 +05:30