]> git.proxmox.com Git - mirror_qemu.git/commit - blockdev.c
qerror: Eliminate QERR_DEVICE_NOT_FOUND
authorMarkus Armbruster <armbru@redhat.com>
Mon, 16 Mar 2015 07:57:47 +0000 (08:57 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 22 Jun 2015 16:20:39 +0000 (18:20 +0200)
commit75158ebbe259f0bd8bf435e8f4827a43ec89c877
treeeba61e08212343a1a688dae6f51897b0702ee8db
parentc6bf0f7ffa90c720377eb6bddd27037041acbc5b
qerror: Eliminate QERR_DEVICE_NOT_FOUND

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 <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
backends/rng-egd.c
blockdev-nbd.c
blockdev.c
hmp.c
include/qapi/qmp/qerror.h
net/net.c
qdev-monitor.c
qmp.c
qom/object.c
ui/input.c