diff options
author | Juan Quintela | 2018-07-10 22:51:53 +0200 |
---|---|---|
committer | Juan Quintela | 2018-08-21 19:52:16 +0200 |
commit | c0b5be52474c7cbe39424119cd2ea376a6ae42a7 (patch) | |
tree | 61b1aa2029d57ae46014207d80228f79dee02108 /include/hw/misc | |
parent | check: Only test wdt_ib700 when it is compiled in (diff) | |
download | qemu-c0b5be52474c7cbe39424119cd2ea376a6ae42a7.tar.gz qemu-c0b5be52474c7cbe39424119cd2ea376a6ae42a7.tar.xz qemu-c0b5be52474c7cbe39424119cd2ea376a6ae42a7.zip |
check: Only test pvpanic when it is compiled in
It was not possible to compile out pvpanic. Use the same trick
than applesmc.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'include/hw/misc')
-rw-r--r-- | include/hw/misc/pvpanic.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/hw/misc/pvpanic.h b/include/hw/misc/pvpanic.h index 36a54e270c..1ee071a703 100644 --- a/include/hw/misc/pvpanic.h +++ b/include/hw/misc/pvpanic.h @@ -16,6 +16,15 @@ #define TYPE_PVPANIC "pvpanic" -uint16_t pvpanic_port(void); +#define PVPANIC_IOPORT_PROP "ioport" + +static inline uint16_t pvpanic_port(void) +{ + Object *o = object_resolve_path_type("", TYPE_PVPANIC, NULL); + if (!o) { + return 0; + } + return object_property_get_uint(o, PVPANIC_IOPORT_PROP, NULL); +} #endif |