Received: from eggs.gnu.org ([2001:4830:134:3::10]:50010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOuXf-0001qh-NM for qemu-devel@nongnu.org; Thu, 28 Jan 2016 16:55:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOuXa-0005Pe-IJ for qemu-devel@nongnu.org; Thu, 28 Jan 2016 16:55:51 -0500 Received: from roura.ac.upc.edu ([147.83.33.10]:33300 helo=roura.ac.upc.es) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOuXa-0005Pa-6C for qemu-devel@nongnu.org; Thu, 28 Jan 2016 16:55:46 -0500 From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= References: <145401727502.31479.11571397180565966513.stgit@localhost> Date: Thu, 28 Jan 2016 22:55:44 +0100 In-Reply-To: <145401727502.31479.11571397180565966513.stgit@localhost> (=?utf-8?Q?=22Llu=C3=ADs?= Vilanova"'s message of "Thu, 28 Jan 2016 22:41:15 +0100") Message-ID: <87zivptllr.fsf@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC][PATCH v4 0/5] utils: Improve and document error reporting List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Thomas Huth , "Dr . David Alan Gilbert" , Markus Armbruster Please ignore this version; I forgot to fix a typo (fixed in v5). Cheers, Lluis Llu=C3=ADs Vilanova writes: > 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 v4 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > * 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-pp= c'. > Changes in v3 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > * Drop special object 'error_warn' in favour of raw 'error_report()' > [suggested by Markus Armbruster]. > Changes in v2 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > * Split in two patches. > * Explicitly add a warning error object. > Signed-off-by: Llu=C3=ADs Vilanova > --- > Llu=C3=ADs 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 | 33 ++++++++++++++++++ > 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, 155 insertions(+), 74 deletions(-) > To: qemu-devel@nongnu.org > Cc: Stefan Hajnoczi > Cc: Dr. David Alan Gilbert > Cc: Thomas Huth > Cc: Markus Armbruster > Cc: Eric Blake