/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/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/netd/server/ |
D | NdcDispatcher.cpp | 148 int NdcDispatcher::dispatchCommand(int argc, char** argv) { in dispatchCommand() argument 154 if (c->getCommand() == argv[0]) { in dispatchCommand() 155 if (c->runCommand(&mNdc, argc, argv)) { in dispatchCommand() 167 int NdcDispatcher::InterfaceCmd::runCommand(NdcClient* cli, int argc, char** argv) const { in runCommand() 173 if (!strcmp(argv[1], "list")) { in runCommand() 197 if (!strcmp(argv[1], "getcfg")) { in runCommand() 199 Status status = mNetd->interfaceGetCfg(std::string(argv[2]), &interfaceCfgResult); in runCommand() 216 } else if (!strcmp(argv[1], "setcfg")) { in runCommand() 227 interfaceCfg.ifName = argv[2]; in runCommand() 230 if (!inet_aton(argv[3], &addr)) { in runCommand() [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/security/keystore/ |
D | keystore_cli.cpp | 52 if (strcmp(argv[1], #cmd) == 0) { \ 56 fprintf(stderr, "%s: could not connect: %d\n", argv[0], ret); \ 67 if (strcmp(argv[1], #cmd) == 0) { \ 69 fprintf(stderr, "Usage: %s " #cmd " <name>\n", argv[0]); \ 73 service->cmd(String16(argv[2]), &ret); \ 75 fprintf(stderr, "%s: could not connect: %d\n", argv[0], ret); \ 86 if (strcmp(argv[1], #cmd) == 0) { \ 88 fprintf(stderr, "Usage: %s " #cmd " <name>\n", argv[0]); \ 92 service->cmd(atoi(argv[2]), &ret); \ 94 fprintf(stderr, "%s: could not connect: %d\n", argv[0], ret); \ [all …]
|
/system/core/adb/client/ |
D | commandline.cpp | 662 static int adb_shell(int argc, const char** argv) { in adb_shell() argument 678 argv[0] = "adb shell"; // So getopt(3) error messages start "adb shell". in adb_shell() 681 __argv = const_cast<char**>(argv); in adb_shell() 685 while ((opt = getopt(argc, const_cast<char**>(argv), "+e:ntTx")) != -1) { in adb_shell() 761 command = android::base::Join(std::vector<const char*>(argv + optind, argv + argc), ' '); in adb_shell() 769 static int adb_abb(int argc, const char** argv) { in adb_abb() argument 789 service_string.append(argv[i]); in adb_abb() 998 static int ppp(int argc, const char** argv) { in ppp() argument 1000 error_exit("adb %s not implemented on Win32", argv[0]); in ppp() 1003 if (argc < 2) error_exit("usage: adb %s <adb service name> [ppp opts]", argv[0]); in ppp() [all …]
|
D | adb_install.cpp | 61 static int pm_command(int argc, const char** argv) { in pm_command() argument 65 cmd += " " + escape_arg(*argv++); in pm_command() 71 static int uninstall_app_streamed(int argc, const char** argv) { in uninstall_app_streamed() argument 76 if (strcmp(*argv, "-k") == 0) { in uninstall_app_streamed() 87 cmd += " " + escape_arg(*argv++); in uninstall_app_streamed() 93 static int uninstall_app_legacy(int argc, const char** argv) { in uninstall_app_legacy() argument 97 if (!strcmp(argv[i], "-k")) { in uninstall_app_legacy() 111 return pm_command(argc, argv); in uninstall_app_legacy() 114 int uninstall_app(int argc, const char** argv) { in uninstall_app() argument 116 return uninstall_app_legacy(argc, argv); in uninstall_app() [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 179 usage(stderr, argc, argv); in main() 189 if (strcmp(argv[1], "hal-info") == 0) { in main() [all …]
|
/system/core/init/ |
D | main.cpp | 51 int main(int argc, char** argv) { in main() argument 56 if (!strcmp(basename(argv[0]), "ueventd")) { in main() 57 return ueventd_main(argc, argv); in main() 61 if (!strcmp(argv[1], "subcontext")) { in main() 62 android::base::InitLogging(argv, &android::base::KernelLogger); in main() 65 return SubcontextMain(argc, argv, &function_map); in main() 68 if (!strcmp(argv[1], "selinux_setup")) { in main() 69 return SetupSelinux(argv); in main() 72 if (!strcmp(argv[1], "second_stage")) { in main() 73 return SecondStageMain(argc, argv); in main() [all …]
|
/system/core/libkeyutils/ |
D | mini_keyctl.cpp | 47 int main(int argc, const char** argv) { in main() argument 49 const std::string action = argv[1]; in main() 53 std::string type = argv[2]; in main() 54 std::string desc = argv[3]; in main() 55 std::string data = argv[4]; in main() 56 std::string keyring = argv[5]; in main() 60 std::string type = argv[2]; in main() 61 std::string desc = argv[3]; in main() 62 std::string keyring = argv[4]; in main() 66 std::string keyring = argv[2]; 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/partition_tools/ |
D | lpflash.cc | 28 static int usage(int /* argc */, char* argv[]) { in usage() argument 34 argv[0], argv[0]); in usage() 38 int main(int argc, char* argv[]) { in main() argument 40 return usage(argc, argv); in main() 43 std::unique_ptr<LpMetadata> pt = ReadFromImageFile(argv[2]); in main() 49 if (!FlashPartitionTable(argv[1], *pt.get())) { in main()
|
/system/apex/apexd/ |
D | apexd_main.cpp | 34 int HandleSubcommand(char** argv) { in HandleSubcommand() argument 35 if (strcmp("--pre-install", argv[1]) == 0) { in HandleSubcommand() 37 return android::apex::RunPreInstall(argv); in HandleSubcommand() 40 if (strcmp("--post-install", argv[1]) == 0) { in HandleSubcommand() 42 return android::apex::RunPostInstall(argv); in HandleSubcommand() 45 if (strcmp("--bootstrap", argv[1]) == 0) { in HandleSubcommand() 50 LOG(ERROR) << "Unknown subcommand: " << argv[1]; in HandleSubcommand() 69 int main(int /*argc*/, char** argv) { in main() argument 71 android::base::InitLogging(argv, CombinedLogger()); in main() 73 if (argv[1] != nullptr) { in main() [all …]
|
/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() 63 std::string expected_value = argv[i + 1]; in main() 64 auto f = fields.find(argv[i]); in main() 67 LOG(ERROR) << "field '" << argv[i] << "' expected '" << expected_value in main() 72 LOG(WARNING) << "could not find field '" << argv[i] << "'"; in main()
|
/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/simpleperf/ |
D | gtest_main.cpp | 70 int main(int argc, char** argv) { in main() argument 71 android::base::InitLogging(argv, android::base::StderrLogger); in main() 73 testdata_dir = std::string(dirname(argv[0])) + "/testdata"; in main() 75 if (strcmp(argv[i], "-t") == 0 && i + 1 < argc) { in main() 76 testdata_dir = argv[i + 1]; in main() 78 } else if (strcmp(argv[i], "--log") == 0) { in main() 81 if (!GetLogSeverity(argv[i], &log_severity)) { in main() 82 LOG(ERROR) << "Unknown log severity: " << argv[i]; in main() 100 testing::InitGoogleTest(&argc, argv); in main() 103 LOG(ERROR) << "testdata wasn't found. Use \"" << argv[0] << " -t <testdata_dir>\""; in main()
|
/system/extras/ext4_utils/ |
D | blk_alloc_to_base_fs.cpp | 37 int main(int argc, char **argv) in main() argument 44 usage(argv[0]); in main() 47 blk_alloc_file = fopen(argv[1], "r"); in main() 49 fprintf(stderr, "failed to open %s: %s\n", argv[1], strerror(errno)); in main() 52 base_fs_file = fopen(argv[2], "w"); in main() 54 fprintf(stderr, "failed to open %s: %s\n", argv[2], strerror(errno)); in main() 59 printf("%s is already in *.base_fs format, just copying into %s...\n", argv[1], argv[2]); in main() 66 printf("Converting %s into *.base_fs format as %s...\n", argv[1], argv[2]); in main()
|
/system/core/fs_mgr/tools/ |
D | dmctl.cpp | 72 TargetParser(int argc, char** argv) : arg_index_(0), argc_(argc), argv_(argv) {} in TargetParser() argument 148 static int DmCreateCmdHandler(int argc, char** argv) { in DmCreateCmdHandler() argument 153 std::string name = argv[0]; in DmCreateCmdHandler() 158 while (arg_index < argc && argv[arg_index][0] == '-') { in DmCreateCmdHandler() 159 if (strcmp(argv[arg_index], "-ro") == 0) { in DmCreateCmdHandler() 163 std::cerr << "Unrecognized option: " << argv[arg_index] << std::endl; in DmCreateCmdHandler() 169 TargetParser parser(argc - arg_index, argv + arg_index); in DmCreateCmdHandler() 190 static int DmDeleteCmdHandler(int argc, char** argv) { in DmDeleteCmdHandler() argument 196 std::string name = argv[0]; in DmDeleteCmdHandler() 207 [[maybe_unused]] char** argv) { in DmListTargets() argument [all …]
|
/system/tools/sysprop/ |
D | JavaMain.cpp | 40 bool ParseArgs(int argc, char* argv[], Arguments* args, std::string* err) { in ParseArgs() argument 46 int opt = getopt_long_only(argc, argv, "", long_options, nullptr); in ParseArgs() 54 PrintUsage(argv[0]); in ParseArgs() 68 args->input_file_path = argv[optind]; in ParseArgs() 76 int main(int argc, char* argv[]) { in main() argument 79 if (!ParseArgs(argc, argv, &args, &err)) { in main() 80 std::fprintf(stderr, "%s: %s\n", argv[0], err.c_str()); in main() 81 PrintUsage(argv[0]); in main()
|
D | CppMain.cpp | 47 bool ParseArgs(int argc, char* argv[], Arguments* args, std::string* err) { in ParseArgs() argument 56 int opt = getopt_long_only(argc, argv, "", long_options, nullptr); in ParseArgs() 73 PrintUsage(argv[0]); in ParseArgs() 89 PrintUsage(argv[0]); in ParseArgs() 92 args->input_file_path = argv[optind]; in ParseArgs() 99 int main(int argc, char* argv[]) { in main() argument 102 if (!ParseArgs(argc, argv, &args, &err)) { in main() 103 std::fprintf(stderr, "%s: %s\n", argv[0], err.c_str()); in main() 104 PrintUsage(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/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/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/trusty/utils/trusty-ut-ctrl/ |
D | ut-ctrl.c | 60 static void parse_options(int argc, char** argv) { in parse_options() argument 65 c = getopt_long(argc, argv, _sopts, _lopts, &oidx); in parse_options() 80 print_usage_and_exit(argv[0], EXIT_SUCCESS, true); in parse_options() 84 print_usage_and_exit(argv[0], EXIT_FAILURE, false); in parse_options() 89 ut_app = strdup(argv[optind]); in parse_options() 138 int main(int argc, char** argv) { in main() argument 142 print_usage_and_exit(argv[0], EXIT_FAILURE, false); in main() 145 parse_options(argc, argv); in main() 153 print_usage_and_exit(argv[0], EXIT_FAILURE, false); in 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()
|