Add the negation of target_s390x() so an is_available callback can select every target except s390x.
Signed-off-by: Yonggang Luo <[email protected]> --- include/qemu/target-info.h | 7 +++++++ target-info.c | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/include/qemu/target-info.h b/include/qemu/target-info.h index 1d6c6f4472c..4bc25789d8d 100644 --- a/include/qemu/target-info.h +++ b/include/qemu/target-info.h @@ -134,6 +134,13 @@ bool target_ppc64(void); */ bool target_s390x(void); +/** + * target_not_s390x: + * + * Returns whether the target architecture is not S390x. + */ +bool target_not_s390x(void); + /** * target_base_riscv: * diff --git a/target-info.c b/target-info.c index 07dc88fd366..d9e15c939d6 100644 --- a/target-info.c +++ b/target-info.c @@ -126,6 +126,11 @@ bool target_s390x(void) return target_arch() == SYS_EMU_TARGET_S390X; } +bool target_not_s390x(void) +{ + return !target_s390x(); +} + bool target_base_riscv(void) { switch (target_arch()) { -- 2.55.0.windows.3
