mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-17 21:26:13 -07:00
Unbreak Sparc32 and PPC
Convert qdev ptr type to chr, allow a NULL pointer. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
aa0cba4a62
commit
bc19fcaa1b
2 changed files with 10 additions and 5 deletions
|
|
@ -173,7 +173,12 @@ PropertyInfo qdev_prop_drive = {
|
|||
static int print_chr(DeviceState *dev, Property *prop, char *dest, size_t len)
|
||||
{
|
||||
CharDriverState **ptr = qdev_get_prop_ptr(dev, prop);
|
||||
return snprintf(dest, len, "%s", (*ptr)->label);
|
||||
|
||||
if (*ptr && (*ptr)->label) {
|
||||
return snprintf(dest, len, "%s", (*ptr)->label);
|
||||
} else {
|
||||
return snprintf(dest, len, "<null>");
|
||||
}
|
||||
}
|
||||
|
||||
PropertyInfo qdev_prop_chr = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue