[Qemu-devel] [PATCH] dmg: Fixing wrong dmg block type value for block terminator.

Julio Faracco posted 1 patch 6 years, 10 months ago
Test asan passed
Test checkpatch passed
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
Test docker-clang@ubuntu passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20181228145055.18039-1-jcfaracco@gmail.com
block/dmg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[Qemu-devel] [PATCH] dmg: Fixing wrong dmg block type value for block terminator.
Posted by Julio Faracco 6 years, 10 months ago
This is a trivial patch to fix a wrong value for block terminator.
The old value was 0x7fffffff which is wrong. It was not affecting the
code because QEMU dmg block is not handling block terminator right now.
Neverthless, it should be fixed.

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
---
 block/dmg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/dmg.c b/block/dmg.c
index 50e91aef6d..2c806e3389 100644
--- a/block/dmg.c
+++ b/block/dmg.c
@@ -54,7 +54,7 @@ enum {
     UDBZ,
     ULFO,
     UDCM = 0x7ffffffe, /* Comments */
-    UDLE               /* Last Entry */
+    UDLE = 0xffffffff  /* Last Entry */
 };
 
 static int dmg_probe(const uint8_t *buf, int buf_size, const char *filename)
-- 
2.19.1


Re: [Qemu-devel] [Qemu-block] [PATCH] dmg: Fixing wrong dmg block type value for block terminator.
Posted by yuchenlin via Qemu-devel 6 years, 10 months ago
On 2018-12-28 22:50, Julio Faracco wrote:
> This is a trivial patch to fix a wrong value for block terminator.
> The old value was 0x7fffffff which is wrong. It was not affecting the
> code because QEMU dmg block is not handling block terminator right now.
> Neverthless, it should be fixed.
> 
> Signed-off-by: Julio Faracco <jcfaracco@gmail.com>

Reviewed-by: yuchenlin <yuchenlin@synology.com>

> ---
>  block/dmg.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/block/dmg.c b/block/dmg.c
> index 50e91aef6d..2c806e3389 100644
> --- a/block/dmg.c
> +++ b/block/dmg.c
> @@ -54,7 +54,7 @@ enum {
>      UDBZ,
>      ULFO,
>      UDCM = 0x7ffffffe, /* Comments */
> -    UDLE               /* Last Entry */
> +    UDLE = 0xffffffff  /* Last Entry */
>  };
> 
>  static int dmg_probe(const uint8_t *buf, int buf_size, const char 
> *filename)


Re: [Qemu-devel] [PATCH] dmg: Fixing wrong dmg block type value for block terminator.
Posted by Stefan Hajnoczi 6 years, 10 months ago
On Fri, Dec 28, 2018 at 12:50:55PM -0200, Julio Faracco wrote:
> This is a trivial patch to fix a wrong value for block terminator.
> The old value was 0x7fffffff which is wrong. It was not affecting the
> code because QEMU dmg block is not handling block terminator right now.
> Neverthless, it should be fixed.
> 
> Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
> ---
>  block/dmg.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan