Re: [Qemu-devel] Coding style for errors

2015-10-28 Thread Thomas Huth
On 23/10/15 19:02, Dr. David Alan Gilbert wrote: > * Stefan Hajnoczi (stefa...@gmail.com) wrote: >> On Thu, Oct 22, 2015 at 03:30:34PM +0200, Lluís Vilanova wrote: >>> Markus Armbruster writes: >>> Lluís Vilanova writes: >>> [...] > So, is there any agreement on what should be used? If so

Re: [Qemu-devel] Coding style for errors

2015-10-26 Thread Stefan Hajnoczi
On Fri, Oct 23, 2015 at 07:34:50PM +0200, Lluís Vilanova wrote: > Stefan Hajnoczi writes: > > > On Thu, Oct 22, 2015 at 03:30:34PM +0200, Lluís Vilanova wrote: > >> Markus Armbruster writes: > >> > >> > Lluís Vilanova writes: > >> [...] > >> >> So, is there any agreement on what should be used?

Re: [Qemu-devel] Coding style for errors

2015-10-23 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Thu, Oct 22, 2015 at 03:30:34PM +0200, Lluís Vilanova wrote: >> Markus Armbruster writes: >> >> > Lluís Vilanova writes: >> [...] >> >> So, is there any agreement on what should be used? If so, could that >> >> please be >> >> added to CODING_STYLE? >> >> > I think

Re: [Qemu-devel] Coding style for errors

2015-10-23 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@gmail.com) wrote: > On Thu, Oct 22, 2015 at 03:30:34PM +0200, Lluís Vilanova wrote: > > Markus Armbruster writes: > > > > > Lluís Vilanova writes: > > [...] > > >> So, is there any agreement on what should be used? If so, could that > > >> please be > > >> added to CO

Re: [Qemu-devel] Coding style for errors

2015-10-23 Thread Laszlo Ersek
On 10/23/15 18:01, Stefan Hajnoczi wrote: > On Thu, Oct 22, 2015 at 03:30:34PM +0200, Lluís Vilanova wrote: >> Markus Armbruster writes: >> >>> Lluís Vilanova writes: >> [...] So, is there any agreement on what should be used? If so, could that please be added to CODING_STYLE? >> >

Re: [Qemu-devel] Coding style for errors

2015-10-23 Thread Stefan Hajnoczi
On Thu, Oct 22, 2015 at 03:30:34PM +0200, Lluís Vilanova wrote: > Markus Armbruster writes: > > > Lluís Vilanova writes: > [...] > >> So, is there any agreement on what should be used? If so, could that > >> please be > >> added to CODING_STYLE? > > > I think HACKING would be a better fit. > >

Re: [Qemu-devel] Coding style for errors

2015-10-22 Thread Lluís Vilanova
Markus Armbruster writes: > Lluís Vilanova writes: [...] >> So, is there any agreement on what should be used? If so, could that please >> be >> added to CODING_STYLE? > I think HACKING would be a better fit. What about this? (at the end of HACKING) Feel free to add references to other functio

Re: [Qemu-devel] Coding style for errors

2015-10-21 Thread Peter Maydell
On 21 October 2015 at 17:48, Markus Armbruster wrote: > Lluís Vilanova writes: > >> Hi, >> >> I was wondering what is the proper way (or ways, depending on the subsystem) >> of >> reporting and signalling errors in QEMU. The coding style file does not seem >> to >> mention it, and the code uses

Re: [Qemu-devel] Coding style for errors

2015-10-21 Thread Lluís Vilanova
Eric Blake writes: > On 10/21/2015 09:03 AM, Lluís Vilanova wrote: >> Hi, >> >> I was wondering what is the proper way (or ways, depending on the subsystem) >> of >> reporting and signalling errors in QEMU. The coding style file does not seem >> to >> mention it, and the code uses all kinds of

Re: [Qemu-devel] Coding style for errors

2015-10-21 Thread Markus Armbruster
Lluís Vilanova writes: > Hi, > > I was wondering what is the proper way (or ways, depending on the subsystem) > of > reporting and signalling errors in QEMU. The coding style file does not seem > to > mention it, and the code uses all kinds of forms for that: > > * printf + exit(1) > * fprintf(

Re: [Qemu-devel] Coding style for errors

2015-10-21 Thread Eric Blake
On 10/21/2015 09:03 AM, Lluís Vilanova wrote: > Hi, > > I was wondering what is the proper way (or ways, depending on the subsystem) > of > reporting and signalling errors in QEMU. The coding style file does not seem > to > mention it, and the code uses all kinds of forms for that: > > * printf

[Qemu-devel] Coding style for errors

2015-10-21 Thread Lluís Vilanova
Hi, I was wondering what is the proper way (or ways, depending on the subsystem) of reporting and signalling errors in QEMU. The coding style file does not seem to mention it, and the code uses all kinds of forms for that: * printf + exit(1) * fprintf(stderr) + exit(1) * error_report + exit(1) *