[PATCH-for-7.0 1/2] block: Fix misleading hexadecimal format

Philippe Mathieu-Daudé posted 2 patches 3 years, 10 months ago
Maintainers: Stefan Hajnoczi <stefanha@redhat.com>, "Denis V. Lunev" <den@openvz.org>, Vladimir Sementsov-Ogievskiy <v.sementsov-og@mail.ru>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>, Fam Zheng <fam@euphon.net>
[PATCH-for-7.0 1/2] block: Fix misleading hexadecimal format
Posted by Philippe Mathieu-Daudé 3 years, 10 months ago
From: Philippe Mathieu-Daudé <f4bug@amsat.org>

"0x%u" format is very misleading, replace by "0x%x".

Found running:

  $ git grep -E '0x%[0-9]*([lL]*|" ?PRI)[dDuU]' block/

Inspired-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 block/parallels-ext.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/parallels-ext.c b/block/parallels-ext.c
index cb22a427d7..5122f67ac2 100644
--- a/block/parallels-ext.c
+++ b/block/parallels-ext.c
@@ -261,7 +261,7 @@ static int parallels_parse_format_extension(BlockDriverState *bs,
             break;
 
         default:
-            error_setg(errp, "Unknown feature: 0x%" PRIu64, fh.magic);
+            error_setg(errp, "Unknown feature: 0x%" PRIx64, fh.magic);
             goto fail;
         }
 
-- 
2.35.1


Re: [PATCH-for-7.0 1/2] block: Fix misleading hexadecimal format
Posted by Hanna Reitz 3 years, 10 months ago
On 23.03.22 12:47, Philippe Mathieu-Daudé wrote:
> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
> "0x%u" format is very misleading, replace by "0x%x".
>
> Found running:
>
>    $ git grep -E '0x%[0-9]*([lL]*|" ?PRI)[dDuU]' block/
>
> Inspired-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   block/parallels-ext.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Hanna Reitz <hreitz@redhat.com>


Re: [PATCH-for-7.0 1/2] block: Fix misleading hexadecimal format
Posted by Denis V. Lunev 3 years, 10 months ago
On 23.03.2022 14:47, Philippe Mathieu-Daudé wrote:
> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
> "0x%u" format is very misleading, replace by "0x%x".
>
> Found running:
>
>    $ git grep -E '0x%[0-9]*([lL]*|" ?PRI)[dDuU]' block/
>
> Inspired-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   block/parallels-ext.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/block/parallels-ext.c b/block/parallels-ext.c
> index cb22a427d7..5122f67ac2 100644
> --- a/block/parallels-ext.c
> +++ b/block/parallels-ext.c
> @@ -261,7 +261,7 @@ static int parallels_parse_format_extension(BlockDriverState *bs,
>               break;
>   
>           default:
> -            error_setg(errp, "Unknown feature: 0x%" PRIu64, fh.magic);
> +            error_setg(errp, "Unknown feature: 0x%" PRIx64, fh.magic);
>               goto fail;
>           }
>   
Reviewed-by: Denis V. Lunev <den@openvz.org>

Re: [PATCH-for-7.0 1/2] block: Fix misleading hexadecimal format
Posted by Daniel P. Berrangé 3 years, 10 months ago
On Wed, Mar 23, 2022 at 12:47:17PM +0100, Philippe Mathieu-Daudé wrote:
> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
> 
> "0x%u" format is very misleading, replace by "0x%x".
> 
> Found running:
> 
>   $ git grep -E '0x%[0-9]*([lL]*|" ?PRI)[dDuU]' block/
> 
> Inspired-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  block/parallels-ext.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|