General warn report fixups

Tidy up some of the warn_report() messages after having converted them
to use warn_report().

Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <9cb1d23551898c9c9a5f84da6773e99871285120.1505158760.git.alistair.francis@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Alistair Francis 2017-09-11 12:52:56 -07:00 committed by Paolo Bonzini
parent 8297be80f7
commit b62e39b469
11 changed files with 24 additions and 27 deletions

View File

@ -1227,8 +1227,7 @@ static int vvfat_open(BlockDriverState *bs, QDict *options, int flags,
switch (s->fat_type) { switch (s->fat_type) {
case 32: case 32:
warn_report("FAT32 has not been tested. " warn_report("FAT32 has not been tested. You are welcome to do so!");
"You are welcome to do so!");
break; break;
case 16: case 16:
case 12: case 12:

View File

@ -494,7 +494,7 @@ static void vexpress_modify_dtb(const struct arm_boot_info *info, void *fdt)
* happen with older device tree blobs. * happen with older device tree blobs.
*/ */
warn_report("couldn't find interrupt controller in " warn_report("couldn't find interrupt controller in "
"dtb; will not include virtio-mmio devices in the dtb."); "dtb; will not include virtio-mmio devices in the dtb");
} else { } else {
int i; int i;
const hwaddr *map = daughterboard->motherboard_map; const hwaddr *map = daughterboard->motherboard_map;

View File

@ -127,7 +127,7 @@ void xen_map_cache_init(phys_offset_to_gaddr_t f, void *opaque)
if (rlimit_as.rlim_max != RLIM_INFINITY) { if (rlimit_as.rlim_max != RLIM_INFINITY) {
warn_report("QEMU's maximum size of virtual" warn_report("QEMU's maximum size of virtual"
" memory is not infinity."); " memory is not infinity");
} }
if (rlimit_as.rlim_max < MCACHE_MAX_SIZE + NON_MCACHE_MEMORY_SIZE) { if (rlimit_as.rlim_max < MCACHE_MAX_SIZE + NON_MCACHE_MEMORY_SIZE) {
mapcache->max_mcache_size = rlimit_as.rlim_max - mapcache->max_mcache_size = rlimit_as.rlim_max -

View File

@ -216,8 +216,8 @@ static void generate_eeprom_spd(uint8_t *eeprom, ram_addr_t ram_size)
} }
if (ram_size) { if (ram_size) {
warn_report("SPD cannot represent final %dMB" warn_report("SPD cannot represent final " RAM_ADDR_FMT "MB"
" of SDRAM", (int)ram_size); " of SDRAM", ram_size);
} }
/* fill in SPD memory information */ /* fill in SPD memory information */

View File

@ -254,8 +254,7 @@ void mips_r4k_init(MachineState *machine)
} }
} else if (!qtest_enabled()) { } else if (!qtest_enabled()) {
/* not fatal */ /* not fatal */
warn_report("could not load MIPS bios '%s'", warn_report("could not load MIPS bios '%s'", bios_name);
bios_name);
} }
g_free(filename); g_free(filename);

View File

@ -141,9 +141,10 @@ void gtod_save(QEMUFile *f, void *opaque)
r = s390_get_clock(&tod_high, &tod_low); r = s390_get_clock(&tod_high, &tod_low);
if (r) { if (r) {
warn_report("Unable to get guest clock for migration. " warn_report("Unable to get guest clock for migration: %s",
"Error code %d. Guest clock will not be migrated " strerror(-r));
"which could cause the guest to hang.", r); error_printf("Guest clock will not be migrated "
"which could cause the guest to hang.");
qemu_put_byte(f, S390_TOD_CLOCK_VALUE_MISSING); qemu_put_byte(f, S390_TOD_CLOCK_VALUE_MISSING);
return; return;
} }
@ -170,9 +171,10 @@ int gtod_load(QEMUFile *f, void *opaque, int version_id)
r = s390_set_clock(&tod_high, &tod_low); r = s390_set_clock(&tod_high, &tod_low);
if (r) { if (r) {
warn_report("Unable to set guest clock value. " warn_report("Unable to set guest clock for migration: %s",
"s390_get_clock returned error %d. This could cause " strerror(-r));
"the guest to hang.", r); error_printf("Guest clock will not be restored "
"which could cause the guest to hang.");
} }
return 0; return 0;

View File

@ -310,8 +310,7 @@ void net_hub_check_clients(void)
QLIST_FOREACH(port, &hub->ports, next) { QLIST_FOREACH(port, &hub->ports, next) {
peer = port->nc.peer; peer = port->nc.peer;
if (!peer) { if (!peer) {
warn_report("hub port %s has no peer", warn_report("hub port %s has no peer", port->nc.name);
port->nc.name);
continue; continue;
} }
@ -334,8 +333,7 @@ void net_hub_check_clients(void)
warn_report("vlan %d with no nics", hub->id); warn_report("vlan %d with no nics", hub->id);
} }
if (has_nic && !has_host_dev) { if (has_nic && !has_host_dev) {
warn_report("vlan %d is not connected to host network", warn_report("vlan %d is not connected to host network", hub->id);
hub->id);
} }
} }
} }

View File

@ -1494,8 +1494,9 @@ void net_check_clients(void)
QTAILQ_FOREACH(nc, &net_clients, next) { QTAILQ_FOREACH(nc, &net_clients, next) {
if (!nc->peer) { if (!nc->peer) {
warn_report("%s %s has no peer", warn_report("%s %s has no peer",
nc->info->type == NET_CLIENT_DRIVER_NIC ? nc->info->type == NET_CLIENT_DRIVER_NIC
"nic" : "netdev", nc->name); ? "nic" : "netdev",
nc->name);
} }
} }

View File

@ -12,6 +12,7 @@
#include "cpu.h" #include "cpu.h"
#include "exec/address-spaces.h" #include "exec/address-spaces.h"
#include "exec/exec-all.h" #include "exec/exec-all.h"
#include "qemu/error-report.h"
#include "target/i386/hax-i386.h" #include "target/i386/hax-i386.h"
#include "qemu/queue.h" #include "qemu/queue.h"
@ -178,9 +179,8 @@ static void hax_process_section(MemoryRegionSection *section, uint8_t flags)
if (!memory_region_is_ram(mr)) { if (!memory_region_is_ram(mr)) {
if (memory_region_is_romd(mr)) { if (memory_region_is_romd(mr)) {
/* HAXM kernel module does not support ROMD yet */ /* HAXM kernel module does not support ROMD yet */
warn_report("Ignoring ROMD region 0x%016" PRIx64 warn_report("Ignoring ROMD region 0x%016" PRIx64 "->0x%016" PRIx64,
"->0x%016" PRIx64 "", __func__, start_pa, start_pa, start_pa + size);
start_pa + size);
} }
return; return;
} }

View File

@ -9321,8 +9321,7 @@ static void init_ppc_proc(PowerPCCPU *cpu)
} }
#endif #endif
if (env->check_pow == NULL) { if (env->check_pow == NULL) {
warn_report("no power management check handler " warn_report("no power management check handler registered."
"registered."
" Attempt QEMU to crash very soon !"); " Attempt QEMU to crash very soon !");
} }
} }

View File

@ -198,8 +198,7 @@ int keysym2scancode(void *kbd_layout, int keysym)
if (keysym < MAX_NORMAL_KEYCODE) { if (keysym < MAX_NORMAL_KEYCODE) {
if (k->keysym2keycode[keysym] == 0) { if (k->keysym2keycode[keysym] == 0) {
trace_keymap_unmapped(keysym); trace_keymap_unmapped(keysym);
warn_report("no scancode found for keysym %d", warn_report("no scancode found for keysym %d", keysym);
keysym);
} }
return k->keysym2keycode[keysym]; return k->keysym2keycode[keysym];
} else { } else {