On Sat, Jun 13, 2015 at 04:20:51PM +0200, Markus Armbruster wrote:
> Error classes other than ERROR_CLASS_GENERIC_ERROR should not be used
> in new code.  Hiding them in QERR_ macros makes new uses hard to spot.
> Fortunately, there's just one such macro left.  Eliminate it with this
> coccinelle semantic patch:
> 
>     @@
>     expression EP, E;
>     @@
>     -error_set(EP, QERR_DEVICE_NOT_FOUND, E)
>     +error_set(EP, ERROR_CLASS_DEVICE_NOT_FOUND, "Device '%s' not found", E)
> 
> Signed-off-by: Markus Armbruster <arm...@redhat.com>
> ---
>  backends/rng-egd.c        |  3 ++-
>  blockdev-nbd.c            |  3 ++-
>  blockdev.c                | 33 ++++++++++++++++++++++-----------
>  hmp.c                     |  6 ++++--
>  include/qapi/qmp/qerror.h |  3 ---
>  net/net.c                 |  6 ++++--
>  qdev-monitor.c            |  6 ++++--
>  qmp.c                     | 12 ++++++++----
>  qom/object.c              |  6 ++++--
>  ui/input.c                |  3 ++-
>  10 files changed, 52 insertions(+), 29 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>

Attachment: pgpbe3j6zLgWV.pgp
Description: PGP signature

Reply via email to