vl.c: Replace fprintf(stderr) with error_report()

Straightforward replacement, except for qemu_kill_report(), which
printed a common part of its error message first, then the applicable
special part. Print each complete message with a single
error_report() instead.

Multi-line messages were replaced by error_report() followed by
error_printf().

The following changes were made to the error messages:

* The "invalid date format" message was reworded to better fit
the new error_report()+error_printf() pattern.
* On the remaining messages, only the trailing newlines, "qemu:" and
"error:" message prefixes were removed.

Backports relevant parts of commit f61eddcb2bb5cbbdd1d911b7e937db9affc29028 from qemu
This commit is contained in:
Eduardo Habkost 2018-02-17 14:54:02 -05:00 committed by Lioncash
parent 0ed5787f89
commit 7343fe51d1
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -124,8 +124,8 @@ int machine_initialize(struct uc_struct *uc)
// this will auto initialize all register objects above.
machine_class = find_default_machine(uc, uc->arch);
if (machine_class == NULL) {
//fprintf(stderr, "No machine specified, and there is no default.\n"
// "Use -machine help to list supported machines!\n");
// error_report("No machine specified, and there is no default.");
// error_printf("Use -machine help to list supported machines!\n");
return -2;
}