qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/9] error: New convenience function error_repor


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 1/9] error: New convenience function error_report_err()
Date: Wed, 11 Feb 2015 13:47:16 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Paolo Bonzini <address@hidden> writes:

> On 10/02/2015 17:34, Markus Armbruster wrote:
>> I've typed error_report("%s", error_get_pretty(ERR)) too many times
>> already, and I've fixed too many instances of qerror_report_err(ERR)
>> to error_report("%s", error_get_pretty(ERR)) as well.  Capture the
>> pattern in a convenience function.
>> 
>> Since it's almost invariably followed by error_free(), stuff that into
>> the convenience function as well.
>> 
>> Put it to use with this Coccinelle semantic patch:
>
> For your "no good deed goes unpunished" record, can you prepare a Wiki
> page on how to use Coccinelle?  My attempts always saw it confused by
> qemu/queue.h macros.

Same here, just "sometimes" instead of "always".  I once tried to use
Coccinelle's macro hints to unconfuse it.  Frustrating failure.

It's clearly a poweful tool, but working with it makes me feel like an
ogre trying to use pliers.  Sometimes I manage to pull a whole raft of
splinters with it in one go, and then I'm one proud ogre.  At other
times, it completely resists my attempts to tell it what I want done.

I'm at least as confused about it as Eduardo.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]