Skip to contentSkip to conversation

qdev: Fix printout of bit device properties with bit index >= 8

PATCH Applied [email protected] 3 participants 3 messages Jan 10, 2011 – Feb 20, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qdev: Fix printout of bit device properties with bit index >= 8

From: David 'Digit' Turner <[email protected]>

---
 hw/qdev-properties.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
hw/qdev-properties.c +1 -1
index 9219cd7..d5d9591 100644
@@ -50,7 +50,7 @@ static int parse_bit(DeviceState *dev, Property *prop, const char *str)
 
 static int print_bit(DeviceState *dev, Property *prop, char *dest, size_t len)
 {
-    uint8_t *p = qdev_get_prop_ptr(dev, prop);
+    uint32_t *p = qdev_get_prop_ptr(dev, prop);
     return snprintf(dest, len, (*p & qdev_get_prop_mask(prop)) ? "on" : "off");
 }
 
Signature · 1 line
1.7.3.1
Acked-by on v1 1/1
#1 lore raw
Quoted 12 lines · [email protected] writes:

From: David 'Digit' Turner <[email protected]>

---
 hw/qdev-properties.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
hw/qdev-properties.c +0 -0
index 9219cd7..d5d9591 100644

hw/qdev-properties.c static int parse_bit(DeviceState *dev, Property *prop, const char *str) · line 55

Quoted 7 lines
hw/qdev-properties.c +1 -1
@@ -50,7 +50,7 @@ static int parse_bit(DeviceState *dev, Property *prop, const char *str)
 
 static int print_bit(DeviceState *dev, Property *prop, char *dest, size_t len)
 {
-    uint8_t *p = qdev_get_prop_ptr(dev, prop);
+    uint32_t *p = qdev_get_prop_ptr(dev, prop);
     return snprintf(dest, len, (*p & qdev_get_prop_mask(prop)) ? "on" : "off");
 }
#2 lore raw
In reply to [email protected]
Quoted 12 lines · On Mon, Jan 10, 2011 at 11:11:40PM +0100, [email protected] wrote:

From: David 'Digit' Turner <[email protected]>

---
 hw/qdev-properties.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
hw/qdev-properties.c +0 -0
index 9219cd7..d5d9591 100644

hw/qdev-properties.c static int parse_bit(DeviceState *dev, Property *prop, const char *str) · line 56

Quoted 8 lines
hw/qdev-properties.c +1 -1
@@ -50,7 +50,7 @@ static int parse_bit(DeviceState *dev, Property *prop, const char *str)
 
 static int print_bit(DeviceState *dev, Property *prop, char *dest, size_t len)
 {
-    uint8_t *p = qdev_get_prop_ptr(dev, prop);
+    uint32_t *p = qdev_get_prop_ptr(dev, prop);
     return snprintf(dest, len, (*p & qdev_get_prop_mask(prop)) ? "on" : "off");
 }
 

Thanks, applied.

Signature · 2 lines
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net