Tweak a few "Parameter 'NAME' expects THING" error message
Change to "expects a THING" where that's an obvious improvement Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20201113082626.2725812-11-armbru@redhat.com>
This commit is contained in:
parent
74b97760dc
commit
6cc0667d9b
@ -856,7 +856,7 @@ static int quorum_valid_threshold(int threshold, int num_children, Error **errp)
|
||||
|
||||
if (threshold < 1) {
|
||||
error_setg(errp, QERR_INVALID_PARAMETER_VALUE,
|
||||
"vote-threshold", "value >= 1");
|
||||
"vote-threshold", "a value >= 1");
|
||||
return -ERANGE;
|
||||
}
|
||||
|
||||
|
@ -2991,7 +2991,7 @@ static void blockdev_mirror_common(const char *job_id, BlockDriverState *bs,
|
||||
}
|
||||
if (granularity & (granularity - 1)) {
|
||||
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "granularity",
|
||||
"power of 2");
|
||||
"a power of 2");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -521,7 +521,7 @@ static const ChardevClass *char_get_class(const char *driver, Error **errp)
|
||||
|
||||
if (object_class_is_abstract(oc)) {
|
||||
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "driver",
|
||||
"abstract device type");
|
||||
"an abstract device type");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -776,7 +776,7 @@ static void set_pci_devfn(Object *obj, Visitor *v, const char *name,
|
||||
}
|
||||
if (value < -1 || value > 255) {
|
||||
error_setg(errp, QERR_INVALID_PARAMETER_VALUE,
|
||||
name ? name : "null", "pci_devfn");
|
||||
name ? name : "null", "a value between -1 and 255");
|
||||
return;
|
||||
}
|
||||
*ptr = value;
|
||||
|
@ -237,7 +237,7 @@ static DeviceClass *qdev_get_device_class(const char **driver, Error **errp)
|
||||
|
||||
if (object_class_is_abstract(oc)) {
|
||||
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "driver",
|
||||
"non-abstract device type");
|
||||
"a non-abstract device type");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -245,7 +245,7 @@ static DeviceClass *qdev_get_device_class(const char **driver, Error **errp)
|
||||
if (!dc->user_creatable ||
|
||||
(qdev_hotplug && !dc->hotpluggable)) {
|
||||
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "driver",
|
||||
"pluggable device type");
|
||||
"a pluggable device type");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user