Gavin Shan b9f452142c machine: Use error handling when CPU type is checked
Functions that use an Error **errp parameter to return errors should
not also report them to the user, because reporting is the caller's
job. The principle is violated by machine_run_board_init() because
it calls error_report(), error_printf(), and exit(1) when the machine
doesn't support the requested CPU type.

Clean this up by using error_setg() and error_append_hint() instead.
No functional change, as the only caller passes &error_fatal.

Suggested-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20231204004726.483558-2-gshan@redhat.com>
[PMD: Correct error_append_hint() argument]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2024-01-05 16:20:14 +01:00
..
2021-09-30 13:44:08 +01:00
2023-12-29 11:17:30 +11:00
2022-08-01 11:58:02 +02:00
2023-09-21 11:31:16 +03:00
2023-06-02 12:29:27 -05:00
2023-12-29 11:17:30 +11:00
2023-12-29 11:17:30 +11:00
2019-08-16 13:31:53 +02:00