mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
replace error_setg(&error_fatal, ...) with error_report()
According to include/qapi/error.h: * Please don't error_setg(&error_fatal, ...), use error_report() and * exit(), because that's more obvious. Patch updates all instances of error_setg(&error_fatal, ...) with error_report(...), adds the explicit exit(1) and removes redundant return statements. Signed-off-by: Tudor Gheorghiu <tudor.reda@gmail.com> Suggested-by: Thomas Huth <thuth@redhat.com> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2587 Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> (Mjt: also fold __func__ to previous line)
This commit is contained in:
parent
f8d3116fdd
commit
5ae3ec6363
6 changed files with 13 additions and 13 deletions
|
@ -761,9 +761,9 @@ static void versal_virt_init(MachineState *machine)
|
|||
if (!flash_klass ||
|
||||
object_class_is_abstract(flash_klass) ||
|
||||
!object_class_dynamic_cast(flash_klass, TYPE_M25P80)) {
|
||||
error_setg(&error_fatal, "'%s' is either abstract or"
|
||||
error_report("'%s' is either abstract or"
|
||||
" not a subtype of m25p80", s->ospi_model);
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue