提交 1a69278e 编写于 作者: M Markus Armbruster 提交者: Anthony Liguori

qmp: Use generic errors in memchar-read, memchar-write

New errors should be generic unless there's a real use case for rich
errors.
Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 3ab651fc
......@@ -352,7 +352,6 @@
# by default is 'utf8'.
#
# Returns: Nothing on success
# If @device is not a valid char device, DeviceNotFound
#
# Since: 1.4
##
......@@ -374,7 +373,6 @@
# memchardev, by default is 'utf8'.
#
# Returns: data read from the device
# If @device is not a valid memchr device, DeviceNotFound
#
# Since: 1.4
##
......
......@@ -2764,7 +2764,7 @@ void qmp_memchar_write(const char *device, const char *data,
chr = qemu_chr_find(device);
if (!chr) {
error_set(errp, QERR_DEVICE_NOT_FOUND, device);
error_setg(errp, "Device '%s' not found", device);
return;
}
......@@ -2799,7 +2799,7 @@ char *qmp_memchar_read(const char *device, int64_t size,
chr = qemu_chr_find(device);
if (!chr) {
error_set(errp, QERR_DEVICE_NOT_FOUND, device);
error_setg(errp, "Device '%s' not found", device);
return NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册