qdev: Fix printout of bit device properties with bit index >= 8
Signed-off-by: David 'Digit' Turner <digit@google.com> Acked-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
7464f0587b
commit
5a5e3d55ff
@ -51,7 +51,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");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user