/device/google/contexthub/util/sensortest/ |
D | sensortest.cpp | 93 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/contexthub/util/nanoapp_cmd/ |
D | nanoapp_cmd.c | 445 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/google/gs-common/touch/gti/ |
D | touch_gti_ical.cpp | 32 int main(int argc, char *argv[]) in main() argument 79 if (strncmp(argv[1], "1", strlen(argv[1])) == 0 || in main() 80 strncmp(argv[1], "gti1", strlen(argv[1])) == 0 || in main() 81 strncmp(argv[1], "gti.1", strlen(argv[1])) == 0) { in main() 109 if (strncmp(argv[2], "read", strlen(argv[2])) == 0) { in main() 131 property_set(ical_write_history_prop_path, argv[2]); in main() 132 property_set(ical_state_prop_path, argv[2]); in main() 133 fwrite(argv[2], 1, strlen(argv[2]), ical_fd); in main() 134 ALOGI("write: %s => %s\n", argv[2], ical_sysfs_path); in main()
|
/device/google/atv/audio_proxy/service/ |
D | ServiceConfigTest.cpp | 22 char* argv[] = {"command", "--name", "service", "--stream", "A:1:2"}; in TEST() local 24 parseServiceConfigFromCommandLine(sizeof(argv) / sizeof(argv[0]), argv); in TEST() 35 char* argv[] = {"command", "--name", "service", "--stream", in TEST() local 38 parseServiceConfigFromCommandLine(sizeof(argv) / sizeof(argv[0]), argv); in TEST() 56 char* argv[] = {"command", "--name", "service"}; in TEST() local 58 parseServiceConfigFromCommandLine(sizeof(argv) / sizeof(argv[0]), argv); in TEST()
|
/device/google/cuttlefish/guest/commands/sensor_injection/ |
D | main.cpp | 188 int main(int argc, char** argv) { in main() argument 190 argv, android::base::LogdLogger(android::base::SYSTEM)); in main() 194 if (!strcmp(argv[1], "rotate")) { in main() 196 CHECK(android::base::ParseInt(argv[2], &rotationDeg)) in main() 199 } else if (!strcmp(argv[1], "hinge_angle")) { in main() 201 CHECK(android::base::ParseInt(argv[2], &angle)) in main() 203 CHECK(angle >= 0 && angle <= 360) << "Bad hinge_angle value: " << argv[2]; in main() 205 } else if (!strcmp(argv[1], "motion")) { in main() 207 CHECK(android::base::ParseDouble(argv[2], &acc_x)) << "Accelerometer x value must be a double"; in main() 208 CHECK(android::base::ParseDouble(argv[3], &acc_y)) << "Accelerometer x value must be a double"; in main() [all …]
|
/device/google/cuttlefish/host/commands/cvd_env/ |
D | main.cc | 66 bool ContainHelpOption(int argc, char** argv) { in ContainHelpOption() argument 68 if (strcmp(argv[i], "--help") == 0 || strcmp(argv[i], "-help") == 0) { in ContainHelpOption() 75 Result<void> CvdEnvMain(int argc, char** argv) { in CvdEnvMain() argument 76 ::android::base::InitLogging(argv, android::base::StderrLogger); in CvdEnvMain() 77 if (ContainHelpOption(argc, argv)) { in CvdEnvMain() 83 const auto& receiver = argv[1]; in CvdEnvMain() 84 const auto& cmd = argv[2]; in CvdEnvMain() 89 if (!android::base::StartsWith(argv[i], '-')) { in CvdEnvMain() 90 args.push_back(argv[i]); in CvdEnvMain() 121 int main(int argc, char** argv) { in main() argument [all …]
|
/device/google/cuttlefish/guest/hals/rild/ |
D | rild_cuttlefish.c | 54 (const struct RIL_Env *, int, char **), RIL_SOCKET_TYPE socketType, int argc, char **argv); 82 static int make_argv(char * args, char ** argv) { in make_argv() argument 89 argv[count] = tok; in make_argv() 96 int main(int argc, char **argv) { in main() argument 124 if (0 == strcmp(argv[i], "-l") && (argc - i > 1)) { in main() 125 rilLibPath = argv[i + 1]; in main() 127 } else if (0 == strcmp(argv[i], "--")) { in main() 131 } else if (0 == strcmp(argv[i], "-c") && (argc - i > 1)) { in main() 132 clientId = argv[i+1]; in main() 135 usage(argv[0]); in main() [all …]
|
/device/generic/goldfish/radio/rild/ |
D | rild_goldfish.c | 59 (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/generic/goldfish/dhcp/client/ |
D | main.cpp | 26 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/tnc/ |
D | main.cpp | 177 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/google/contexthub/util/nanoapp_encr/ |
D | nanoapp_encr.c | 251 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/google/cuttlefish/host/commands/acloud_translator/ |
D | main.cpp | 31 int FallbackToPythonAcloud(char** argv) { in FallbackToPythonAcloud() argument 42 return execv(py_acloud_path.c_str(), argv); in FallbackToPythonAcloud() 45 int TranslatorMain(char** argv) { in TranslatorMain() argument 50 return FallbackToPythonAcloud(argv); in TranslatorMain() 56 return execv(kCvdBinaryPath, argv); in TranslatorMain() 63 int main(int, char** argv) { in main() argument 64 android::base::InitLogging(argv, android::base::StderrLogger); in main() 65 return cuttlefish::TranslatorMain(argv); in main()
|
/device/google/contexthub/util/nanoapp_sign/ |
D | nanoapp_sign.c | 421 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/generic/car/emulator/usbpt/usbip-service/ |
D | UsbIpService.cpp | 14 int main(int argc, char *argv[]) { in main() argument 19 ALOGD("IP: %s\nPort: %s\nDevId: %s\n", argv[1], argv[2], argv[3]); in main() 22 if (!get_usbip_connection(argv[1], argv[2], argv[3], &info)) { in main()
|
/device/google/contexthub/util/nanoapp_postprocess/ |
D | postprocess.c | 633 int main(int argc, char **argv) in main() argument 647 const char *appName = argv[0]; in main() 657 if (argv[i][0] == '-') { in main() 658 prev = argv[i]; in main() 659 if (!strcmp(argv[i], "-v")) in main() 661 else if (!strcmp(argv[i], "-r")) in main() 663 else if (!strcmp(argv[i], "-a")) in main() 665 else if (!strcmp(argv[i], "-e")) in main() 667 else if (!strcmp(argv[i], "-k")) in main() 669 else if (!strcmp(argv[i], "-n")) in main() [all …]
|
D | postprocess_elf.c | 894 int main(int argc, char **argv) in main() argument 909 const char *appName = argv[0]; in main() 920 if (argv[i][0] == '-') { in main() 921 prev = argv[i]; in main() 922 if (!strcmp(argv[i], "-v")) in main() 924 else if (!strcmp(argv[i], "-r")) in main() 926 else if (!strcmp(argv[i], "-s")) in main() 928 else if (!strcmp(argv[i], "-a")) in main() 930 else if (!strcmp(argv[i], "-c")) in main() 932 else if (!strcmp(argv[i], "-e")) in main() [all …]
|
/device/google/contexthub/util/nanotool/ |
D | nanotool.cpp | 297 static std::unique_ptr<ParsedArgs> ParseArgs(int argc, char **argv) { in ParseArgs() argument 311 int c = getopt_long(argc, argv, "x:s:c:f:v::li:", long_opts, &index); in ParseArgs() 320 fprintf(stderr, "%s: Invalid command '%s'\n", argv[0], optarg); in ParseArgs() 326 if (!ParseSensorArg(args->sensors, optarg, argv[0])) { in ParseArgs() 335 argv[0], args->count); in ParseArgs() 364 fprintf(stderr, "%s: Invalid device index %d\n", argv[0], in ParseArgs() 375 if (!ValidateArgs(args, argv[0])) { in ParseArgs() 413 int main(int argc, char **argv) { in main() argument 418 PrintUsage(argv[0]); in main() 422 std::unique_ptr<ParsedArgs> args = ParseArgs(argc, argv); in main() [all …]
|
/device/google/cuttlefish/guest/commands/rename_netiface/ |
D | main.cpp | 26 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/google/cuttlefish/host/commands/record_cvd/ |
D | record_cvd.cc | 41 Result<void> RecordCvdMain(int argc, char* argv[]) { in RecordCvdMain() argument 44 std::string command = argv[1]; in RecordCvdMain() 68 int main(int argc, char* argv[]) { in main() argument 69 ::android::base::InitLogging(argv, android::base::StderrLogger); in main() 70 google::ParseCommandLineFlags(&argc, &argv, true); in main() 72 cuttlefish::Result<void> result = cuttlefish::RecordCvdMain(argc, argv); in main()
|
/device/google/cuttlefish/host/commands/start/ |
D | main.cc | 124 const std::vector<std::string>& argv) { in StartAssembler() argument 126 for (const auto& arg : argv) { in StartAssembler() 137 const std::vector<std::string>& argv) { in StartRunner() argument 139 for (const auto& arg : argv) { in StartRunner() 341 int main(int argc, char** argv) { in main() argument 342 ::android::base::InitLogging(argv, android::base::StderrLogger); in main() 344 std::vector<std::string> args(argv + 1, argv + argc); in main() 368 argv[i] = &args[i-1][0]; // args[] start from 0 in main() 372 gflags::ParseCommandLineNonHelpFlags(&argc, &argv, false); in main()
|
/device/generic/opengl-transport/host/libs/virglrenderer/ |
D | gen_entries.py | 59 def banner_command(argv): argument 66 argv = argv[:] 67 argv[0] = "host/commands/gen-entries.py" 68 return " ".join(argv) 135 print("// Auto-generated with: " + banner_command(sys.argv)) 170 print("// Auto-generated with: " + banner_command(sys.argv))
|
/device/google/trout/tools/tracing/time_utility/ |
D | ClocktimeMain.cpp | 93 int main(int argc, char* argv[]) { in main() argument 97 if (!(strcmp(argv[1], "-h") && strcmp(argv[1], "--help"))) { in main() 101 int res = GetTime(GetClockId(argv[1]), &ts_ns); in main() 109 if (strcmp(argv[2], "--trace")) { in main() 113 clockid_t clockid = GetClockId(argv[1]); in main()
|
/device/google/trout/hal/vehicle/2.0/garage_mode_helper/ |
D | helper.cpp | 25 int main(int argc, char* argv[]) { in main() argument 27 fprintf(stderr, "syntax: %s <path> <command>\n", argv[0]); in main() 40 strncpy(addr.sun_path, argv[1], sizeof(addr.sun_path)); in main() 48 ok = write(fd, argv[2], strlen(argv[2])); in main()
|
/device/google/cuttlefish/host/commands/secure_env/ |
D | secure_env_not_windows_main.cpp | 111 std::vector<char*> argv(gflags::GetArgvs().size() + 1, nullptr); in ReExecSelf() local 113 argv[i] = strdup(gflags::GetArgvs()[i].c_str()); in ReExecSelf() 114 CHECK(argv[i] != nullptr) << "OOM"; in ReExecSelf() 116 execv(SecureEnvBinary().c_str(), argv.data()); in ReExecSelf() 254 Result<void> SecureEnvMain(int argc, char** argv) { in SecureEnvMain() argument 255 DefaultSubprocessLogging(argv); in SecureEnvMain() 256 gflags::ParseCommandLineFlags(&argc, &argv, true); in SecureEnvMain() 434 int main(int argc, char** argv) { in main() argument 435 auto result = cuttlefish::SecureEnvMain(argc, argv); in main()
|
/device/generic/goldfish/tools/ |
D | mk_qemu_ramdisk.py | 6 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];
|