[Qemu-devel] [PATCH] multiboot: Make the message more user friendly

Mao Zhongyi posted 1 patch 5 years, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1537946988-4051-1-git-send-email-maozhongyi@cmss.chinamobile.com
Test checkpatch passed
Test docker-clang@ubuntu failed
hw/i386/multiboot.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
[Qemu-devel] [PATCH] multiboot: Make the message more user friendly
Posted by Mao Zhongyi 5 years, 7 months ago
Since this one is intended to be a user-facing error message
rather than just a debug note, it could also be reasonably
expanded to be a bit more user friendly.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
---
 hw/i386/multiboot.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/i386/multiboot.c b/hw/i386/multiboot.c
index 1a4344f..44fc7d8 100644
--- a/hw/i386/multiboot.c
+++ b/hw/i386/multiboot.c
@@ -186,7 +186,8 @@ int load_multiboot(FWCfgState *fw_cfg,
     memset(&mbs, 0, sizeof(mbs));
 
     if (flags & 0x00000004) { /* MULTIBOOT_HEADER_HAS_VBE */
-        error_report("multiboot knows VBE. we don't");
+        error_report("This multiboot image uses VBE, which QEMU "
+                     "does not support");
     }
     if (!(flags & 0x00010000)) { /* MULTIBOOT_HEADER_HAS_ADDR */
         uint64_t elf_entry;
-- 
1.8.3.1




Re: [Qemu-devel] [PATCH] multiboot: Make the message more user friendly
Posted by Eduardo Habkost 5 years, 6 months ago
CCing Markus and Eric, so they can help review the error message
grammar and style.

On Wed, Sep 26, 2018 at 03:29:48AM -0400, Mao Zhongyi wrote:
> Since this one is intended to be a user-facing error message
> rather than just a debug note, it could also be reasonably
> expanded to be a bit more user friendly.
> 
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
> ---
>  hw/i386/multiboot.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/i386/multiboot.c b/hw/i386/multiboot.c
> index 1a4344f..44fc7d8 100644
> --- a/hw/i386/multiboot.c
> +++ b/hw/i386/multiboot.c
> @@ -186,7 +186,8 @@ int load_multiboot(FWCfgState *fw_cfg,
>      memset(&mbs, 0, sizeof(mbs));
>  
>      if (flags & 0x00000004) { /* MULTIBOOT_HEADER_HAS_VBE */
> -        error_report("multiboot knows VBE. we don't");
> +        error_report("This multiboot image uses VBE, which QEMU "
> +                     "does not support");
>      }
>      if (!(flags & 0x00010000)) { /* MULTIBOOT_HEADER_HAS_ADDR */
>          uint64_t elf_entry;
> -- 
> 1.8.3.1
> 
> 
> 

-- 
Eduardo

Re: [Qemu-devel] [PATCH] multiboot: Make the message more user friendly
Posted by Eric Blake 5 years, 6 months ago
On 9/26/18 2:29 AM, Mao Zhongyi wrote:
> Since this one is intended to be a user-facing error message
> rather than just a debug note, it could also be reasonably
> expanded to be a bit more user friendly.
> 
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
> ---
>   hw/i386/multiboot.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

> 
> diff --git a/hw/i386/multiboot.c b/hw/i386/multiboot.c
> index 1a4344f..44fc7d8 100644
> --- a/hw/i386/multiboot.c
> +++ b/hw/i386/multiboot.c
> @@ -186,7 +186,8 @@ int load_multiboot(FWCfgState *fw_cfg,
>       memset(&mbs, 0, sizeof(mbs));
>   
>       if (flags & 0x00000004) { /* MULTIBOOT_HEADER_HAS_VBE */
> -        error_report("multiboot knows VBE. we don't");
> +        error_report("This multiboot image uses VBE, which QEMU "
> +                     "does not support");

Definite improvement in the grammar over the original.

>       }
>       if (!(flags & 0x00010000)) { /* MULTIBOOT_HEADER_HAS_ADDR */
>           uint64_t elf_entry;
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org