Lines Matching refs:argv

65 static int32_t BShellParamCmdRead(BShellHandle shell, int32_t argc, char *argv[])
69 PLUGIN_LOGV("BShellParamCmdWatch %s, threadId %d", argv[1], thread);
70 if (strcmp(argv[1], "start") == 0) {
75 pthread_create(&thread, NULL, CmdReader, argv[1]);
76 } else if (strcmp(argv[1], "stop") == 0) {
191 static int32_t BShellParamCmdWatch(BShellHandle shell, int32_t argc, char *argv[])
194 PLUGIN_LOGV("BShellParamCmdWatch %s", argv[1]);
195 StartWatcher(argv[1]);
200 if (strcmp(argv[CMD_INDEX], "thread") == 0) { // 2 cmd index
201 StartWatcherInThread(argv[1]);
205 int maxCount = StringToInt(argv[CMD_INDEX], -1); // 2 cmd index
207 PLUGIN_LOGE("Invalid input %s", argv[CMD_INDEX]);
214 int len = sprintf_s(buffer, buffSize, "%s.%zu", argv[1], count);
223 static int32_t BShellParamCmdInstall(BShellHandle shell, int32_t argc, char *argv[])
226 PLUGIN_LOGV("BShellParamCmdInstall %s %s", argv[0], argv[1]);
229 int ret = sprintf_s(buffer, buffSize, "ohos.servicectrl.%s", argv[0]);
232 SystemSetParameter(buffer, argv[1]);
236 static int32_t BShellParamCmdDisplay(BShellHandle shell, int32_t argc, char *argv[])
239 PLUGIN_LOGV("BShellParamCmdDisplay %s %s", argv[0], argv[1]);
240 SystemSetParameter("ohos.servicectrl.display", argv[1]);
252 static int32_t BShellParamCmdGroupTest(BShellHandle shell, int32_t argc, char *argv[])
255 PLUGIN_LOGI("BShellParamCmdGroupTest %s stage: %s", argv[0], argv[1]);
256 if (argc > 2 && strcmp(argv[1], "wait") == 0) { // 2 service name index
257 PLUGIN_LOGI("group-test-stage3: wait service %s", argv[2]); // 2 service name index
258 ServiceWatchForStatus(argv[2], ServiceStatusChangeTest); // 2 service name index
265 static int32_t BShellParamCmdUdidGet(BShellHandle shell, int32_t argc, char *argv[])
295 static int32_t BShellParamCmdMemGet(BShellHandle shell, int32_t argc, char *argv[])
301 int ret = sprintf_s(buff, buffSize - 1, "/proc/%s/smaps", argv[1]);
302 PLUGIN_CHECK(ret > 0, return -1, "Failed to format path %s", argv[1]);
307 if (argc > 2 && strcmp(argv[2], "all") == 0) { // 2 2 max arg
333 printf("Failed to get memory for %s %s \n", argv[1], buff);
364 static int32_t BShellParamCmdWatchService(BShellHandle shell, int32_t argc, char *argv[])
367 return ServiceWatchForStatus(argv[1], CmdServiceStatusChange);