From: "Alex Bennée" <alex.bennee@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] hw/hppa: Use qemu_log_mask instead of fprintf to stderr
Date: Sun, 04 Feb 2018 13:38:03 +0000 [thread overview]
Message-ID: <87k1vszxhg.fsf@linaro.org> (raw)
In-Reply-To: <20180204064911.9828-1-richard.henderson@linaro.org>
Richard Henderson <richard.henderson@linaro.org> writes:
> Reported-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> hw/hppa/machine.c | 17 ++++++++---------
> 1 file changed, 8 insertions(+), 9 deletions(-)
>
> diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
> index afd3867313..19033e268d 100644
> --- a/hw/hppa/machine.c
> +++ b/hw/hppa/machine.c
> @@ -19,6 +19,7 @@
> #include "hw/hppa/hppa_sys.h"
> #include "qemu/cutils.h"
> #include "qapi/error.h"
> +#include "qemu/log.h"
>
> #define MAX_IDE_BUS 2
>
> @@ -111,7 +112,6 @@ static void machine_hppa_init(MachineState *machine)
> uint32_t addr = DINO_UART_HPA + 0x800;
> serial_mm_init(addr_space, addr, 0, serial_irq,
> 115200, serial_hds[0], DEVICE_BIG_ENDIAN);
> - fprintf(stderr, "Serial port created at 0x%x\n", addr);
> }
>
> /* SCSI disk setup. */
> @@ -146,9 +146,9 @@ static void machine_hppa_init(MachineState *machine)
> error_report("could not load firmware '%s'", firmware_filename);
> exit(1);
> }
> - fprintf(stderr, "Firmware loaded at 0x%08" PRIx64 "-0x%08" PRIx64
> - ", entry at 0x%08" PRIx64 ".\n",
> - firmware_low, firmware_high, firmware_entry);
> + qemu_log_mask(CPU_LOG_PAGE, "Firmware loaded at 0x%08" PRIx64
> + "-0x%08" PRIx64 ", entry at 0x%08" PRIx64 ".\n",
> + firmware_low, firmware_high, firmware_entry);
> if (firmware_low < ram_size || firmware_high >= FIRMWARE_END) {
> error_report("Firmware overlaps with memory or IO space");
> exit(1);
> @@ -163,7 +163,6 @@ static void machine_hppa_init(MachineState *machine)
>
> /* Load kernel */
> if (kernel_filename) {
> - fprintf(stderr, "LOADING kernel '%s'\n", kernel_filename);
> size = load_elf(kernel_filename, &cpu_hppa_to_phys,
> NULL, &kernel_entry, &kernel_low, &kernel_high,
> true, EM_PARISC, 0, 0);
> @@ -177,10 +176,10 @@ static void machine_hppa_init(MachineState *machine)
> error_report("could not load kernel '%s'", kernel_filename);
> exit(1);
> }
> -
> - fprintf(stderr, "Kernel loaded at 0x%08" PRIx64 "-0x%08" PRIx64
> - ", entry at 0x%08" PRIx64 ", size %ld kB.\n",
> - kernel_low, kernel_high, kernel_entry, size / 1024);
> + qemu_log_mask(CPU_LOG_PAGE, "Kernel loaded at 0x%08" PRIx64
> + "-0x%08" PRIx64 ", entry at 0x%08" PRIx64
> + ", size %ld kB.\n",
> + kernel_low, kernel_high, kernel_entry, size / 1024);
>
> if (kernel_cmdline) {
> cpu[0]->env.gr[24] = 0x4000;
--
Alex Bennée
prev parent reply other threads:[~2018-02-04 13:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-04 6:49 [Qemu-devel] [PATCH 1/2] hw/hppa: Use qemu_log_mask instead of fprintf to stderr Richard Henderson
2018-02-04 6:49 ` [Qemu-devel] [PATCH 2/2] tests: Enable boot-serial-test for hppa Richard Henderson
2018-02-04 8:04 ` Thomas Huth
2018-02-04 13:38 ` Alex Bennée [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k1vszxhg.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).