diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2012-08-20 15:31:38 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-08-22 10:47:17 -0500 |
commit | 99afc91d6ccdbe45258cff66fd0ce0142820c366 (patch) | |
tree | 43ed327cc24a401174b977859c8a62e0a7f5540d /configure | |
parent | 67c332fd12326a6ef572f07b9d71370ada6a287f (diff) | |
download | qemu-99afc91d6ccdbe45258cff66fd0ce0142820c366.zip qemu-99afc91d6ccdbe45258cff66fd0ce0142820c366.tar.gz qemu-99afc91d6ccdbe45258cff66fd0ce0142820c366.tar.bz2 |
qapi: add 'query-target' command to return target arch
Add a 'query-target' QAPI command to allow management applications
to determine what target architecture a QEMU binary is emulating
without having to parse the binary name or -help output
$ qmp-shell -p /tmp/qemu
(QEMU) query-target
{ u'return': { u'arch': u'x86_64' }}
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -3834,14 +3834,19 @@ case "$target_arch2" in ;; esac +upper() { + echo "$@"| LC_ALL=C tr '[a-z]' '[A-Z]' +} + echo "TARGET_SHORT_ALIGNMENT=$target_short_alignment" >> $config_target_mak echo "TARGET_INT_ALIGNMENT=$target_int_alignment" >> $config_target_mak echo "TARGET_LONG_ALIGNMENT=$target_long_alignment" >> $config_target_mak echo "TARGET_LLONG_ALIGNMENT=$target_llong_alignment" >> $config_target_mak echo "TARGET_ARCH=$TARGET_ARCH" >> $config_target_mak -target_arch_name="`echo $TARGET_ARCH | LC_ALL=C tr '[a-z]' '[A-Z]'`" +target_arch_name="`upper $TARGET_ARCH`" echo "TARGET_$target_arch_name=y" >> $config_target_mak echo "TARGET_ARCH2=$target_arch2" >> $config_target_mak +echo "TARGET_TYPE=TARGET_TYPE_`upper $target_arch2`" >> $config_target_mak echo "TARGET_BASE_ARCH=$TARGET_BASE_ARCH" >> $config_target_mak if [ "$TARGET_ABI_DIR" = "" ]; then TARGET_ABI_DIR=$TARGET_ARCH |