diff options
author | Markus Armbruster <armbru@redhat.com> | 2024-10-10 17:01:43 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2024-10-18 15:03:35 +0200 |
commit | 627c1e012cb3f14745f9b7d991642894a4402d5c (patch) | |
tree | 77931c84e85c6f04d1302532a2c772204f52a1f0 /hw/intc/openpic.c | |
parent | dac7f90c1ccb717959fb216ace7126be5e3f330a (diff) | |
download | qemu-627c1e012cb3f14745f9b7d991642894a4402d5c.zip qemu-627c1e012cb3f14745f9b7d991642894a4402d5c.tar.gz qemu-627c1e012cb3f14745f9b7d991642894a4402d5c.tar.bz2 |
hw/intc/openpic: Improve errors for out of bounds property values
The error message doesn't matter much, as the "openpic" device isn't
user-creatable. But it's the last use of
QERR_PROPERTY_VALUE_OUT_OF_RANGE, which has to go. Change the message
just like the previous commit did for x86 CPUs.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20241010150144.986655-7-armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'hw/intc/openpic.c')
-rw-r--r-- | hw/intc/openpic.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c index 32bd880..cd3d877 100644 --- a/hw/intc/openpic.c +++ b/hw/intc/openpic.c @@ -41,7 +41,6 @@ #include "hw/pci/msi.h" #include "qapi/error.h" #include "qemu/bitops.h" -#include "qapi/qmp/qerror.h" #include "qemu/module.h" #include "qemu/timer.h" #include "qemu/error-report.h" @@ -1535,9 +1534,7 @@ static void openpic_realize(DeviceState *dev, Error **errp) }; if (opp->nb_cpus > MAX_CPU) { - error_setg(errp, QERR_PROPERTY_VALUE_OUT_OF_RANGE, - TYPE_OPENPIC, "nb_cpus", (uint64_t)opp->nb_cpus, - (uint64_t)0, (uint64_t)MAX_CPU); + error_setg(errp, "property 'nb_cpus' can be at most %d", MAX_CPU); return; } |