/system/netd/server/ |
D | CommandListener.cpp | 90 int runCommand(SocketClient *c, int argc, char **argv) { in runCommand() argument 92 return mWrappedCmd->runCommand(c, argc, argv); in runCommand() 128 int argc, char **argv) { in runCommand() argument 134 if (!strcmp(argv[1], "list")) { in runCommand() 160 if (!strcmp(argv[1], "getcfg")) { in runCommand() 169 if (ifc_get_info(argv[2], &addr.s_addr, &prefixLength, &flags)) { in runCommand() 175 if (ifc_get_hwaddr(argv[2], (void *) hwaddr)) { in runCommand() 176 ALOGW("Failed to retrieve HW addr for %s (%s)", argv[2], strerror(errno)); in runCommand() 206 } else if (!strcmp(argv[1], "setcfg")) { in runCommand() 219 if (!inet_aton(argv[3], &addr)) { in runCommand() [all …]
|
D | ndc.cpp | 36 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 …]
|
D | CommandListener.h | 57 int runCommand(SocketClient *c, int argc, char ** argv); 64 int runCommand(SocketClient *c, int argc, char ** argv); 71 int runCommand(SocketClient *c, int argc, char ** argv); 78 int runCommand(SocketClient *c, int argc, char ** argv); 85 int runCommand(SocketClient *c, int argc, char ** argv); 92 int runCommand(SocketClient *c, int argc, char ** argv); 99 int runCommand(SocketClient *c, int argc, char ** argv); 110 int runCommand(SocketClient *c, int argc, char ** argv); 117 int runCommand(SocketClient *c, int argc, char ** argv); 120 bool parseAndExecuteSetNetDns(int netId, int argc, const char** argv); [all …]
|
/system/security/keystore/ |
D | keystore_cli.cpp | 50 if (strcmp(argv[1], #cmd) == 0) { \ 53 fprintf(stderr, "%s: could not connect: %d\n", argv[0], ret); \ 64 if (strcmp(argv[1], #cmd) == 0) { \ 66 fprintf(stderr, "Usage: %s " #cmd " <name>\n", argv[0]); \ 69 int32_t ret = service->cmd(String16(argv[2])); \ 71 fprintf(stderr, "%s: could not connect: %d\n", argv[0], ret); \ 82 if (strcmp(argv[1], #cmd) == 0) { \ 84 fprintf(stderr, "Usage: %s " #cmd " <name>\n", argv[0]); \ 87 int32_t ret = service->cmd(atoi(argv[2])); \ 89 fprintf(stderr, "%s: could not connect: %d\n", argv[0], ret); \ [all …]
|
/system/bt/tools/hci/ |
D | main.c | 11 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); 53 static int help(int argc, char** argv) { in help() argument 59 const command_t* command = find_command(argv[0]); in help() 61 printf("No command named '%s'.\n", argv[0]); in help() 65 printf("%s %s\n", argv[0], command->help); in help() [all …]
|
/system/bt/service/test/ |
D | settings_unittest.cc | 47 const base::CommandLine::CharType* argv[] = {"program"}; in TEST_F() local 48 EXPECT_TRUE(base::CommandLine::Init(arraysize(argv), argv)); in TEST_F() 53 const base::CommandLine::CharType* argv[] = { in TEST_F() local 55 EXPECT_TRUE(base::CommandLine::Init(arraysize(argv), argv)); in TEST_F() 60 const base::CommandLine::CharType* argv[] = {"program", "--foobarbaz"}; in TEST_F() local 61 EXPECT_TRUE(base::CommandLine::Init(arraysize(argv), argv)); in TEST_F() 66 const base::CommandLine::CharType* argv[] = {"program", "foobarbaz"}; in TEST_F() local 67 EXPECT_TRUE(base::CommandLine::Init(arraysize(argv), argv)); in TEST_F() 72 const base::CommandLine::CharType* argv[] = { in TEST_F() local 74 EXPECT_TRUE(base::CommandLine::Init(arraysize(argv), argv)); in TEST_F() [all …]
|
/system/vold/ |
D | CryptCommandListener.cpp | 64 void CryptCommandListener::dumpArgs(int argc, char **argv, int argObscure) { in dumpArgs() argument 71 unsigned int len = strlen(argv[i]) + 1; // Account for space in dumpArgs() 82 strcpy(p, argv[i]); in dumpArgs() 83 p+= strlen(argv[i]); in dumpArgs() 175 int argc, char **argv) { in runCommand() argument 188 std::string subcommand(argv[1]); in runCommand() 191 dumpArgs(argc, argv, 2); in runCommand() 192 rc = cryptfs_check_passwd(argv[2]); in runCommand() 195 dumpArgs(argc, argv, -1); in runCommand() 202 dumpArgs(argc, argv, -1); in runCommand() [all …]
|
D | CommandListener.cpp | 72 void CommandListener::dumpArgs(int argc, char **argv, int argObscure) { in dumpArgs() argument 79 unsigned int len = strlen(argv[i]) + 1; // Account for space in dumpArgs() 90 strcpy(p, argv[i]); in dumpArgs() 91 p+= strlen(argv[i]); in dumpArgs() 145 int argc, char **argv) { in runCommand() argument 146 dumpArgs(argc, argv, -1); in runCommand() 158 std::string cmd(argv[1]); in runCommand() 170 std::string id(argv[2]); in runCommand() 176 std::string type(argv[3]); in runCommand() 185 int frac = atoi(argv[4]); in runCommand() [all …]
|
D | vdc.cpp | 41 static int do_cmd(int sock, int argc, char **argv); 45 int main(int argc, char **argv) { in main() argument 50 progname = argv[0]; in main() 54 android::base::InitLogging(argv, &android::base::KernelLogger); in main() 56 android::base::InitLogging(argv, &android::base::StderrLogger); in main() 59 wait_for_socket = argc > 1 && strcmp(argv[1], "--wait") == 0; in main() 61 argv++; in main() 71 if (!strcmp(argv[1], "cryptfs")) { in main() 86 if (!strcmp(argv[1], "monitor")) { in main() 89 exit(do_cmd(sock, argc, argv)); in main() [all …]
|
/system/extras/tests/cpueater/ |
D | daemonize.c | 31 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/core/adb/ |
D | commandline.cpp | 65 static int install_app(int argc, const char** argv); 66 static int install_multiple_app(int argc, const char** argv); 67 static int uninstall_app(int argc, const char** argv); 68 static int install_app_legacy(int argc, const char** argv); 69 static int uninstall_app_legacy(int argc, const char** argv); 672 static int adb_shell(int argc, const char** argv) { in adb_shell() argument 688 argv[0] = "adb shell"; // So getopt(3) error messages start "adb shell". in adb_shell() 691 __argv = const_cast<char**>(argv); in adb_shell() 695 while ((opt = getopt(argc, const_cast<char**>(argv), "+e:ntTx")) != -1) { in adb_shell() 771 command = android::base::Join(std::vector<const char*>(argv + optind, argv + argc), ' '); in adb_shell() [all …]
|
/system/extras/bootctl/ |
D | bootctl.cpp | 30 static void usage(FILE* where, int /* argc */, char* argv[]) in usage() argument 50 argv[0], argv[0], argv[0], argv[0], argv[0], argv[0], in usage() 51 argv[0], argv[0], argv[0], argv[0], argv[0]); in usage() 157 static uint32_t parse_slot(int pos, int argc, char *argv[]) in parse_slot() argument 160 usage(stderr, argc, argv); in parse_slot() 165 uint64_t ret = strtoul(argv[pos], NULL, 10); in parse_slot() 167 usage(stderr, argc, argv); in parse_slot() 174 int main(int argc, char *argv[]) in main() argument 180 usage(stderr, argc, argv); in main() 190 if (strcmp(argv[1], "hal-info") == 0) { in main() [all …]
|
/system/extras/multinetwork/ |
D | common.cpp | 71 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/ |
D | memtest.cpp | 63 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/ |
D | fs_mgr_main.cpp | 39 static void parse_options(int argc, char * const argv[], int *a_flag, int *u_flag, int *n_flag, in parse_options() argument 42 me = basename(argv[0]); in parse_options() 48 if (!strcmp(argv[1], "-a")) { in parse_options() 54 if (!strcmp(argv[1], "-n")) { in parse_options() 59 *n_name = argv[2]; in parse_options() 60 *n_blk_dev = argv[3]; in parse_options() 62 if (!strcmp(argv[1], "-u")) { in parse_options() 82 int main(int argc, char * const argv[]) in main() argument 94 const_cast<char **>(argv), &android::base::KernelLogger); in main() 96 parse_options(argc, argv, &a_flag, &u_flag, &n_flag, &n_name, &n_blk_dev); in main() [all …]
|
/system/libufdt/utils/src/ |
D | mkdtimg.c | 24 extern int handle_command_help(int argc, char *argv[], int arg_start); 26 extern int handle_command_dump(int argc, char *argv[], int arg_start); 28 extern int handle_command_create(int argc, char *argv[], int arg_start); 30 extern int handle_command_cfg_create(int argc, char *argv[], int arg_start); 36 int (*handler)(int argc, char *argv[], int arg_start); 92 int handle_command_help(int argc, char *argv[], int arg_start) { in handle_command_help() argument 93 const char *prog_name = argv[0]; in handle_command_help() 100 if (strcmp(argv[arg_start], "all") == 0) { in handle_command_help() 105 const struct command_info *info = search_command(argv[arg_start]); in handle_command_help() 116 int main(int argc, char *argv[]) { in main() argument [all …]
|
/system/extras/ext4_utils/ |
D | blk_alloc_to_base_fs.c | 31 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()
|
/system/core/init/test_service/ |
D | test_service.cpp | 25 void Usage(char* argv[]) { in Usage() argument 26 printf("Usage: %s <status field> <value> [<status field> <value>]*\n", argv[0]); in Usage() 27 printf("E.g.: $ %s Uid \"1000 1000 1000 1000\"\n", argv[0]); in Usage() 30 int main(int argc, char* argv[]) { in main() argument 32 Usage(argv); in main() 38 Usage(argv); in main() 64 std::string expected_value = argv[i + 1]; in main() 65 auto f = fields.find(argv[i]); in main() 68 LOG(ERROR) << "field '" << argv[i] << "' expected '" << expected_value in main() 73 LOG(WARNING) << "could not find field '" << argv[i] << "'"; in main()
|
/system/extras/memcpy-perf/ |
D | memcpy-perf.cpp | 52 int main(int argc, char *argv[]) in main() argument 56 usage(argv[0]); in main() 60 if (string(argv[i]) == string("--memcpy")) { in main() 62 } else if (string(argv[i]) == string("--memset")) { in main() 64 } else if (string(argv[i]) == string("--sum")) { in main() 66 } else if (string(argv[i]) == string("--dummy")) { in main() 69 if (string(argv[i]) == string("--delay")) { in main() 70 delay = atoi(argv[++i]); in main() 71 } else if (string(argv[i]) == string("--start")) { in main() 72 size_start = atoi(argv[++i]) * (1ull << 20); in main() [all …]
|
/system/sepolicy/tools/sepolicy-analyze/ |
D | sepolicy-analyze.c | 20 int (*func) (int argc, char **argv, policydb_t *policydb); 42 int main(int argc, char **argv) in main() argument 51 usage(argv[0]); in main() 52 policy = argv[1]; in main() 56 if (!strcmp(analyze_components[i].key, argv[2])) { in main() 57 rc = analyze_components[i].func(argc - 2, argv + 2, &policydb); in main() 59 usage(argv[0]); } in main() 64 usage(argv[0]); in main()
|
/system/core/toolbox/ |
D | toolbox.c | 28 int main(int argc, char** argv) { in main() argument 35 char* cmd = strrchr(argv[0], '/'); in main() 36 char* name = cmd ? (cmd + 1) : argv[0]; in main() 40 return tools[i].func(argc, argv); in main() 44 printf("%s: no such tool\n", argv[0]); in main() 48 int toolbox_main(int argc, char** argv) { in toolbox_main() argument 51 return main(argc - 1, argv + 1); in toolbox_main()
|
/system/extras/crypto-perf/ |
D | crypto.cpp | 30 int processOptions(int argc, char **argv, command_data_t *cmd_data) { in processOptions() argument 35 if (argv[i][0] == '-') { in processOptions() 37 if (strcmp(argv[i], "--cpu_to_lock") == 0) { in processOptions() 39 } else if (strcmp(argv[i], "--locked_freq") == 0) { in processOptions() 42 printf("Unknown option %s\n", argv[i]); in processOptions() 51 (argv[i + 1][0] == '-' && !isdigit(argv[i + 1][1]))) { in processOptions() 52 printf("The option %s requires one argument.\n", argv[i]); in processOptions() 55 *save_value = (int)strtol(argv[++i], NULL, 0); in processOptions() 109 int main(int argc, char **argv) { in main() argument 113 if(processOptions(argc, argv, &cmd_data) == -1) { in main()
|
/system/core/logd/ |
D | CommandListener.cpp | 80 char** argv) { in runCommand() argument 92 int id = atoi(argv[1]); in runCommand() 107 char** argv) { in runCommand() argument 114 int id = atoi(argv[1]); in runCommand() 132 char** argv) { in runCommand() argument 144 int id = atoi(argv[1]); in runCommand() 150 unsigned long size = atol(argv[2]); in runCommand() 165 char** argv) { in runCommand() argument 172 int id = atoi(argv[1]); in runCommand() 200 char** argv) { in runCommand() argument [all …]
|
/system/update_engine/ |
D | test_subprocess.cc | 38 int main(int argc, char** argv, char** envp) { in main() argument 40 usage(argv[0], "No command passed"); in main() 42 std::string cmd(argv[1]); in main() 46 usage(argv[0], "No fd passed to fstat"); in main() 47 int fd = atoi(argv[2]); in main() 58 usage(argv[0], "Unknown command"); in main()
|
/system/core/libsparse/ |
D | img2simg.c | 46 int main(int argc, char *argv[]) in main() argument 61 block_size = atoi(argv[3]); in main() 69 if (strcmp(argv[1], "-") == 0) { in main() 72 in = open(argv[1], O_RDONLY | O_BINARY); in main() 74 fprintf(stderr, "Cannot open input file %s\n", argv[1]); in main() 79 if (strcmp(argv[2], "-") == 0) { in main() 82 out = open(argv[2], O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0664); in main() 84 fprintf(stderr, "Cannot open output file %s\n", argv[2]); in main()
|