提交 5a5e3d55 编写于 作者: D David 'Digit' Turner 提交者: Aurelien Jarno

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

Signed-off-by: NDavid 'Digit' Turner <digit@google.com>
Acked-by: NMarkus Armbruster <armbru@redhat.com>
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册