summary refs log tree commit diff stats
path: root/target-info.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-info.c')
-rw-r--r--target-info.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/target-info.c b/target-info.c
index 16fdca7aaa..9ebabec988 100644
--- a/target-info.c
+++ b/target-info.c
@@ -8,7 +8,9 @@
 
 #include "qemu/osdep.h"
 #include "qemu/target-info.h"
+#include "qemu/target-info-qapi.h"
 #include "qemu/target-info-impl.h"
+#include "qapi/error.h"
 
 const char *target_name(void)
 {
@@ -20,6 +22,12 @@ unsigned target_long_bits(void)
     return target_info()->long_bits;
 }
 
+SysEmuTarget target_arch(void)
+{
+    return qapi_enum_parse(&SysEmuTarget_lookup, target_name(), -1,
+                           &error_abort);
+}
+
 const char *target_cpu_type(void)
 {
     return target_info()->cpu_type;