Skip to contentSkip to conversation

dmg: Fixing wrong dmg block type value for block terminator.

PATCH Applied Julio Faracco 3 participants 3 messages Dec 28, 2018 – Jan 2, 2019 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dmg: Fixing wrong dmg block type value for block terminator.

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.

---
 block/dmg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
block/dmg.c +1 -1
index 50e91aef6d..2c806e3389 100644
@@ -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)
Signature · 1 line
2.19.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Julio Faracco

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.

Quoted 18 lines
---
 block/dmg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
block/dmg.c +1 -1
index 50e91aef6d..2c806e3389 100644
@@ -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 lore raw
In reply to Julio Faracco
Quoted 9 lines · Julio Faracco

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.

---
 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