diff options
author | Markus Armbruster <armbru@redhat.com> | 2015-03-17 11:54:50 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2015-06-22 18:20:40 +0200 |
commit | c6bd8c706a799eb0fece99f468aaa22b818036f3 (patch) | |
tree | f6f5c9119c642fee35cdd98957c3bfd30527a76d /target-i386 | |
parent | 75158ebbe259f0bd8bf435e8f4827a43ec89c877 (diff) |
qerror: Clean up QERR_ macros to expand into a single string
These macros expand into error class enumeration constant, comma,
string. Unclean. Has been that way since commit 13f59ae.
The error class is always ERROR_CLASS_GENERIC_ERROR since the previous
commit.
Clean up as follows:
* Prepend every use of a QERR_ macro by ERROR_CLASS_GENERIC_ERROR, and
delete it from the QERR_ macro. No change after preprocessing.
* Rewrite error_set(ERROR_CLASS_GENERIC_ERROR, ...) into
error_setg(...). Again, no change after preprocessing.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'target-i386')
-rw-r--r-- | target-i386/cpu.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 4e7cdaaaa5..d4f4c8d687 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -1524,8 +1524,8 @@ static void x86_cpuid_version_set_family(Object *obj, Visitor *v, void *opaque, return; } if (value < min || value > max) { - error_set(errp, QERR_PROPERTY_VALUE_OUT_OF_RANGE, "", - name ? name : "null", value, min, max); + error_setg(errp, QERR_PROPERTY_VALUE_OUT_OF_RANGE, "", + name ? name : "null", value, min, max); return; } @@ -1565,8 +1565,8 @@ static void x86_cpuid_version_set_model(Object *obj, Visitor *v, void *opaque, return; } if (value < min || value > max) { - error_set(errp, QERR_PROPERTY_VALUE_OUT_OF_RANGE, "", - name ? name : "null", value, min, max); + error_setg(errp, QERR_PROPERTY_VALUE_OUT_OF_RANGE, "", + name ? name : "null", value, min, max); return; } @@ -1603,8 +1603,8 @@ static void x86_cpuid_version_set_stepping(Object *obj, Visitor *v, return; } if (value < min || value > max) { - error_set(errp, QERR_PROPERTY_VALUE_OUT_OF_RANGE, "", - name ? name : "null", value, min, max); + error_setg(errp, QERR_PROPERTY_VALUE_OUT_OF_RANGE, "", + name ? name : "null", value, min, max); return; } @@ -1632,8 +1632,7 @@ static void x86_cpuid_set_vendor(Object *obj, const char *value, int i; if (strlen(value) != CPUID_VENDOR_SZ) { - error_set(errp, QERR_PROPERTY_VALUE_BAD, "", - "vendor", value); + error_setg(errp, QERR_PROPERTY_VALUE_BAD, "", "vendor", value); return; } @@ -1709,8 +1708,8 @@ static void x86_cpuid_set_tsc_freq(Object *obj, Visitor *v, void *opaque, return; } if (value < min || value > max) { - error_set(errp, QERR_PROPERTY_VALUE_OUT_OF_RANGE, "", - name ? name : "null", value, min, max); + error_setg(errp, QERR_PROPERTY_VALUE_OUT_OF_RANGE, "", + name ? name : "null", value, min, max); return; } |