aboutsummaryrefslogtreecommitdiffstats
path: root/android/help.c
diff options
context:
space:
mode:
authorVladimir Chtchetkine <vchtchetkine@google.com>2010-08-27 09:09:45 -0700
committerVladimir Chtchetkine <vchtchetkine@google.com>2010-09-01 07:05:46 -0700
commit318f17a0050e729bce8545463b657c1d62835b5e (patch)
tree5bb39290ba092e29be8504c88264fb5159837b5d /android/help.c
parente13168648d5947955e0fd4fbf396f891ae53921f (diff)
downloadexternal_qemu-318f17a0050e729bce8545463b657c1d62835b5e.zip
external_qemu-318f17a0050e729bce8545463b657c1d62835b5e.tar.gz
external_qemu-318f17a0050e729bce8545463b657c1d62835b5e.tar.bz2
Fixed dependency ob core data in android/help.c
Also moved along -tcpdump option Change-Id: I9fc53e0dc6a86e9a880d6127bf2da3ac1d7ec58a
Diffstat (limited to 'android/help.c')
-rw-r--r--android/help.c36
1 files changed, 21 insertions, 15 deletions
diff --git a/android/help.c b/android/help.c
index 3527c34..ea419f3 100644
--- a/android/help.c
+++ b/android/help.c
@@ -10,6 +10,7 @@
#include "audio/audio.h"
#include <string.h>
#include <stdlib.h>
+#include "android/ui-core-protocol.h"
/* XXX: TODO: put most of the help stuff in auto-generated files */
@@ -653,7 +654,8 @@ static void
help_shaper(stralloc_t* out)
{
int n;
-
+ NetworkSpeed android_netspeed;
+ NetworkLatency android_netdelay;
PRINTF(
" the Android emulator supports network throttling, i.e. slower network\n"
" bandwidth as well as higher connection latencies. this is done either through\n"
@@ -661,22 +663,22 @@ help_shaper(stralloc_t* out)
" the format of -netspeed is one of the following (numbers are kbits/s):\n\n" );
- for (n = 0; android_netspeeds[n].name != NULL; n++) {
+ for (n = 0; !android_core_get_android_netspeed(n, &android_netspeed); n++) {
PRINTF( " -netspeed %-12s %-15s (up: %.1f, down: %.1f)\n",
- android_netspeeds[n].name,
- android_netspeeds[n].display,
- android_netspeeds[n].upload/1000.,
- android_netspeeds[n].download/1000. );
+ android_netspeed.name,
+ android_netspeed.display,
+ android_netspeed.upload/1000.,
+ android_netspeed.download/1000. );
}
PRINTF( "\n" );
PRINTF( " -netspeed %-12s %s", "<num>", "select both upload and download speed\n");
PRINTF( " -netspeed %-12s %s", "<up>:<down>", "select individual up and down speed\n");
PRINTF( "\n The format of -netdelay is one of the following (numbers are msec):\n\n" );
- for (n = 0; android_netdelays[n].name != NULL; n++) {
+ for (n = 0; !android_core_get_android_netdelay(n, &android_netdelay); n++) {
PRINTF( " -netdelay %-10s %-15s (min %d, max %d)\n",
- android_netdelays[n].name, android_netdelays[n].display,
- android_netdelays[n].min_ms, android_netdelays[n].max_ms );
+ android_netdelay.name, android_netdelay.display,
+ android_netdelay.min_ms, android_netdelay.max_ms );
}
PRINTF( " -netdelay %-10s %s", "<num>", "select exact latency\n");
PRINTF( " -netdelay %-10s %s", "<min>:<max>", "select min and max latencies\n\n");
@@ -781,10 +783,12 @@ help_audio_out(stralloc_t* out)
" on this system, output <backend> can be one of the following:\n\n"
);
for ( nn = 0; ; nn++ ) {
- const char* descr;
- const char* name = audio_get_backend_name( 0, nn, &descr );
- if (name == NULL)
+ char name[512];
+ char descr[4096];
+ if (android_core_audio_get_backend_name(0, nn, name, sizeof(name),
+ descr, sizeof(descr))) {
break;
+ }
PRINTF( " %-10s %s\n", name, descr );
}
PRINTF( "\n" );
@@ -809,10 +813,12 @@ help_audio_in(stralloc_t* out)
" on this system, input <backend> can be one of:\n\n"
);
for ( nn = 0; ; nn++ ) {
- const char* descr;
- const char* name = audio_get_backend_name( 1, nn, &descr );
- if (name == NULL)
+ char name[512];
+ char descr[4096];
+ if (android_core_audio_get_backend_name(1, nn, name, sizeof(name),
+ descr, sizeof(descr))) {
break;
+ }
PRINTF( " %-10s %s\n", name, descr );
}
PRINTF( "\n" );