diff options
author | Jason Hu <jia-cheng.hu@intel.com> | 2015-01-19 19:08:46 +0800 |
---|---|---|
committer | Jason Hu <jia-cheng.hu@intel.com> | 2015-02-03 12:46:42 +0800 |
commit | 0c8edfdeae85755f72315826511b5b32a3e4dc58 (patch) | |
tree | 4b300de7f110b13806f9082813ad951925caeaf2 | |
parent | c41beafed8b0b2dd50915f9cd8ef3467297183ee (diff) | |
download | qemu-android-0c8edfdeae85755f72315826511b5b32a3e4dc58.tar.gz |
bug-fix: display adb-debug from the head of buffer
Change-Id: Ifda549c019ba18efadaa744c46514289f5c89569
Signed-off-by: Jason Hu <jia-cheng.hu@intel.com>
-rw-r--r-- | hw/misc/android_adb_dbg.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/misc/android_adb_dbg.c b/hw/misc/android_adb_dbg.c index a3b13849c5..911a56f4ec 100644 --- a/hw/misc/android_adb_dbg.c +++ b/hw/misc/android_adb_dbg.c @@ -72,7 +72,7 @@ static int adb_dbg_pipe_send(void *opaque, const AndroidPipeBuffer *buffers, int cnt) { int ret = 0; - char *data; + char *data, *head; unsigned total_len = pipe_buffers_len(buffers, cnt); DPRINTF("%s: something is coming over the wire....\n", __func__); @@ -82,6 +82,7 @@ static int adb_dbg_pipe_send(void *opaque, const AndroidPipeBuffer *buffers, } data = g_malloc(total_len); + head = data; while (cnt > 0) { memcpy(data, buffers[0].data, buffers[0].size); @@ -92,7 +93,7 @@ static int adb_dbg_pipe_send(void *opaque, const AndroidPipeBuffer *buffers, buffers++; } - fprintf(stderr, "ADB: %s", data); + fprintf(stderr, "ADB: %s", head); return ret; } |