Home
last modified time | relevance | path

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

12345678910>>...18

/system/bt/service/test/
Dsettings_unittest.cc47 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/
Dmain.c11 typedef int (*handler_t)(int argc, char** argv);
27 static int help(int argc, char** argv);
28 static int set_discoverable(int argc, char** argv);
29 static int set_name(int argc, char** argv);
30 static int set_pcm_loopback(int argc, char** argv);
31 static int set_sco_route(int argc, char** argv);
54 static int help(int argc, char** argv) { in help() argument
60 const command_t* command = find_command(argv[0]); in help()
62 printf("No command named '%s'.\n", argv[0]); in help()
66 printf("%s %s\n", argv[0], command->help); in help()
[all …]
/system/netd/server/
DNdcDispatcher.cpp148 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/security/keystore/
Dkeystore_cli.cpp52 if (strcmp(argv[1], #cmd) == 0) { \
54 fprintf(stderr, "Usage: %s " #cmd " <name>\n", argv[0]); \
58 service->cmd(String16(argv[2]), &ret); \
60 fprintf(stderr, "%s: could not connect: %d\n", argv[0], ret); \
71 if (strcmp(argv[1], #cmd) == 0) { \
73 fprintf(stderr, "Usage: %s " #cmd " <name>\n", argv[0]); \
77 service->cmd(atoi(argv[2]), &ret); \
79 fprintf(stderr, "%s: could not connect: %d\n", argv[0], ret); \
90 if (strcmp(argv[1], #cmd) == 0) { \
92 fprintf(stderr, "Usage: %s " #cmd " <name> <uid>\n", argv[0]); \
[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/core/adb/client/
Dcommandline.cpp678 static int adb_shell(int argc, const char** argv) { in adb_shell() argument
693 argv[0] = "adb shell"; // So getopt(3) error messages start "adb shell". in adb_shell()
696 __argv = const_cast<char**>(argv); in adb_shell()
700 while ((opt = getopt(argc, const_cast<char**>(argv), "+e:ntTx")) != -1) { in adb_shell()
776 command = android::base::Join(std::vector<const char*>(argv + optind, argv + argc), ' '); in adb_shell()
784 static int adb_abb(int argc, const char** argv) { in adb_abb() argument
803 std::vector<const char*> args(argv + optind, argv + argc); in adb_abb()
813 static int adb_shell_noinput(int argc, const char** argv) { in adb_shell_noinput() argument
819 return adb_shell(argc, argv); in adb_shell_noinput()
1020 static int ppp(int argc, const char** argv) { in ppp() argument
[all …]
/system/core/init/
Dmain.cpp51 int main(int argc, char** argv) { in main() argument
57 if (!strcmp(basename(argv[0]), "ueventd")) { in main()
58 return ueventd_main(argc, argv); in main()
62 if (!strcmp(argv[1], "subcontext")) { in main()
63 android::base::InitLogging(argv, &android::base::KernelLogger); in main()
66 return SubcontextMain(argc, argv, &function_map); in main()
69 if (!strcmp(argv[1], "selinux_setup")) { in main()
70 return SetupSelinux(argv); in main()
73 if (!strcmp(argv[1], "second_stage")) { in main()
74 return SecondStageMain(argc, argv); in main()
[all …]
/system/extras/bootctl/
Dbootctl.cpp39 static void usage(FILE* where, BootCtlVersion bootVersion, int /* argc */, char* argv[]) in usage() argument
57 argv[0], argv[0]); in usage()
170 int argc, char *argv[]) { in do_set_snapshot_merge_status() argument
172 usage(stderr, bootVersion, argc, argv); in do_set_snapshot_merge_status()
177 auto status = stringToMergeStatus(argv[2]); in do_set_snapshot_merge_status()
179 usage(stderr, bootVersion, argc, argv); in do_set_snapshot_merge_status()
228 static uint32_t parse_slot(BootCtlVersion bootVersion, int pos, int argc, char *argv[]) in parse_slot() argument
231 usage(stderr, bootVersion, argc, argv); in parse_slot()
236 uint64_t ret = strtoul(argv[pos], NULL, 10); in parse_slot()
238 usage(stderr, bootVersion, argc, argv); in parse_slot()
[all …]
/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/simpleperf/
Dgtest_main.cpp72 int main(int argc, char** argv) { in main() argument
75 if (android::base::Basename(argv[0]) == "simpleperf") { in main()
76 return RunSimpleperfCmd(argc, argv) ? 0 : 1; in main()
79 android::base::InitLogging(argv, android::base::StderrLogger); in main()
81 testdata_dir = std::string(dirname(argv[0])) + "/testdata"; in main()
83 if (strcmp(argv[i], "-t") == 0 && i + 1 < argc) { in main()
84 testdata_dir = argv[i + 1]; in main()
86 } else if (strcmp(argv[i], "--log") == 0) { in main()
89 if (!GetLogSeverity(argv[i], &log_severity)) { in main()
90 LOG(ERROR) << "Unknown log severity: " << argv[i]; in main()
[all …]
/system/extras/partition_tools/
Dlpflash.cc28 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/
Dapexd_main.cpp35 int HandleSubcommand(char** argv) { in HandleSubcommand() argument
36 if (strcmp("--pre-install", argv[1]) == 0) { in HandleSubcommand()
38 return android::apex::RunPreInstall(argv); in HandleSubcommand()
41 if (strcmp("--post-install", argv[1]) == 0) { in HandleSubcommand()
43 return android::apex::RunPostInstall(argv); in HandleSubcommand()
46 if (strcmp("--bootstrap", argv[1]) == 0) { in HandleSubcommand()
51 if (strcmp("--unmount-all", argv[1]) == 0) { in HandleSubcommand()
56 if (strcmp("--snapshotde", argv[1]) == 0) { in HandleSubcommand()
80 LOG(ERROR) << "Unknown subcommand: " << argv[1]; in HandleSubcommand()
100 int main(int /*argc*/, char** argv) { in main() argument
[all …]
/system/core/fs_mgr/tools/
Ddmctl.cpp68 TargetParser(int argc, char** argv) : arg_index_(0), argc_(argc), argv_(argv) {} in TargetParser() argument
202 static bool parse_table_args(DmTable* table, int argc, char** argv) { in parse_table_args() argument
205 while (arg_index < argc && argv[arg_index][0] == '-') { in parse_table_args()
206 if (strcmp(argv[arg_index], "-ro") == 0) { in parse_table_args()
210 std::cerr << "Unrecognized option: " << argv[arg_index] << std::endl; in parse_table_args()
216 TargetParser parser(argc - arg_index, argv + arg_index); in parse_table_args()
231 static int DmCreateCmdHandler(int argc, char** argv) { in DmCreateCmdHandler() argument
236 std::string name = argv[0]; in DmCreateCmdHandler()
239 int ret = parse_table_args(&table, argc, argv); in DmCreateCmdHandler()
252 static int DmDeleteCmdHandler(int argc, char** argv) { in DmDeleteCmdHandler() argument
[all …]
/system/core/init/test_service/
Dtest_service.cpp25 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/
Dmkdtimg.c24 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/
Dblk_alloc_to_base_fs.cpp37 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/libsnapshot/
Dsnapshotctl.cpp46 bool DumpCmdHandler(int /*argc*/, char** argv) { in DumpCmdHandler() argument
47 android::base::InitLogging(argv, &android::base::StderrLogger); in DumpCmdHandler()
51 bool MergeCmdHandler(int /*argc*/, char** argv) { in MergeCmdHandler() argument
52 android::base::InitLogging(argv, &android::base::StderrLogger); in MergeCmdHandler()
67 int main(int argc, char** argv) { in main() argument
74 if (cmd.first == argv[1]) { in main()
75 return cmd.second(argc, argv) ? EX_OK : EX_SOFTWARE; in main()
/system/tools/sysprop/
DApiCheckerMain.cpp38 int main(int argc, char* argv[]) { in main() argument
40 std::fprintf(stderr, "%s needs 2 arguments\n", argv[0]); in main()
41 PrintUsage(argv[0]); in main()
46 if (auto res = ParseApiFile(argv[1]); res.ok()) { in main()
49 LOG(FATAL) << "parsing sysprop_library API file " << argv[1] in main()
53 if (auto res = ParseApiFile(argv[2]); res.ok()) { in main()
56 LOG(FATAL) << "parsing sysprop_library API file " << argv[2] in main()
DCppMain.cpp50 Result<Arguments> ParseArgs(int argc, char* argv[]) { in ParseArgs() argument
60 int opt = getopt_long_only(argc, argv, "", long_options, nullptr); in ParseArgs()
77 PrintUsage(argv[0]); in ParseArgs()
91 PrintUsage(argv[0]); in ParseArgs()
94 ret.input_file_path = argv[optind]; in ParseArgs()
101 int main(int argc, char* argv[]) { in main() argument
103 if (auto res = ParseArgs(argc, argv); res.ok()) { in main()
106 LOG(ERROR) << argv[0] << ": " << res.error(); in main()
107 PrintUsage(argv[0]); in main()
/system/tools/hidl/test/host_test/
Dmain.cpp114 void populateArgv(std::vector<const char*> options, char** argv) { in populateArgv() argument
116 argv[i] = const_cast<char*>(options.at(i)); in populateArgv()
125 char* argv[options.size()]; in TEST_F() local
127 populateArgv(options, argv); in TEST_F()
128 coordinator.parseOptions(options.size(), argv, "", [&](int /* res */, char* /* arg */) { in TEST_F()
141 char* argv[options.size()]; in TEST_F() local
143 populateArgv(options, argv); in TEST_F()
144 EXPECT_DEATH(coordinator.parseOptions(options.size(), argv, "", in TEST_F()
157 char* argv[options.size()]; in TEST_F() local
159 populateArgv(options, argv); in TEST_F()
[all …]
/system/core/logd/
DCommandListener.cpp67 char** argv) { in runCommand() argument
79 int id = atoi(argv[1]); in runCommand()
90 char** argv) { in runCommand() argument
97 int id = atoi(argv[1]); in runCommand()
111 char** argv) { in runCommand() argument
123 int id = atoi(argv[1]); in runCommand()
129 unsigned long size = atol(argv[2]); in runCommand()
140 char** argv) { in runCommand() argument
147 int id = atoi(argv[1]); in runCommand()
183 char** argv) { in runCommand() argument
[all …]
/system/core/toolbox/
Dtoolbox.c28 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/
Dsepolicy-analyze.c20 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/
Dtest_subprocess.cc38 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/
Dut-ctrl.c60 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()

12345678910>>...18