Home
last modified time | relevance | path

Searched refs:argv (Results 1 – 25 of 310) sorted by relevance

12345678910>>...13

/system/netd/server/
DCommandListener.cpp93 int runCommand(SocketClient *c, int argc, char **argv) { in runCommand() argument
95 return mWrappedCmd->runCommand(c, argc, argv); in runCommand()
253 int argc, char **argv) { in runCommand() argument
259 if (!strcmp(argv[1], "list")) { in runCommand()
285 if (!strcmp(argv[1], "getcfg")) { in runCommand()
294 if (ifc_get_info(argv[2], &addr.s_addr, &prefixLength, &flags)) { in runCommand()
300 if (ifc_get_hwaddr(argv[2], (void *) hwaddr)) { in runCommand()
301 ALOGW("Failed to retrieve HW addr for %s (%s)", argv[2], strerror(errno)); in runCommand()
331 } else if (!strcmp(argv[1], "setcfg")) { in runCommand()
344 if (!inet_aton(argv[3], &addr)) { in runCommand()
[all …]
DSoftapController.cpp123 int SoftapController::setSoftap(int argc, char *argv[]) { in setSoftap() argument
133 if (!strcasecmp(argv[4], "hidden")) in setSoftap()
137 channel = atoi(argv[5]); in setSoftap()
151 argv[2], argv[3], channel, (channel <= 14) ? 'g' : 'a', hidden)); in setSoftap()
156 if (!strcmp(argv[6], "wpa-psk")) { in setSoftap()
157 if (!generatePsk(argv[3], argv[7], psk_str)) { in setSoftap()
161 } else if (!strcmp(argv[6], "wpa2-psk")) { in setSoftap()
162 if (!generatePsk(argv[3], argv[7], psk_str)) { in setSoftap()
166 } else if (!strcmp(argv[6], "open")) { in setSoftap()
170 if (!strcmp(argv[6], "open")) { in setSoftap()
[all …]
Dndc.c36 static int do_cmd(int sock, int argc, char **argv);
38 int main(int argc, char **argv) { in main() argument
43 usage(argv[0]); in main()
47 if ((sock = socket_local_client(argv[1], in main()
57 if (argc < 3) usage(argv[0]); in main()
58 printf("Using alt socket %s\n", argv[1]); in main()
62 if (!strcmp(argv[1+cmdOffset], "monitor")) in main()
64 exit(do_cmd(sock, argc-cmdOffset, &(argv[cmdOffset]))); in main()
67 static int do_cmd(int sock, int argc, char **argv) { in do_cmd() argument
73 strtol(argv[1], &conv_ptr, 10); in do_cmd()
[all …]
/system/security/keystore/
Dkeystore_cli.cpp49 if (strcmp(argv[1], #cmd) == 0) { \
52 fprintf(stderr, "%s: could not connect: %d\n", argv[0], ret); \
63 if (strcmp(argv[1], #cmd) == 0) { \
65 fprintf(stderr, "Usage: %s " #cmd " <name>\n", argv[0]); \
68 int32_t ret = service->cmd(String16(argv[2])); \
70 fprintf(stderr, "%s: could not connect: %d\n", argv[0], ret); \
81 if (strcmp(argv[1], #cmd) == 0) { \
83 fprintf(stderr, "Usage: %s " #cmd " <name>\n", argv[0]); \
86 int32_t ret = service->cmd(atoi(argv[2])); \
88 fprintf(stderr, "%s: could not connect: %d\n", argv[0], ret); \
[all …]
/system/bt/tools/hci/
Dmain.c11 typedef int (*handler_t)(int argc, char **argv);
26 static int help(int argc, char **argv);
27 static int set_discoverable(int argc, char **argv);
28 static int set_name(int argc, char **argv);
29 static int set_pcm_loopback(int argc, char **argv);
30 static int set_sco_route(int argc, char **argv);
44 static int help(int argc, char **argv) { in help() argument
50 const command_t *command = find_command(argv[0]); in help()
52 printf("No command named '%s'.\n", argv[0]); in help()
56 printf("%s %s\n", argv[0], command->help); in help()
[all …]
/system/bt/service/test/
Dsettings_unittest.cpp51 const base::CommandLine::CharType* argv[] = { "program" }; in TEST_F() local
52 EXPECT_TRUE(base::CommandLine::Init(arraysize(argv), argv)); in TEST_F()
57 const base::CommandLine::CharType* argv[] = { in TEST_F() local
60 EXPECT_TRUE(base::CommandLine::Init(arraysize(argv), argv)); in TEST_F()
65 const base::CommandLine::CharType* argv[] = { in TEST_F() local
68 EXPECT_TRUE(base::CommandLine::Init(arraysize(argv), argv)); in TEST_F()
73 const base::CommandLine::CharType* argv[] = { in TEST_F() local
76 EXPECT_TRUE(base::CommandLine::Init(arraysize(argv), argv)); in TEST_F()
81 const base::CommandLine::CharType* argv[] = { in TEST_F() local
84 EXPECT_TRUE(base::CommandLine::Init(arraysize(argv), argv)); in TEST_F()
[all …]
/system/extras/bootctl/
Dbootctl.c31 static void usage(FILE* where, int argc, char* argv[]) in usage() argument
51 argv[0], argv[0], argv[0], argv[0], argv[0], argv[0], in usage()
52 argv[0], argv[0], argv[0], argv[0], argv[0]); in usage()
152 static int parse_slot(int pos, int argc, char *argv[]) in parse_slot() argument
155 usage(stderr, argc, argv); in parse_slot()
160 long int ret = strtol(argv[pos], NULL, 10); in parse_slot()
162 usage(stderr, argc, argv); in parse_slot()
169 int main(int argc, char *argv[]) in main() argument
176 usage(stderr, argc, argv); in main()
188 if (strcmp(argv[1], "hal-info") == 0) { in main()
[all …]
/system/vold/
DCryptCommandListener.cpp62 void CryptCommandListener::dumpArgs(int argc, char **argv, int argObscure) { in dumpArgs() argument
69 unsigned int len = strlen(argv[i]) + 1; // Account for space in dumpArgs()
80 strcpy(p, argv[i]); in dumpArgs()
81 p+= strlen(argv[i]); in dumpArgs()
173 int argc, char **argv) { in runCommand() argument
186 std::string subcommand(argv[1]); in runCommand()
189 dumpArgs(argc, argv, 2); in runCommand()
190 rc = cryptfs_check_passwd(argv[2]); in runCommand()
193 dumpArgs(argc, argv, -1); in runCommand()
200 dumpArgs(argc, argv, -1); in runCommand()
[all …]
DCommandListener.cpp69 void CommandListener::dumpArgs(int argc, char **argv, int argObscure) { in dumpArgs() argument
76 unsigned int len = strlen(argv[i]) + 1; // Account for space in dumpArgs()
87 strcpy(p, argv[i]); in dumpArgs()
88 p+= strlen(argv[i]); in dumpArgs()
142 int argc, char **argv) { in runCommand() argument
143 dumpArgs(argc, argv, -1); in runCommand()
155 std::string cmd(argv[1]); in runCommand()
167 std::string id(argv[2]); in runCommand()
173 std::string type(argv[3]); in runCommand()
182 int frac = atoi(argv[4]); in runCommand()
[all …]
/system/extras/tests/cpueater/
Ddaemonize.c31 int main(int argc, char **argv) in main() argument
40 printf("Usage: %s [-f logfile] [-a] [-d delay] <program>\n", argv[0]); in main()
48 while(**++argv == '-') { in main()
49 while(*++*argv) { in main()
50 switch(**argv) { in main()
52 if(*++*argv) in main()
53 file = *argv; in main()
55 file = *++argv; in main()
58 if(*++*argv) in main()
59 delay = atoi(*argv); in main()
[all …]
/system/connectivity/shill/test-scripts/
Dtest-flimflam12 if len(sys.argv) < 2:
13 print "Usage: %s <command>" % (sys.argv[0])
149 if sys.argv[1] == "state":
154 elif sys.argv[1] == "recheck-portal":
158 elif sys.argv[1] in ["services", "list", "show"]:
163 elif sys.argv[1] in ["passphrase", "pass"]:
164 if (len(sys.argv) < 3):
168 path = "/profile/default/" + sys.argv[2]
173 if (len(sys.argv) > 3):
174 passphrase = sys.argv[3]
[all …]
Dconfigure-service7 if len(sys.argv) < 2:
8 print "Usage: %s <GUID> [<property> <value>]" % (sys.argv[0])
11 print "Attempting to configure service %s" % (sys.argv[1])
15 params = { "GUID" : sys.argv[1] }
16 argv = sys.argv[2:] variable
17 while argv:
18 property_key = argv[0]
19 value = argv[1]
28 argv = argv[2:] variable
Dget-service7 if len(sys.argv) < 2:
8 print "Usage: %s <GUID> [<property> <value>]" % (sys.argv[0])
11 print "Attempting to configure service %s" % (sys.argv[1])
15 params = { "GUID" : sys.argv[1] }
16 argv = sys.argv[2:] variable
17 while argv:
18 property_key = argv[0]
19 value = argv[1]
28 argv = argv[2:] variable
Ddebug7 if len(sys.argv) == 2 and sys.argv[1] == '--list':
11 if len(sys.argv) < 2:
17 if sys.argv[1].startswith("+"):
20 newtaglist += sys.argv[1]
22 newtaglist = sys.argv[1].lstrip("+")
23 elif sys.argv[1].startswith("-"):
25 tagset_to_remove = set(sys.argv[1].lstrip("-").split("+"))
28 newtaglist = sys.argv[1]
Dconfigure-hidden-wifi6 if (len(sys.argv) < 2):
7 print "Usage: %s <ssid> [passphrase] [security]" % (sys.argv[0])
10 print "Attempting to configure hidden service %s" % (sys.argv[1])
14 ssid = sys.argv[1]
15 if len(sys.argv) > 2:
16 if len(sys.argv) > 3:
17 security = sys.argv[3]
20 passphrase = sys.argv[2]
/system/core/adb/
Dcommandline.cpp59 static int install_app(TransportType t, const char* serial, int argc, const char** argv);
60 static int install_multiple_app(TransportType t, const char* serial, int argc, const char** argv);
61 static int uninstall_app(TransportType t, const char* serial, int argc, const char** argv);
62 static int install_app_legacy(TransportType t, const char* serial, int argc, const char** argv);
63 static int uninstall_app_legacy(TransportType t, const char* serial, int argc, const char** argv);
714 static int adb_shell(int argc, const char** argv) { in adb_shell() argument
733 ++argv; in adb_shell()
737 if (!strcmp(argv[0], "-e")) { in adb_shell()
738 if (argc < 2 || !(strlen(argv[1]) == 1 || strcmp(argv[1], "none") == 0)) { in adb_shell()
742 escape_char = (strcmp(argv[1], "none") == 0) ? 0 : argv[1][0]; in adb_shell()
[all …]
/system/firewalld/
Diptables.cc331 std::vector<std::string> argv; in AddAcceptRule() local
332 argv.push_back(executable_path); in AddAcceptRule()
333 argv.push_back("-I"); // insert in AddAcceptRule()
334 argv.push_back("INPUT"); in AddAcceptRule()
335 argv.push_back("-p"); // protocol in AddAcceptRule()
336 argv.push_back(protocol == kProtocolTcp ? "tcp" : "udp"); in AddAcceptRule()
337 argv.push_back("--dport"); // destination port in AddAcceptRule()
338 argv.push_back(std::to_string(port)); in AddAcceptRule()
340 argv.push_back("-i"); // interface in AddAcceptRule()
341 argv.push_back(interface); in AddAcceptRule()
[all …]
/system/core/toolbox/
Dprlimit.c45 int prlimit_main(int argc, char *argv[]) in prlimit_main() argument
53 usage(*argv); in prlimit_main()
55 if (sscanf(argv[1], "%d", &pid) != 1) in prlimit_main()
56 usage(*argv); in prlimit_main()
58 if (sscanf(argv[2], "%d", &resource) != 1) in prlimit_main()
59 usage(*argv); in prlimit_main()
61 if (sscanf(argv[3], "%llu", &rl.rlim_cur) != 1) in prlimit_main()
62 usage(*argv); in prlimit_main()
64 if (sscanf(argv[4], "%llu", &rl.rlim_max) != 1) in prlimit_main()
65 usage(*argv); in prlimit_main()
Dtoolbox.c9 static int toolbox_main(int argc, char **argv) in toolbox_main() argument
13 return main(argc - 1, argv + 1); in toolbox_main()
43 int main(int argc, char **argv) in main() argument
46 char *name = argv[0]; in main()
54 if((argc > 1) && (argv[1][0] == '@')) { in main()
55 name = argv[1] + 1; in main()
57 argv++; in main()
59 char *cmd = strrchr(argv[0], '/'); in main()
66 return tools[i].func(argc, argv); in main()
70 printf("%s: no such tool\n", argv[0]); in main()
Dsendevent.c11 int sendevent_main(int argc, char *argv[]) in sendevent_main() argument
19 fprintf(stderr, "use: %s device type code value\n", argv[0]); in sendevent_main()
23 fd = open(argv[1], O_RDWR); in sendevent_main()
25 fprintf(stderr, "could not open %s, %s\n", argv[optind], strerror(errno)); in sendevent_main()
29 fprintf(stderr, "could not get driver version for %s, %s\n", argv[optind], strerror(errno)); in sendevent_main()
33 event.type = atoi(argv[2]); in sendevent_main()
34 event.code = atoi(argv[3]); in sendevent_main()
35 event.value = atoi(argv[4]); in sendevent_main()
/system/extras/multinetwork/
Dcommon.cpp71 bool Arguments::parseArguments(int argc, const char* argv[]) { in parseArguments() argument
72 if (argc < 1 || argv == nullptr) { return false; } in parseArguments()
75 if (strEqual(argv[i], "--nethandle")) { in parseArguments()
78 if (!parseNetworkHandle(argv[i], &nethandle)) { in parseArguments()
79 std::cerr << "Failed to parse nethandle: '" << argv[i] << "'" in parseArguments()
83 } else if (strEqual(argv[i], "--family")) { in parseArguments()
86 if (strEqual(argv[i], "unspec")) { in parseArguments()
88 } else if (strEqual(argv[i], "ipv4")) { in parseArguments()
90 } else if (strEqual(argv[i], "ipv6")) { in parseArguments()
95 } else if (strEqual(argv[i], "--mode")) { in parseArguments()
[all …]
/system/extras/tests/memtest/
Dmemtest.cpp63 int copy_bandwidth(int argc, char** argv);
64 int write_bandwidth(int argc, char** argv);
65 int read_bandwidth(int argc, char** argv);
66 int per_core_bandwidth(int argc, char** argv);
67 int multithread_bandwidth(int argc, char** argv);
68 int malloc_test(int argc, char** argv);
69 int madvise_test(int argc, char** argv);
70 int stack_smasher_test(int argc, char** argv);
71 int crawl_test(int argc, char** argv);
72 int fp_test(int argc, char** argv);
[all …]
/system/core/fs_mgr/
Dfs_mgr_main.c35 static void parse_options(int argc, char *argv[], int *a_flag, int *u_flag, int *n_flag, in parse_options() argument
38 me = basename(strdup(argv[0])); in parse_options()
44 if (!strcmp(argv[1], "-a")) { in parse_options()
50 if (!strcmp(argv[1], "-n")) { in parse_options()
55 *n_name = argv[2]; in parse_options()
56 *n_blk_dev = argv[3]; in parse_options()
58 if (!strcmp(argv[1], "-u")) { in parse_options()
78 int main(int argc, char *argv[]) in main() argument
91 parse_options(argc, argv, &a_flag, &u_flag, &n_flag, &n_name, &n_blk_dev); in main()
94 fstab_file = argv[argc - 1]; in main()
/system/core/metricsd/
Dmetrics_client.cc88 static int SendStats(char* argv[], in SendStats() argument
92 const char* name = argv[name_index]; in SendStats()
95 sample = static_cast<int>(ParseDouble(argv[name_index + 1]) * 1000.0); in SendStats()
97 sample = ParseInt(argv[name_index + 1]); in SendStats()
105 int max = ParseInt(argv[name_index + 2]); in SendStats()
108 int min = ParseInt(argv[name_index + 2]); in SendStats()
109 int max = ParseInt(argv[name_index + 3]); in SendStats()
110 int nbuckets = ParseInt(argv[name_index + 4]); in SendStats()
116 static int SendCrosEvent(char* argv[], int action_index) { in SendCrosEvent() argument
117 const char* event = argv[action_index]; in SendCrosEvent()
[all …]
/system/extras/ext4_utils/
Dblk_alloc_to_base_fs.c31 int main(int argc, char **argv) in main() argument
38 usage(argv[0]); in main()
41 blk_alloc_file = fopen(argv[1], "r"); in main()
43 fprintf(stderr, "failed to open %s: %s\n", argv[1], strerror(errno)); in main()
46 base_fs_file = fopen(argv[2], "w"); in main()
48 fprintf(stderr, "failed to open %s: %s\n", argv[2], strerror(errno)); in main()
53 printf("%s is already in *.base_fs format, just copying into %s...\n", argv[1], argv[2]); in main()
60 printf("Converting %s into *.base_fs format as %s...\n", argv[1], argv[2]); in main()

12345678910>>...13