Home
last modified time | relevance | path

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

1234

/device/google/crosshatch/audio/
Dconvert_config_string.py341 def main(argv): argument
345 if (len(argv)<4):
366 if (argv[1]=='bin'):
367 binary2header(argv[2],argv[3],argv[4],0)
368 elif (argv[1]=='txt'):
369 header2binary(argv[2],None,0,argv[3],argv[4])
370 elif (argv[1]=='bin16'):
371 if (len(argv)==5):
372 binary2header(argv[2],argv[3],argv[4],1,None,None)
373 elif (len(argv)==7):
[all …]
/device/google/bonito/audio/
Dconvert_config_string.py341 def main(argv): argument
345 if (len(argv)<4):
366 if (argv[1]=='bin'):
367 binary2header(argv[2],argv[3],argv[4],0)
368 elif (argv[1]=='txt'):
369 header2binary(argv[2],None,0,argv[3],argv[4])
370 elif (argv[1]=='bin16'):
371 if (len(argv)==5):
372 binary2header(argv[2],argv[3],argv[4],1,None,None)
373 elif (len(argv)==7):
[all …]
/device/google/contexthub/util/sensortest/
Dsensortest.cpp93 bool parseArguments(int argc, char **argv) in parseArguments() argument
102 if (!strcmp(argv[currArgumentIndex], "-h")) { in parseArguments()
104 } else if (!strcmp(argv[currArgumentIndex], "-l")) { in parseArguments()
107 } else if (!strcmp(argv[currArgumentIndex], "-e")) { in parseArguments()
113 if ((sensorIndex = findSensorTypeInSensorList(atoi(argv[currArgumentIndex+1]))) < 0) { in parseArguments()
114 printf ("No sensor found with type \"%d\"\n", atoi(argv[currArgumentIndex+1])); in parseArguments()
118 existingSensorConfigIndex = findSensorTypeInConfigList(atoi(argv[currArgumentIndex+1])); in parseArguments()
121 … printf("Replacing previous config for sensor type %d\n", atoi(argv[currArgumentIndex+1])); in parseArguments()
124 .type = atoi(argv[currArgumentIndex+1]), in parseArguments()
125 .rate = atoi(argv[currArgumentIndex+2]), in parseArguments()
[all …]
/device/google/cuttlefish/guest/commands/ip_link_add/
Dmain.cpp27 int main(int argc, char *argv[]) { in main() argument
28 if (!((argc == 5 && std::string(argv[1]) == "vlan") || in main()
29 (argc == 4 && std::string(argv[1]) == "virt_wifi"))) { in main()
31 std::cerr << " " << argv[0] << " vlan [ethA] [ethB] [index]\n"; in main()
32 std::cerr << " " << argv[0] << " virt_wifi [ethA] [ethB]\n"; in main()
35 const char *const name = argv[2]; in main()
38 fprintf(stderr, "%s: invalid interface name '%s'\n", argv[2], name); in main()
41 const char *const new_name = argv[3]; in main()
54 link_add_request.AddString(IFLA_INFO_KIND, argv[1]); in main()
56 if (std::string(argv[1]) == "vlan") { in main()
[all …]
/device/generic/goldfish/dhcp/client/
Dmain.cpp26 int main(int argc, char* argv[]) { in main() argument
28 usage(argv[0]); in main()
35 if (strcmp(argv[i], "-i") == 0) { in main()
37 interfaceName = argv[++i]; in main()
40 usage(argv[0]); in main()
43 } else if (strcmp(argv[i], "--no-gateway") == 0) { in main()
46 ALOGE("ERROR: unknown parameters %s", argv[i]); in main()
47 usage(argv[0]); in main()
53 usage(argv[0]); in main()
/device/generic/goldfish/wifi/execns/
Dexecns.cpp208 static int execCommand( int argc, char** argv) { in execCommand() argument
209 if (argc <= 0 || argv == nullptr || argv[0] == nullptr) { in execCommand()
216 arguments.insert(arguments.begin(), argv, argv + argc); in execCommand()
220 if (execvp(argv[0], arguments.data()) == -1) { in execCommand()
224 "Could not execute command '%s", argv[0]); in execCommand()
233 if (strchr(argv[i], ' ')) { in execCommand()
234 sncatf(buffer, sizeof(buffer), " \"%s\"", argv[i]); in execCommand()
236 sncatf(buffer, sizeof(buffer), " %s", argv[i]); in execCommand()
251 int main(int argc, char* argv[]) { in main() argument
260 if (::strcmp(argv[i], "-u") == 0) { in main()
[all …]
/device/google/contexthub/util/nanoapp_cmd/
Dnanoapp_cmd.c445 int main(int argc, char *argv[]) in main() argument
453 if (argc < 3 && (argc < 2 || strcmp(argv[1], "download") != 0)) { in main()
454 printf("usage: %s <action> <sensor> <data> -d\n", argv[0]); in main()
465 … printf(" -d: if specified, %s will keep draining /dev/nanohub until cancelled.\n", argv[0]); in main()
466 printf("usage: %s <cmd> [app]\n", argv[0]); in main()
473 if (strcmp(argv[1], "config") == 0) { in main()
479 if(strcmp(argv[6], "-d") == 0) { in main()
485 if (strcmp(argv[3], "true") == 0) in main()
487 else if (strcmp(argv[3], "false") == 0) { in main()
490 printf("Unsupported data: %s For action: %s\n", argv[3], argv[1]); in main()
[all …]
/device/linaro/hikey/hifi/xaf/host-apf/playback/
Dxa_playback.c87 int main(int argc, char **argv)
102 " [-n n_periods] \n", argv[0]);
106 filename = argv[1];
142 argv += 2;
143 while (*argv) {
144 if (strcmp(*argv, "-d") == 0) {
145 argv++;
146 if (*argv)
147 device = atoi(*argv);
149 if (strcmp(*argv, "-p") == 0) {
[all …]
/device/generic/goldfish/network/netmgr/
Dfork.cpp27 bool forkAndExec(const char* argv[]) { in forkAndExec() argument
37 for (size_t i = 0; argv[i]; ++i) { in forkAndExec()
39 "%s ", argv[i]); in forkAndExec()
42 execvp(argv[0], const_cast<char* const*>(argv)); in forkAndExec()
43 LOGE("Failed to run '%s': %s", argv[0], strerror(errno)); in forkAndExec()
55 LOGE("Error: '%s' exited with code: %d", argv[0], exitStatus); in forkAndExec()
58 argv[0], WTERMSIG(status)); in forkAndExec()
Dmain.cpp59 int main(int argc, char* argv[]) { in main() argument
64 if (strcmp(argv[i], "--if-prefix") == 0 && i + 1 < argc) { in main()
65 interfacePrefix = argv[++i]; in main()
66 } else if (strcmp(argv[i], "--bridge") == 0 && i + 1 < argc) { in main()
67 bridgeInterfaces = argv[++i]; in main()
69 LOGE("Unknown parameter '%s'", argv[i]); in main()
70 usage(argv[0]); in main()
82 usage(argv[0]); in main()
/device/generic/goldfish/radio/rild/
Drild_goldfish.c59 (const struct RIL_Env *, int, char **), RIL_SOCKET_TYPE socketType, int argc, char **argv);
87 static int make_argv(char * args, char ** argv) { in make_argv() argument
94 argv[count] = tok; in make_argv()
101 int main(int argc, char **argv) { in main() argument
130 if (0 == strcmp(argv[i], "-l") && (argc - i > 1)) { in main()
131 rilLibPath = argv[i + 1]; in main()
133 } else if (0 == strcmp(argv[i], "--")) { in main()
137 } else if (0 == strcmp(argv[i], "-c") && (argc - i > 1)) { in main()
138 clientId = argv[i+1]; in main()
141 usage(argv[0]); in main()
[all …]
/device/google/cuttlefish/guest/hals/rild/
Drild_cuttlefish.c55 (const struct RIL_Env *, int, char **), RIL_SOCKET_TYPE socketType, int argc, char **argv);
83 static int make_argv(char * args, char ** argv) { in make_argv() argument
90 argv[count] = tok; in make_argv()
97 int main(int argc, char **argv) { in main() argument
127 if (0 == strcmp(argv[i], "-l") && (argc - i > 1)) { in main()
128 rilLibPath = argv[i + 1]; in main()
130 } else if (0 == strcmp(argv[i], "--")) { in main()
134 } else if (0 == strcmp(argv[i], "-c") && (argc - i > 1)) { in main()
135 clientId = argv[i+1]; in main()
138 usage(argv[0]); in main()
[all …]
/device/google/cuttlefish/guest/commands/rename_netiface/
Dmain.cpp26 int main(int argc, char *argv[]) { in main() argument
28 fprintf(stderr, "usage: %s [ethA] [ethB]\n", argv[0]); in main()
31 const char *const name = argv[1]; in main()
34 fprintf(stderr, "%s: invalid interface name '%s'\n", argv[0], name); in main()
37 const char *const new_name = argv[2]; in main()
49 fprintf(stderr, "%s: renaming interface '%s' failed\n", argv[0], name); in main()
/device/generic/goldfish/tnc/
Dmain.cpp177 int main(int argc, char* argv[]) { in main() argument
179 usage(argv[0]); in main()
184 if (strcmp("-b", argv[1]) == 0) { in main()
186 } else if (strcmp("-c", argv[1]) == 0) { in main()
188 } else if (strcmp("-s", argv[1]) == 0) { in main()
191 fprintf(stderr, "ERROR: Invalid option '%s'\n", argv[1]); in main()
192 usage(argv[0]); in main()
199 usage(argv[0]); in main()
202 if (!resolve(argv[2], argv[3], &addrs)) { in main()
203 usage(argv[0]); in main()
/device/generic/goldfish/tools/
Dmk_qemu_ramdisk.py6 if len(sys.argv) != 4:
7 print sys.argv[0] + " ramdisk.img vendor_boot.img ramdisk-qemu.img"
10 f1name = sys.argv[1];
11 f2name = sys.argv[2];
12 f3name = sys.argv[3];
/device/generic/opengl-transport/host/commands/emugen/
Dgetopt.c13 int getopt(int argc, char* const argv[], const char* ostr) { in getopt() argument
20 const char* arg = argv[optind]; in getopt()
46 (void)fprintf(stderr, "%s: illegal option -- %c\n", argv[0], optopt); in getopt()
62 optarg = (char *)argv[optind++]; in getopt()
72 argv[0], optopt); in getopt()
Dmain.cpp41 int main(int argc, char *argv[]) in main() argument
50 while((c = getopt(argc, argv, "TE:D:i:hW:")) != -1) { in main()
59 usage(argv[0]); in main()
75 usage(argv[0]); in main()
81 fprintf(stderr, "Usage: %s [options] <base name> \n", argv[0]); in main()
93 std::string baseName = std::string(argv[optind]); in main()
/device/linaro/dragonboard/qcom/qrtr/src/
Dcfg.c25 int main(int argc, char **argv) in main() argument
30 const char *progname = basename(argv[0]); in main()
37 addrul = strtoul(argv[1], &ep, 10); in main()
38 if (argv[1][0] == '\0' || *ep != '\0' || addrul >= UINT_MAX) in main()
/device/google/contexthub/util/nanoapp_encr/
Dnanoapp_encr.c251 int main(int argc, char **argv) in main() argument
260 const char *appName = argv[0]; in main()
273 if (argv[i][0] == '-') { in main()
274 prev = argv[i]; in main()
275 if (!strcmp(argv[i], "-d")) in main()
277 else if (!strcmp(argv[i], "-e")) in main()
279 else if (!strcmp(argv[i], "-k")) in main()
281 else if (!strcmp(argv[i], "-i")) in main()
284 fatalUsage(appName, "unknown argument", argv[i]); in main()
287 uint64_t tmp = strtoull(argv[i], &end, 16); in main()
[all …]
/device/generic/goldfish/camera/
DEmulatorCameraTest.cpp154 int main(int argc, char* argv[]) { in main() argument
167 if (!strncmp(argv[1], "RGB", 3)) { in main()
170 } else if (!strncmp(argv[1], "NV21", 3)) { in main()
173 } else if (!strncmp(argv[1], "YV12", 3)) { in main()
176 } else if (!strncmp(argv[1], "YU12", 3)) { in main()
183 uint32_t width = atoi(argv[2]); in main()
184 uint32_t height = atoi(argv[3]); in main()
185 uint32_t repeated = atoi(argv[4]); in main()
187 if (!strncmp(argv[5], "web", 3)) { in main()
189 } else if (!strncmp(argv[5], "vir", 3)) { in main()
[all …]
/device/google/cuttlefish/host/frontend/vnc_server/
Dmain.cpp29 int main(int argc, char* argv[]) { in main() argument
30 cuttlefish::DefaultSubprocessLogging(argv); in main()
31 google::ParseCommandLineFlags(&argc, &argv, true); in main()
/device/google/contexthub/util/nanoapp_sign/
Dnanoapp_sign.c421 int main(int argc, char **argv) in main() argument
427 const char *appName = argv[0]; in main()
447 if (argv[i][0] == '-') { in main()
448 prev = argv[i]; in main()
449 if (!strcmp(argv[i], "-v")) in main()
451 else if (!strcmp(argv[i], "-s")) in main()
453 else if (!strcmp(argv[i], "-t")) in main()
455 else if (!strcmp(argv[i], "-b")) in main()
457 else if (!strcmp(argv[i], "-e")) in main()
459 else if (!strcmp(argv[i], "-m")) in main()
[all …]
/device/google/cuttlefish/host/commands/config_server/
Dmain.cpp29 int main(int argc, char** argv) { in main() argument
30 cuttlefish::DefaultSubprocessLogging(argv); in main()
31 google::ParseCommandLineFlags(&argc, &argv, true); in main()
/device/generic/opengl-transport/host/libs/virglrenderer/
Dgen_entries.py56 def banner_command(argv): argument
63 argv = argv[:]
64 argv[0] = "host/commands/gen-entries.py"
65 return ' '.join(argv)
131 print "// Auto-generated with: %s" % banner_command(sys.argv)
166 print "// Auto-generated with: %s" % banner_command(sys.argv)
/device/google/cuttlefish/host/commands/launch/
Dlaunch_cvd.cc61 const std::vector<std::string>& argv) { in StartAssembler() argument
63 for (const auto& arg : argv) { in StartAssembler()
74 const std::vector<std::string>& argv) { in StartRunner() argument
76 for (const auto& arg : argv) { in StartRunner()
145 int main(int argc, char** argv) { in main() argument
146 ::android::base::InitLogging(argv, android::base::StderrLogger); in main()
150 gflags::ParseCommandLineNonHelpFlags(&argc, &argv, false); in main()

1234