Commit 5a5e3d55 authored by David 'Digit' Turner's avatar David 'Digit' Turner Committed by Aurelien Jarno
Browse files

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

Signed-off-by: default avatarDavid 'Digit' Turner <>
Acked-by: default avatarMarkus Armbruster <>
Signed-off-by: default avatarAurelien Jarno <>
parent 7464f058
......@@ -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");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment