From d87b080495e71ada650b165a1f06616b433e6073 Mon Sep 17 00:00:00 2001 From: Vladimir Chtchetkine Date: Mon, 6 Dec 2010 10:55:11 -0800 Subject: Submit merged Squashed commit of the following: commit aeefab810c6331e2f96e81f20e4408b39dd3a2ca Author: Vladimir Chtchetkine Date: Thu Dec 2 07:40:34 2010 -0800 Implement -attach-core UI option Change-Id: I4168e2d707cab1b4873ee16d86d5126c1a316abf Change-Id: I2da1ef5d53641f3c60d83d8d5ddf3aff34b0c6c7 --- vl-android-ui.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'vl-android-ui.c') diff --git a/vl-android-ui.c b/vl-android-ui.c index d693d83..316902c 100644 --- a/vl-android-ui.c +++ b/vl-android-ui.c @@ -33,6 +33,7 @@ #include "qemu-timer.h" #include "qemu-char.h" #include "block.h" +#include "sockets.h" #include "audio/audio.h" #include "android/android.h" @@ -40,6 +41,7 @@ #include "android/globals.h" #include "android/utils/bufprint.h" #include "android/utils/system.h" +#include "android/core-connection.h" #ifdef CONFIG_MEMCHECK #include "memcheck/memcheck.h" @@ -201,6 +203,9 @@ extern int android_display_bpp; extern void dprint( const char* format, ... ); +/* Instance of the "attach UI" Emulator's core console client. */ +extern CoreConnection* attach_client; + #define TFR(expr) do { if ((expr) != -1) break; } while (errno == EINTR) /* compute with 96 bit intermediate result: (a*b)/c */ @@ -588,6 +593,13 @@ int main(int argc, char **argv, char **envp) //qemu_chr_initial_reset(); main_loop(); + + if (attach_client != NULL) { + core_connection_detach(attach_client); + core_connection_close(attach_client); + core_connection_free(attach_client); + } + quit_timers(); return 0; } -- cgit v1.1