[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] fw_cfg: print error message when reading splash
From: |
Li Qiang |
Subject: |
Re: [Qemu-devel] [PATCH] fw_cfg: print error message when reading splashfile failed |
Date: |
Thu, 1 Nov 2018 14:15:31 +0800 |
Hello all,
I have sent out another patch.
As the email's subject and commit message changed,
I'm not sure is it suitable to add Philippe and Laszlo's R-b tag.
Thanks,
Li Qiang
Markus Armbruster <address@hidden> 于2018年10月31日周三 下午11:36写道:
> Philippe Mathieu-Daudé <address@hidden> writes:
>
> > On 24/10/18 7:12, Li Qiang wrote:
> >> Also remove unnecessary 'res' variable.
> >>
> >> Signed-off-by: Li Qiang <address@hidden>
> >> ---
> >> hw/nvram/fw_cfg.c | 7 +++----
> >> 1 file changed, 3 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
> >> index 946f765..f4a52d8 100644
> >> --- a/hw/nvram/fw_cfg.c
> >> +++ b/hw/nvram/fw_cfg.c
> >> @@ -68,15 +68,14 @@ static char *read_splashfile(char *filename, gsize
> *file_sizep,
> >> int *file_typep)
> >> {
> >> GError *err = NULL;
> >> - gboolean res;
> >> gchar *content;
> >> int file_type;
> >> unsigned int filehead;
> >> int bmp_bpp;
> >> - res = g_file_get_contents(filename, &content, file_sizep,
> >> &err);
> >> - if (res == FALSE) {
> >> - error_report("failed to read splash file '%s'", filename);
> >> + if (!g_file_get_contents(filename, &content, file_sizep, &err)) {
> >> + error_report("failed to read splash file '%s', %s",
> >
> > Can you use a column like the rest of the codebase?
> >
> > i.e.: "failed to read splash file '%s': %s"
>
> Yes, please.
>
> Also, my remark on your "[PATCH] vl.c: print error message if loading
> fw_cfg file failed" applies to this patch as well. Please improve the
> commit message.
>
> > The maintainer taking this patch can do this minor change, so:
> > Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
> >
> >> + filename, err->message);
> >> g_error_free(err);
> >> return NULL;
> >> }
> >>
>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH] fw_cfg: print error message when reading splashfile failed,
Li Qiang <=