qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Lluís Vilanova" <vilanova@ac.upc.edu>
To: qemu-devel@nongnu.org
Cc: Thomas Huth <thuth@redhat.com>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	David Gibson <david@gibson.dropbear.id.au>
Subject: [Qemu-devel] [RFC][PATCH v6 0/5] utils: Improve and document error reporting
Date: Tue,  2 Feb 2016 17:13:53 +0100	[thread overview]
Message-ID: <145442963048.1539.13602468921796488810.stgit@localhost> (raw)

Adds leaner error-reporting functions for simple cases, and documents the
purpose of the different facilities available in QEMU.

Although not all printf+exit/abort are replaced with the proper functions, a few
are ported as an example.


Changes in v6
=============

* Rebase on 074d1cc [David Gibson].
* Fix typo in documentation [Eric Blake].
* Clarify when to use fatal/abort [Eric Blake].


Changes in v5
=============

* Fix typo in documentation [Eric Blake].


Changes in v4
=============

* Introduce 'error_report_fatal()' and 'error_report_abort()' functions
  [suggested by Thomas Huth].
* Repalce all existing uses of 'error_setg(error_fatal)' and
  'error_setg(error_abort)' with 'error_report_fatal()' and
  'error_report_abort()'.
* Replace all uses of 'exit()' with 'error_report_fatal()' in 'target-ppc'.
* Replace all uses of 'abort()' with 'error_report_abort()' in 'target-ppc'.

Changes in v3
=============

* Drop special object 'error_warn' in favour of raw 'error_report()'
  [suggested by Markus Armbruster].


Changes in v2
=============

* Split in two patches.
* Explicitly add a warning error object.


Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
---

Lluís Vilanova (5):
      util: Introduce error reporting functions with fatal/abort
      util: Use new error_report_fatal/abort instead of error_setg(&error_fatal/abort)
      util: [ppc] Use new error_report_fatal() instead of exit()
      util: [ppc] Use new error_report_abort() instead of abort()
      doc: Introduce coding style for errors


 HACKING                     |   37 ++++++++++++++++++++
 hw/block/fdc.c              |    6 ++-
 hw/ppc/spapr.c              |    8 ++--
 hw/ppc/spapr_drc.c          |    2 +
 include/qemu/error-report.h |   19 ++++++++++
 target-ppc/kvm.c            |    9 ++---
 target-ppc/kvm_ppc.h        |   15 +++++---
 target-ppc/mmu-hash32.c     |    5 ++-
 target-ppc/mmu_helper.c     |    3 +-
 target-ppc/translate.c      |    7 ++--
 target-ppc/translate_init.c |   80 +++++++++++++++++++++----------------------
 util/error.c                |    9 ++---
 util/qemu-error.c           |   33 ++++++++++++++++++
 13 files changed, 159 insertions(+), 74 deletions(-)


To: qemu-devel@nongnu.org
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Cc: Eric Blake <eblake@redhat.com>

             reply	other threads:[~2016-02-02 16:14 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-02 16:13 Lluís Vilanova [this message]
2016-02-02 16:13 ` [Qemu-devel] [PATCH v6 1/5] util: Introduce error reporting functions with fatal/abort Lluís Vilanova
2016-02-02 18:53   ` Markus Armbruster
2016-02-02 21:47     ` Thomas Huth
2016-02-03  5:04       ` David Gibson
2016-02-03  9:48         ` Markus Armbruster
2016-02-03  9:58           ` Thomas Huth
2016-02-03 10:38             ` Markus Armbruster
2016-02-03 13:42               ` Lluís Vilanova
2016-02-03 14:34                 ` Markus Armbruster
2016-02-03 15:11                   ` Lluís Vilanova
2016-02-03 18:06                     ` Markus Armbruster
2016-02-03 22:23           ` David Gibson
2016-02-03  7:26       ` Markus Armbruster
2016-02-03 17:59     ` Lluís Vilanova
2016-02-02 16:14 ` [Qemu-devel] [PATCH v6 2/5] util: Use new error_report_fatal/abort instead of error_setg(&error_fatal/abort) Lluís Vilanova
2016-02-02 20:16   ` John Snow
2016-02-02 16:14 ` [Qemu-devel] [PATCH v6 3/5] util: [ppc] Use new error_report_fatal() instead of exit() Lluís Vilanova
2016-02-02 16:14 ` [Qemu-devel] [PATCH v6 4/5] util: [ppc] Use new error_report_abort() instead of abort() Lluís Vilanova
2016-02-02 19:34   ` Eric Blake
2016-02-03  5:06   ` David Gibson
2016-02-02 16:14 ` [Qemu-devel] [PATCH v6 5/5] doc: Introduce coding style for errors Lluís Vilanova
2016-02-02 19:10   ` Markus Armbruster
2016-02-03 13:47     ` Lluís Vilanova
2016-02-03 14:41       ` Markus Armbruster
2016-02-03 15:17         ` Lluís Vilanova
2016-02-03 15:53           ` Markus Armbruster
2016-02-03 16:58   ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=145442963048.1539.13602468921796488810.stgit@localhost \
    --to=vilanova@ac.upc.edu \
    --cc=armbru@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=dgilbert@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).