mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
qerror.h: Remove QERR defines that are only used once
Just hardcode them in the callers Cc: Luiz Capitulino <lcapitulino@redhat.com> Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: Cole Robinson <crobinso@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
parent
d73f0beadb
commit
f231b88db1
15 changed files with 37 additions and 91 deletions
|
@ -987,8 +987,9 @@ static void v9fs_attach(void *opaque)
|
|||
*/
|
||||
if (!s->migration_blocker) {
|
||||
s->root_fid = fid;
|
||||
error_set(&s->migration_blocker, QERR_VIRTFS_FEATURE_BLOCKS_MIGRATION,
|
||||
s->ctx.fs_root ? s->ctx.fs_root : "NULL", s->tag);
|
||||
error_setg(&s->migration_blocker,
|
||||
"Migration is disabled when VirtFS export path '%s' is mounted in the guest using mount_tag '%s'",
|
||||
s->ctx.fs_root ? s->ctx.fs_root : "NULL", s->tag);
|
||||
migrate_add_blocker(s->migration_blocker);
|
||||
}
|
||||
out:
|
||||
|
|
|
@ -587,8 +587,9 @@ static void set_blocksize(Object *obj, Visitor *v, void *opaque,
|
|||
|
||||
/* We rely on power-of-2 blocksizes for bitmasks */
|
||||
if ((value & (value - 1)) != 0) {
|
||||
error_set(errp, QERR_PROPERTY_VALUE_NOT_POWER_OF_2,
|
||||
dev->id?:"", name, (int64_t)value);
|
||||
error_setg(errp,
|
||||
"Property %s.%s doesn't take value '%" PRId64 "', it's not a power of 2",
|
||||
dev->id ?: "", name, (int64_t)value);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -853,7 +854,7 @@ void error_set_from_qdev_prop_error(Error **errp, int ret, DeviceState *dev,
|
|||
{
|
||||
switch (ret) {
|
||||
case -EEXIST:
|
||||
error_set(errp, QERR_PROPERTY_VALUE_IN_USE,
|
||||
error_setg(errp, "Property '%s.%s' can't take value '%s', it's in use",
|
||||
object_get_typename(OBJECT(dev)), prop->name, value);
|
||||
break;
|
||||
default:
|
||||
|
@ -862,7 +863,7 @@ void error_set_from_qdev_prop_error(Error **errp, int ret, DeviceState *dev,
|
|||
object_get_typename(OBJECT(dev)), prop->name, value);
|
||||
break;
|
||||
case -ENOENT:
|
||||
error_set(errp, QERR_PROPERTY_VALUE_NOT_FOUND,
|
||||
error_setg(errp, "Property '%s.%s' can't find value '%s'",
|
||||
object_get_typename(OBJECT(dev)), prop->name, value);
|
||||
break;
|
||||
case 0:
|
||||
|
|
|
@ -684,8 +684,8 @@ static int pci_ivshmem_init(PCIDevice *dev)
|
|||
}
|
||||
|
||||
if (s->role_val == IVSHMEM_PEER) {
|
||||
error_set(&s->migration_blocker, QERR_DEVICE_FEATURE_BLOCKS_MIGRATION,
|
||||
"peer mode", "ivshmem");
|
||||
error_setg(&s->migration_blocker,
|
||||
"Migration is disabled when using feature 'peer mode' in device 'ivshmem'");
|
||||
migrate_add_blocker(s->migration_blocker);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue