Home
last modified time | relevance | path

Searched refs:optarg (Results 1 – 24 of 24) sorted by relevance

/base/hiviewdfx/hisysevent/frameworks/native/
Dhisysevent_tool.cpp107 {'v', [] (struct ArgStuct& cmdArg, const char* optarg) { in InitOptHandlers()
109 }}, {'r', [] (struct ArgStuct& cmdArg, const char* optarg) { in InitOptHandlers()
111 }}, {'c', [] (struct ArgStuct& cmdArg, const char* optarg) { in InitOptHandlers()
112 cmdArg.ruleType = GetRuleTypeFromArg(optarg); in InitOptHandlers()
113 }}, {'o', [] (struct ArgStuct& cmdArg, const char* optarg) { in InitOptHandlers()
114 cmdArg.domain = optarg; in InitOptHandlers()
115 }}, {'n', [] (struct ArgStuct& cmdArg, const char* optarg) { in InitOptHandlers()
116 cmdArg.eventName = optarg; in InitOptHandlers()
117 }}, {'t', [] (struct ArgStuct& cmdArg, const char* optarg) { in InitOptHandlers()
118 cmdArg.tag = optarg; in InitOptHandlers()
[all …]
/base/msdp/device_status/tools/vdev/src/
Dvdevadm.cpp109 if ((opt != 't') || (optarg == nullptr)) { in Mount()
115 if (strcmp(optarg, "M") == 0) { in Mount()
118 } else if (strcmp(optarg, "T") == 0) { in Mount()
121 } else if (strcmp(optarg, "K") == 0) { in Mount()
133 if ((opt != 't') || (optarg == nullptr)) { in Unmount()
138 if (strcmp(optarg, "M") == 0) { in Unmount()
141 } else if (strcmp(optarg, "T") == 0) { in Unmount()
144 } else if (strcmp(optarg, "K") == 0) { in Unmount()
156 if ((opt != 't') || (optarg == nullptr)) { in Clone()
162 if (strcmp(optarg, "M") == 0) { in Clone()
[all …]
Dvirtual_mouse_builder.cpp241 ReadActions(optarg); in Act()
245 ReadRawInput(optarg); in Act()
249 VirtualDeviceBuilder::WaitFor(optarg, "mouse"); in Act()
263 CHKPV(optarg); in ReadDownAction()
265 if (strcmp(optarg, "L") == 0) { in ReadDownAction()
268 } else if (strcmp(optarg, "M") == 0) { in ReadDownAction()
271 } else if (strcmp(optarg, "R") == 0) { in ReadDownAction()
283 CHKPV(optarg); in ReadMoveAction()
284 if (!Utility::IsInteger(std::string(optarg)) || (optind < 0) || (optind >= argc)) { in ReadMoveAction()
289 int32_t dx = std::atoi(optarg); in ReadMoveAction()
[all …]
Dvirtual_touchscreen_builder.cpp265 ReadActions(optarg); in Act()
269 ReadRawInput(optarg); in Act()
273 VirtualDeviceBuilder::WaitFor(optarg, "touchscreen"); in Act()
287 CHKPV(optarg); in ReadDownAction()
289 if (!Utility::IsInteger(optarg) || (optind < 0) || (optind + 1 >= argc) || in ReadDownAction()
295 int32_t slot = std::atoi(optarg); in ReadDownAction()
308 CHKPV(optarg); in ReadMoveAction()
310 …if (!Utility::IsInteger(optarg) || (optind < 0) || (optind + 1 >= argc) || !Utility::IsInteger(arg… in ReadMoveAction()
315 int32_t slot = std::atoi(optarg); in ReadMoveAction()
331 CHKPV(optarg); in ReadUpAction()
[all …]
Dvirtual_keyboard_builder.cpp173 ReadActions(optarg); in Act()
177 ReadRawInput(optarg); in Act()
181 VirtualDeviceBuilder::WaitFor(optarg, "keyboard"); in Act()
195 CHKPV(optarg); in ReadDownAction()
196 if (!Utility::IsInteger(optarg)) { in ReadDownAction()
202 int32_t key = std::atoi(optarg); in ReadDownAction()
210 CHKPV(optarg); in ReadUpAction()
211 if (!Utility::IsInteger(optarg)) { in ReadUpAction()
217 int32_t key = std::atoi(optarg); in ReadUpAction()
/base/update/updater/services/diffpatch/
Ddiff_main.cpp37 diffParams.source = optarg; in main()
40 diffParams.destination = optarg; in main()
43 diffParams.patch = optarg; in main()
46 diffParams.limit = atoi(optarg); in main()
49 diffParams.block = atoi(optarg); in main()
/base/hiviewdfx/faultloggerd/tools/dump_catcher/
Dmain.cpp75 if (optarg != nullptr) { in ParseParamters()
76 if (atoi(optarg) > 0) { in ParseParamters()
78 pid = atoi(optarg); in ParseParamters()
86 if (optarg != nullptr) { in ParseParamters()
87 if (atoi(optarg) > 0) { in ParseParamters()
88 tid = atoi(optarg); in ParseParamters()
/base/notification/common_event_service/tools/cem/src/
Dcommon_event_command.cpp126 cmdInfo.action = optarg; in SetPublishCmdInfo()
135 cmdInfo.code = atoi(optarg); in SetPublishCmdInfo()
138 cmdInfo.data = optarg; in SetPublishCmdInfo()
141 cmdInfo.userId = atoi(optarg); in SetPublishCmdInfo()
219 cmdInfo.action = optarg; in SetDumpCmdInfo()
222 cmdInfo.userId = atoi(optarg); in SetDumpCmdInfo()
250 if (strcmp(optarg, "subscriber") == 0) { in CheckDumpEventType()
252 } else if (strcmp(optarg, "sticky") == 0) { in CheckDumpEventType()
254 } else if (strcmp(optarg, "pending") == 0) { in CheckDumpEventType()
256 } else if (strcmp(optarg, "history") == 0) { in CheckDumpEventType()
/base/startup/init/test/benchmark/
Dbenchmark_fwk.cpp91 char *optarg = argv[i]; in ShiftOptions() local
94 …enchmarkLongOptions[index].name && strncmp(g_benchmarkLongOptions[index].name, optarg + 2, // 2 arg in ShiftOptions()
100 argvAfterShift->push_back(optarg); in ShiftOptions()
101 … } else if ((g_benchmarkLongOptions[index].has_arg == required_argument) && !strchr(optarg, '=')) { in ShiftOptions()
118 if (!(*optarg)) { in ParseOptions()
123 opts.cpuNum = strtol(optarg, &errorCheck, 10); // 10 base in ParseOptions()
125 errx(1, "ERROR: Args %s is not a valid integer.", optarg); in ParseOptions()
129 if (!(*optarg)) { in ParseOptions()
134 opts.iterNum = strtol(optarg, &errorCheck, 10); // 10 base in ParseOptions()
136 errx(1, "ERROR: Args %s is not a valid number of iterations.", optarg); in ParseOptions()
/base/security/selinux_adapter/interfaces/tools/hap_restorecon/
Dtest.cpp77 input.apl = optarg; in SetOptions()
85 input.multiPath.emplace_back(optarg); in SetOptions()
89 std::stringstream str(optarg); in SetOptions()
97 input.name = optarg; in SetOptions()
101 input.recurse = optarg; in SetOptions()
/base/startup/init/services/begetctl/
Dsandbox.cpp144 serviceName = optarg; in main_cmd()
148 namespaceName = optarg; in main_cmd()
150 processName = optarg; in main_cmd()
155 serviceName = optarg; in main_cmd()
161 namespaceName = optarg; in main_cmd()
164 std::cout << "process name:" << optarg << std::endl; in main_cmd()
165 processName = optarg; in main_cmd()
/base/powermgr/power_manager/utils/shell/src/
Dpower_shell_command.cpp28 extern char *optarg;
224 if (!optarg) { in DisplayOptargEmpty()
244 StrToInt(optarg, value); in RunAsDisplayCommandOverride()
272 StrToInt(optarg, value); in RunAsDisplayCommandBoost()
300 StrToInt(optarg, value); in RunAsDisplayCommandSetValue()
316 std::stringstream fstr(optarg); in RunAsDisplayCommandDiscount()
335 StrToInt(optarg, value); in RunAsDisplayCommandDelay()
378 if (!optarg) { in RunAsTimeOutCommand()
385 StrToInt(optarg, timeout); in RunAsTimeOutCommand()
/base/hiviewdfx/hitrace/cmd/src/
Dhitrace_cmd.cpp420 if (!StrToNum(optarg, g_bufferSizeKB)) { in ParseLongOpt()
430 if (regex_match(optarg, re)) { in ParseLongOpt()
431 g_clock = optarg; in ParseLongOpt()
440 if (!StrToNum(optarg, g_traceDuration)) { in ParseLongOpt()
444 fprintf(stderr, "Error: \"-t %s\" to be greater than zero. eg: \"--time 5\"\n", optarg); in ParseLongOpt()
452 size_t len = strnlen(optarg, MAX_OUTPUT_LEN); in ParseLongOpt()
453 … if (len == MAX_OUTPUT_LEN || len < 1 || (stat(optarg, &buf) == 0 && (buf.st_mode & S_IFDIR))) { in ParseLongOpt()
457 g_outputFile = optarg; in ParseLongOpt()
486 if (!StrToNum(optarg, g_bufferSizeKB)) { in ParseOpt()
505 if (!StrToNum(optarg, g_traceDuration)) { in ParseOpt()
[all …]
/base/notification/distributed_notification_service/tools/dump/src/
Dnotification_shell_command.cpp214 bundle = optarg; in SetDumpCmdInfo()
217 userId = atoi(optarg); in SetDumpCmdInfo()
260 int32_t count = atoi(optarg); in RunAsSettingCommand()
268 cmd.append(" ").append(std::string(optarg)); in RunAsSettingCommand()
287 std::string info = std::string(optarg); in RunSetEnableCmd()
/base/hiviewdfx/hiview/plugins/usage_event_report/service/
Dusage_event_report_service.cpp138 InitWorkPath(optarg); in ProcessArgsRequest()
150 lastReportTime_ = strtoull(optarg, nullptr, 0); in ProcessArgsRequest()
153 lastSysReportTime_ = strtoull(optarg, nullptr, 0); in ProcessArgsRequest()
/base/security/access_token/tools/accesstoken/src/
Datm_command.cpp208 if (optarg != nullptr) { in RunAsCommandExistentOptionArgument()
209 tokenId = static_cast<uint32_t>(std::atoi(optarg)); in RunAsCommandExistentOptionArgument()
213 if (optarg != nullptr) { in RunAsCommandExistentOptionArgument()
214 permissionName = optarg; in RunAsCommandExistentOptionArgument()
/base/account/os_account/tools/acm/src/
Daccount_command.cpp413 name = optarg; in RunAsCreateCommandExistentOptionArgument()
595 std::string typeByUser = optarg; in AnalyzeTypeArgument()
613 std::string idByUser = optarg; in AnalyzeLocalIdArgument()
619 if (atoi(optarg) == 0) { in AnalyzeLocalIdArgument()
624 id = atoi(optarg); in AnalyzeLocalIdArgument()
631 std::string constraintsByUser = optarg; in AnalyzeConstraintArgument()
/base/hiviewdfx/hilog_lite/command/
Dhilog_command.c208 ret = HilogLevelProc(optarg); in HilogCmdProc()
211 ret = HilogDomainProc(optarg); in HilogCmdProc()
/base/startup/init/ueventd/
Dueventd_main.c170 EnableInitLog(atoi(optarg)); in main()
/base/update/updater/services/
Dupdater_main.cpp557 upParams.updatePackage.push_back(optarg); in StartUpdater()
561 upParams.retryCount = atoi(optarg); in StartUpdater()
569 upParams.pkgLocation = static_cast<unsigned int>(atoi(optarg)); in StartUpdater()
572 …} else if (option == "force_update_action" && std::string(optarg) == POWEROFF) { /* Only for OTA. … in StartUpdater()
/base/security/selinux_adapter/interfaces/tools/service_check/
Dtest.cpp77 input.serviceName = optarg; in SetOptions()
/base/security/selinux_adapter/interfaces/tools/param_check/
Dtest.cpp179 input.paraName = optarg; in SetOptions()
/base/hiviewdfx/hilog/services/hilogtool/
Dmain.cpp1040 int ret = entry->handler(context, optarg); in HilogEntry()
1050 if (optarg != nullptr) { in HilogEntry()
1051 cmdArgs = optarg; in HilogEntry()
/base/hiviewdfx/hidumper/frameworks/native/src/manager/
Ddump_implement.cpp340 SplitStr(optarg, " ", opts_.abilitieArgs_); in ParseShortCmdOption()
368 DumpStatus timeOutStatus = SetCmdIntegerParameter(optarg, opts_.timeout_); in ParseShortCmdOption()