scummvm random work
[patches.git] / openobex-test-usage.patch
CommitLineData
5e993f12 1Index: apps/obex_test.c
2===================================================================
3RCS file: /cvsroot/openobex/openobex/apps/obex_test.c,v
4retrieving revision 1.34
5diff -u -p -r1.34 obex_test.c
6--- apps/obex_test.c 2 Jun 2007 05:25:32 -0000 1.34
7+++ apps/obex_test.c 22 Jun 2007 10:44:35 -0000
8@@ -191,6 +191,22 @@ int main (int argc, char *argv[])
9 char *port;
10 obex_ctrans_t custfunc;
11
12+ if( (argc == 2) && (strcmp(argv[1], "-h") == 0 ) ) {
13+ printf(
14+ "Usage: obex_test [options]\n"
15+ "\n"
16+ "Options:\n"
17+ " -s [tty] Use Cable Transport (Sony-Ericsson phones/DCU-11 cable)\n"
18+ " -r [tty] Use Cable Transport for R320\n"
19+ " -i Use TCP transport\n"
20+ " -b [addr] [chan] Use BFB Cable Obex transport\n"
21+ " -u [interface] Use USB transport\n"
22+ "\n"
23+ "If no transport is selected, IrDA is used.\n"
24+ );
25+ return 0;
26+ }
27+
28 if( (argc == 2 || argc ==3) && (strcmp(argv[1], "-s") == 0 ) )
29 cobex = TRUE;
30 if( (argc == 2 || argc ==3) && (strcmp(argv[1], "-r") == 0 ) ) {
31@@ -346,6 +362,19 @@ int main (int argc, char *argv[])
32 printf("> ");
33 num = scanf("%s", cmd);
34 switch (cmd[0] | 0x20) {
35+ case 'h':
36+ printf(
37+ "Commands:\n"
38+ " c - connect\n"
39+ " d - disconnect\n"
40+ " g - get\n"
41+ " p - put\n"
42+ " q - quit\n"
43+ " s - server\n"
44+ " t - set path\n"
45+ " x - push\n"
46+ );
47+ break;
48 case 'q':
49 end=1;
50 break;