Skip to content

Clean up use of error_printf()

Markus Armbruster qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest15 patches 5 repliesIn review
  2. v215 patches 4 repliesSuperseded
  3. v115 patches 32 repliesSuperseded

Changes in v3 from the cover letter

* PATCH 03: Replaced by new PATCH 14 [Paolo]
* PATCH 10: Trivial conflict with "[PATCH v7 0/2] log: Make glib logging go through QEMU" resolved.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15qemu-img: Use error_vreport() in error_exit()qemu-img.c+2 -40 replies
2/15block/ssh: Do not report read/write/flush errors to the userblock/ssh.c block/trace-events+16 -250 replies
3/15loader-fit: Wean off error_printf()hw/core/loader-fit.c+36 -260 replies
4/15mips/boston: Report errors with error_report(), not error_printf()hw/mips/boston.c+3 -30 replies
5/15pci: Report fatal errors with error_report(), not error_printf()hw/pci/pci.c+1 -10 replies
6/15hpet: Report warnings with warn_report(), not error_printf()hw/timer/hpet.c+1 -10 replies
7/15vfio: Report warnings with warn_report(), not error_printf()hw/vfio/pci.c+13 -64 replies
8/15s390x/kvm: Report warnings with warn_report(), not error_printf()target/s390x/kvm.c+1 -10 replies
9/15vl: Make -machine $TYPE, help and -accel help print to stdoutvl.c+5 -50 replies
10/15monitor error: Make printf()-like functions return a valueinclude/monitor/monitor.h include/qemu/error-report.h monitor.c +2 more+57 -450 replies
11/15qemu-print: New qemu_printf(), qemu_vprintf() etc.MAINTAINERS include/qemu/qemu-print.h stubs/monitor.c +3 more+70 -00 replies
12/15blockdev: Make -drive format=help print to stdoutblockdev.c+5 -40 replies
13/15char: Make -chardev help print to stdoutchardev/char.c+2 -10 replies
14/15char-pty: Print "char device redirected" message to stdoutchardev/char-pty.c+3 -21 reply
15/15monitor: Simplify how -device/device_add print helpinclude/monitor/monitor.h monitor.c qdev-monitor.c+18 -370 replies

Reviews trailers per patch

14 of 15 patches have a Reviewed-by or Acked-by.

PatchPhilippe Mathieu-DaudéMarcel ApfelbaumThomas HuthCornelia HuckDr. David Alan GilbertEric BlakeMarc-André LureauAlex Williamson
1/15R-b
2/15R-b
3/15R-b
4/15R-b
5/15R-b
6/15
7/15A-b
8/15R-b R-b
9/15R-b
10/15R-b
11/15R-b R-b
12/15R-b T-b
13/15R-b T-b R-b
14/15R-b
15/15R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 8 reviewers.

Read the v3 thread

Cover letter [Qemu-devel] [PATCH v3 00/15] Clean up use of error_printf()

This series cleans up two kinds of error_printf() misuse:

* Errors and warnings should be reported with error_report() and warn_report().

* Help output should be go to stdout, not stderr.

This is obviously for 4.1. If nobody objects, I'll take the whole series through my tree.

Based-on: <[email protected]>

v3:
* PATCH 03: Replaced by new PATCH 14 [Paolo]
* PATCH 10: Trivial conflict with "[PATCH v7 0/2] log: Make glib logging go through QEMU" resolved.

v2:
* PATCH 02: Commit message tweaked, indentation fixed [Eric]
* PATCH 10: Indentation fixed [Marcel]
* PATCH 11: Use-after-free fixed [Patchew]
* PATCH 12: test-util-sockets.c updated along with stubs/monitor.c
* PATCH 14: Commit message typo [Eric]

Markus Armbruster (15):
qemu-img: Use error_vreport() in error_exit() block/ssh: Do not report read/write/flush errors to the user
loader-fit: Wean off error_printf()
mips/boston: Report errors with error_report(), not error_printf()
pci: Report fatal errors with error_report(), not error_printf()
hpet: Report warnings with warn_report(), not error_printf()
vfio: Report warnings with warn_report(), not error_printf() s390x/kvm: Report warnings with warn_report(), not error_printf()
vl: Make -machine $TYPE,help and -accel help print to stdout monitor error: Make printf()-like functions return a value
qemu-print: New qemu_printf(), qemu_vprintf() etc.
blockdev: Make -drive format=help print to stdout
char: Make -chardev help print to stdout
char-pty: Print "char device redirected" message to stdout
monitor: Simplify how -device/device_add print help

 MAINTAINERS                 |  2 ++
 block/ssh.c                 | 38 +++++++-------------
 block/trace-events          |  3 ++
 blockdev.c                  |  9 ++---
 chardev/char-pty.c          |  5 +--
 chardev/char.c              |  3 +-
 hw/core/loader-fit.c        | 62 +++++++++++++++++++--------------
 hw/mips/boston.c            |  6 ++--
 hw/pci/pci.c                |  2 +-
 hw/timer/hpet.c             |  2 +-
 hw/vfio/pci.c               | 19 ++++++----
 include/monitor/monitor.h   |  7 ++--
 include/qemu/error-report.h |  8 ++---
 include/qemu/qemu-print.h   | 19 ++++++++++
 monitor.c                   | 69 ++++++++++++++++++-------------------
 qdev-monitor.c              | 36 ++++++++-----------
 qemu-img.c                  |  6 ++--
 stubs/error-printf.c        | 13 ++++---
 stubs/monitor.c             |  5 +++
 target/s390x/kvm.c          |  2 +-
 tests/test-util-sockets.c   |  1 +
 util/Makefile.objs          |  1 +
 util/qemu-error.c           | 12 ++++---
 util/qemu-print.c           | 42 ++++++++++++++++++++++
 vl.c                        | 10 +++---
 25 files changed, 227 insertions(+), 155 deletions(-)
 create mode 100644 include/qemu/qemu-print.h
 create mode 100644 util/qemu-print.c
Signature · 1 line
2.17.2