mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
qdev: Get just property name at error_set_from_qdev_prop_error()
Replace `Property *prop` parameter with `char *name`, to reduce dependency of getter and setter functions on the Property struct (which will be changed in following patches). Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Message-Id: <20201211220529.2290218-19-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
43b6ab4c67
commit
e68c2cb75a
4 changed files with 12 additions and 12 deletions
|
@ -354,7 +354,7 @@ static void set_mac(Object *obj, Visitor *v, const char *name, void *opaque,
|
|||
return;
|
||||
|
||||
inval:
|
||||
error_set_from_qdev_prop_error(errp, EINVAL, obj, prop, str);
|
||||
error_set_from_qdev_prop_error(errp, EINVAL, obj, name, str);
|
||||
g_free(str);
|
||||
}
|
||||
|
||||
|
@ -442,7 +442,7 @@ static void set_netdev(Object *obj, Visitor *v, const char *name,
|
|||
peers_ptr->queues = queues;
|
||||
|
||||
out:
|
||||
error_set_from_qdev_prop_error(errp, err, obj, prop, str);
|
||||
error_set_from_qdev_prop_error(errp, err, obj, name, str);
|
||||
g_free(str);
|
||||
}
|
||||
|
||||
|
@ -494,7 +494,7 @@ static void set_audiodev(Object *obj, Visitor *v, const char* name,
|
|||
card->state = state;
|
||||
|
||||
out:
|
||||
error_set_from_qdev_prop_error(errp, err, obj, prop, str);
|
||||
error_set_from_qdev_prop_error(errp, err, obj, name, str);
|
||||
g_free(str);
|
||||
}
|
||||
|
||||
|
@ -792,7 +792,7 @@ static void set_pci_devfn(Object *obj, Visitor *v, const char *name,
|
|||
return;
|
||||
|
||||
invalid:
|
||||
error_set_from_qdev_prop_error(errp, EINVAL, obj, prop, str);
|
||||
error_set_from_qdev_prop_error(errp, EINVAL, obj, name, str);
|
||||
g_free(str);
|
||||
}
|
||||
|
||||
|
@ -916,7 +916,7 @@ static void set_pci_host_devaddr(Object *obj, Visitor *v, const char *name,
|
|||
return;
|
||||
|
||||
inval:
|
||||
error_set_from_qdev_prop_error(errp, EINVAL, obj, prop, str);
|
||||
error_set_from_qdev_prop_error(errp, EINVAL, obj, name, str);
|
||||
g_free(str);
|
||||
}
|
||||
|
||||
|
@ -1146,7 +1146,7 @@ static void set_uuid(Object *obj, Visitor *v, const char *name, void *opaque,
|
|||
if (!strcmp(str, UUID_VALUE_AUTO)) {
|
||||
qemu_uuid_generate(uuid);
|
||||
} else if (qemu_uuid_parse(str, uuid) < 0) {
|
||||
error_set_from_qdev_prop_error(errp, EINVAL, obj, prop, str);
|
||||
error_set_from_qdev_prop_error(errp, EINVAL, obj, name, str);
|
||||
}
|
||||
g_free(str);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue