Re: [Qemu-devel] error reporting in functions

2016-10-12 Thread Markus Armbruster
Eric Blake writes: > On 10/12/2016 10:47 AM, Vladimir Sementsov-Ogievskiy wrote: >> HI all! >> >> My questions is: what are general recommendations in Qemu for return >> code, if we have Error **errp? >> What should I prefer: errp, duplicated by int return code, or void >> functions with errp? >

Re: [Qemu-devel] error reporting in functions

2016-10-12 Thread Eric Blake
On 10/12/2016 10:47 AM, Vladimir Sementsov-Ogievskiy wrote: > HI all! > > My questions is: what are general recommendations in Qemu for return > code, if we have Error **errp? > What should I prefer: errp, duplicated by int return code, or void > functions with errp? Markus has already had severa

[Qemu-devel] error reporting in functions

2016-10-12 Thread Vladimir Sementsov-Ogievskiy
HI all! My questions is: what are general recommendations in Qemu for return code, if we have Error **errp? What should I prefer: errp, duplicated by int return code, or void functions with errp? void + errp seems good, just to not duplicate things. But it has a disadvantage of necessity of