@@ -17,9 +17,6 @@
* add new ones!
*/
-#define QERR_DEVICE_IN_USE \
- "Device '%s' is in use"
-
#define QERR_DEVICE_NO_HOTPLUG \
"Device '%s' does not support hotplugging"
@@ -2345,7 +2345,7 @@ void coroutine_fn qmp_block_resize(const char *device, const char *node_name,
}
if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_RESIZE, NULL)) {
- error_setg(errp, QERR_DEVICE_IN_USE, device);
+ error_setg(errp, "Device '%s' is in use", device);
return;
}
@@ -217,7 +217,7 @@ bool qemu_chr_fe_init(CharBackend *b, Chardev *s, Error **errp)
return true;
unavailable:
- error_setg(errp, QERR_DEVICE_IN_USE, s->label);
+ error_setg(errp, "Device '%s' is in use", s->label);
return false;
}
Address the comment added in commit 4629ed1e98 ("qerror: Finally unused, clean up"), from 2015: /* * These macros will go away, please don't use * in new code, and do not add new ones! */ Mechanical transformation using sed, manually removing the definition in include/qapi/qmp/qerror.h. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- include/qapi/qmp/qerror.h | 3 --- blockdev.c | 2 +- chardev/char-fe.c | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-)