Home
last modified time | relevance | path

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

12345678910>>...20

/base/hiviewdfx/hidumper/test/unittest/common/
Dhidumper_manager_test.cpp40 int GetDumpResult(int argc, char *argv[]);
66 int HiDumperManagerTest::GetDumpResult(int argc, char *argv[]) in GetDumpResult() argument
70 return DumpImplement::GetInstance().Main(argc, argv, rawParam); in GetDumpResult()
81 char *argv[] = { variable
86 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
87 int ret = GetDumpResult(argc, argv);
99 char *argv[] = { variable
104 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
105 int ret = GetDumpResult(argc, argv);
117 char *argv[] = { variable
[all …]
/base/notification/distributed_notification_service/tools/test/unittest/dump/
Dnotification_shell_command_dump_test.cpp174 char *argv[] = { variable
180 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
182 NotificationShellCommand cmd(argc, argv);
194 char *argv[] = { variable
200 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
202 NotificationShellCommand cmd(argc, argv);
216 char *argv[] = { variable
222 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
224 NotificationShellCommand cmd(argc, argv);
238 char *argv[] = { variable
[all …]
/base/notification/common_event_service/tools/test/unittest/cem/
Dcommon_event_command_publish_test.cpp99 char *argv[] = { variable
104 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
106 CommonEventCommand cmd(argc, argv);
117 char *argv[] = { variable
123 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
125 CommonEventCommand cmd(argc, argv);
136 char *argv[] = { variable
142 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
144 CommonEventCommand cmd(argc, argv);
155 char *argv[] = { variable
[all …]
Dcommon_event_command_dump_test.cpp109 char *argv[] = { variable
114 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
116 CommonEventCommand cmd(argc, argv);
131 char *argv[] = { variable
137 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
139 CommonEventCommand cmd(argc, argv);
153 char *argv[] = { variable
159 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
161 CommonEventCommand cmd(argc, argv);
176 char *argv[] = { variable
[all …]
Dcommon_event_command_test.cpp66 char *argv[] = { variable
70 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
72 CommonEventCommand cmd(argc, argv);
83 char *argv[] = { variable
88 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
90 CommonEventCommand cmd(argc, argv);
101 char *argv[] = { variable
106 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
108 CommonEventCommand cmd(argc, argv);
119 char *argv[] = { variable
[all …]
/base/account/os_account/tools/test/unittest/acm/
Daccount_command_test.cpp63 char *argv[] = { variable
67 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
69 AccountCommand cmd(argc, argv);
81 char *argv[] = { variable
86 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
88 AccountCommand cmd(argc, argv);
100 char *argv[] = { variable
105 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
107 AccountCommand cmd(argc, argv);
119 char *argv[] = { variable
[all …]
Daccount_command_create_test.cpp76 char *argv[] = { variable
81 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
83 AccountCommand cmd(argc, argv);
96 char *argv[] = { variable
102 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
104 AccountCommand cmd(argc, argv);
117 char *argv[] = { variable
123 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
125 AccountCommand cmd(argc, argv);
138 char *argv[] = { variable
[all …]
Daccount_command_set_test.cpp73 char *argv[] = { variable
78 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
80 AccountCommand cmd(argc, argv);
92 char *argv[] = { variable
98 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
100 AccountCommand cmd(argc, argv);
112 char *argv[] = { variable
118 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
120 AccountCommand cmd(argc, argv);
132 char *argv[] = { variable
[all …]
Daccount_command_delete_test.cpp69 char *argv[] = { variable
74 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
76 AccountCommand cmd(argc, argv);
88 char *argv[] = { variable
94 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
96 AccountCommand cmd(argc, argv);
108 char *argv[] = { variable
114 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
116 AccountCommand cmd(argc, argv);
128 char *argv[] = { variable
[all …]
Daccount_command_dump_test.cpp69 char *argv[] = { variable
74 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
76 AccountCommand cmd(argc, argv);
88 char *argv[] = { variable
94 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
96 AccountCommand cmd(argc, argv);
108 char *argv[] = { variable
114 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
116 AccountCommand cmd(argc, argv);
128 char *argv[] = { variable
[all …]
Daccount_command_switch_test.cpp69 char *argv[] = { variable
74 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
76 AccountCommand cmd(argc, argv);
88 char *argv[] = { variable
94 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
96 AccountCommand cmd(argc, argv);
108 char *argv[] = { variable
114 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
116 AccountCommand cmd(argc, argv);
128 char *argv[] = { variable
[all …]
/base/startup/init/services/begetctl/
Dservice_control.c29 static void ServiceControlUsage(BShellHandle shell, int argc, char **argv) in ServiceControlUsage() argument
31 BShellCmdHelp(shell, argc, argv); in ServiceControlUsage()
35 static int main_cmd(BShellHandle shell, int argc, char **argv) in main_cmd() argument
38 ServiceControlUsage(shell, argc, argv); in main_cmd()
41 if (strcmp(argv[0], "start_service") == 0) { in main_cmd()
42 …ServiceControlWithExtra(argv[1], 0, (const char **)argv + SERVICE_START_NUMBER, argc - SERVICE_STA… in main_cmd()
43 } else if (strcmp(argv[0], "stop_service") == 0) { in main_cmd()
44 …ServiceControlWithExtra(argv[1], 1, (const char **)argv + SERVICE_START_NUMBER, argc - SERVICE_STA… in main_cmd()
45 } else if (strcmp(argv[0], "start") == 0) { in main_cmd()
46 …ServiceControlWithExtra(argv[1], 0, (const char **)argv + SERVICE_START_NUMBER, argc - SERVICE_STA… in main_cmd()
[all …]
Dmodulectl.c26 static int32_t ModuleInstallCmd(BShellHandle shell, int32_t argc, char *argv[]) in ModuleInstallCmd() argument
29 BShellCmdHelp(shell, argc, argv); in ModuleInstallCmd()
32 BSH_LOGV("ModuleInstallCmd %s %s \n", argv[0], argv[1]); in ModuleInstallCmd()
34 int ret = sprintf_s(combinedArgs, sizeof(combinedArgs), "ohos.servicectrl.%s", argv[0]); in ModuleInstallCmd()
37 SystemSetParameter(combinedArgs, argv[1]); in ModuleInstallCmd()
41 static int ModuleDisplayCmd(BShellHandle shell, int argc, char **argv) in ModuleDisplayCmd() argument
44 BShellCmdHelp(shell, argc, argv); in ModuleDisplayCmd()
47 CmdClientInit(INIT_CONTROL_FD_SOCKET_PATH, ACTION_MODULEMGR, argv[0]); in ModuleDisplayCmd()
Dbegetctl_cmd.c35 static int HandleCmd(BShellHandle shell, const char *cmdName, int argc, char **argv) in HandleCmd() argument
47 ret = strcat_s(value, sizeof(value), argv[i]); in HandleCmd()
55 static int SetInitLogLevelFromParam(BShellHandle shell, int argc, char **argv) in SetInitLogLevelFromParam() argument
63 unsigned int level = strtoul(argv[1], 0, 10); // 10 is decimal in SetInitLogLevelFromParam()
65 printf("Failed to transform %s to unsigned int. \n", argv[1]); in SetInitLogLevelFromParam()
70 int ret = HandleCmd(shell, "setloglevel", argc - 1, &argv[1]); in SetInitLogLevelFromParam()
77 printf("%s is invalid. \n", argv[1]); in SetInitLogLevelFromParam()
82 static int32_t GetInitLogLevelFromParam(BShellHandle shell, int argc, char **argv) in GetInitLogLevelFromParam() argument
92 static int32_t GetUidByName(BShellHandle shell, int argc, char **argv) in GetUidByName() argument
99 struct passwd *data = getpwnam(argv[1]); in GetUidByName()
[all …]
Dsetloglevel.c26 static int32_t SetInitLogLevelFromParam(BShellHandle shell, int argc, char **argv) in SetInitLogLevelFromParam() argument
29 BShellCmdHelp(shell, argc, argv); in SetInitLogLevelFromParam()
33 unsigned int level = strtoul(argv[1], 0, 10); // 10 is decimal in SetInitLogLevelFromParam()
35 printf("Failed to transform %s to unsigned int. \n", argv[1]); in SetInitLogLevelFromParam()
39 int ret = SystemSetParameter("persist.init.debug.loglevel", argv[1]); in SetInitLogLevelFromParam()
41 … printf("Failed to set log level by param \"persist.init.debug.loglevel\" %s. \n", argv[1]); in SetInitLogLevelFromParam()
43 … printf("Success to set log level by param \"persist.init.debug.loglevel\" %s. \n", argv[1]); in SetInitLogLevelFromParam()
46 printf("Set init log level in invailed parameter %s. \n", argv[1]); in SetInitLogLevelFromParam()
51 static int32_t GetInitLogLevelFromParam(BShellHandle shell, int argc, char **argv) in GetInitLogLevelFromParam() argument
Ddump_service.c27 static int main_cmd(BShellHandle shell, int argc, char **argv) in main_cmd() argument
31 CmdClientInit(INIT_CONTROL_FD_SOCKET_PATH, ACTION_DUMP, argv[1]); in main_cmd()
33 if (strcmp(argv[1], "parameter_service") == 0) { in main_cmd()
36 size_t serviceNameLen = strlen(argv[1]) + strlen(argv[2]) + 2; // 2 is \0 and # in main_cmd()
39 BEGET_ERROR_CHECK(sprintf_s(cmd, serviceNameLen, "%s#%s", argv[1], argv[2]) >= 0, free(cmd); in main_cmd()
44 BShellCmdHelp(shell, argc, argv); in main_cmd()
49 static int BootEventEnable(BShellHandle shell, int argc, char **argv) in BootEventEnable() argument
56 static int BootEventDisable(BShellHandle shell, int argc, char **argv) in BootEventDisable() argument
/base/update/packaging_tools/test/
Dtest_build_update.py55 sys.argv.clear()
56 sys.argv.append("build_update.py")
57 sys.argv.append("./test_target_package/")
58 sys.argv.append("./output_test/demo")
59 sys.argv.append("-s")
60 sys.argv.append("./test_source_package.zip")
61 sys.argv.append("-pk")
62 sys.argv.append("./rsa_private_key2048.pem")
81 sys.argv.clear()
82 sys.argv.append("build_update.py")
[all …]
/base/startup/init/services/init/standard/
Dinit_cmds.c105 static int SyncExecCommand(int argc, char * const *argv) in SyncExecCommand() argument
107 INIT_LOGI("Sync exec: %s", argv[0]); in SyncExecCommand()
111 INIT_CHECK_ONLY_ELOG(execv(argv[0], argv) == 0, "execv %s failed! err %d.", argv[0], errno); in SyncExecCommand()
120 INIT_LOGI("Sync exec: %s result %d %d", argv[0], WEXITSTATUS(status), WIFEXITED(status)); in SyncExecCommand()
127 …INIT_ERROR_CHECK(strncpy_s(interface.ifr_name, IFNAMSIZ - 1, ctx->argv[0], strlen(ctx->argv[0])) =… in DoIfup()
149 fileName = ctx->argv[index]; in DoInsmod()
152 … INIT_ERROR_CHECK(fileName != NULL, return, "Can not find file name from param %s", ctx->argv[0]); in DoInsmod()
155 …IT_ERROR_CHECK(realPath != NULL, return, "Can not get real file name from param %s", ctx->argv[0]); in DoInsmod()
156 if (ctx->argc > 1 && ctx->argv[1] != NULL && strcmp(ctx->argv[1], "-f") == 0) { // [-f] in DoInsmod()
180 INIT_LOGV("set param name: %s, value %s ", ctx->argv[0], ctx->argv[1]); in DoSetParam()
[all …]
/base/hiviewdfx/faultloggerd/example/
Ddump_catcher_demo.cpp64 static bool ParseParameters(int argc, char *argv[], int32_t &pid, int32_t &tid) in ParseParameters() argument
68 if (!strcmp("-p", argv[1])) { in ParseParameters()
69 pid = atoi(argv[2]); in ParseParameters()
72 if (!strcmp("-t", argv[1])) { in ParseParameters()
74 tid = atoi(argv[2]); in ParseParameters()
79 if (!strcmp("-p", argv[1])) { in ParseParameters()
80 pid = atoi(argv[2]); in ParseParameters()
82 if (!strcmp("-t", argv[3])) { in ParseParameters()
83 tid = atoi(argv[4]); in ParseParameters()
86 } else if (!strcmp("-t", argv[1])) { in ParseParameters()
[all …]
/base/startup/init/services/modules/selinux/
Dselinux_adp.c36 static int LoadSelinuxPolicy(int id, const char *name, int argc, const char **argv) in LoadSelinuxPolicy() argument
44 UNUSED(argv); in LoadSelinuxPolicy()
63 static int SetServiceContent(int id, const char *name, int argc, const char **argv) in SetServiceContent() argument
65 PLUGIN_CHECK(name != NULL && argc >= 1 && argv != NULL, return -1, "Invalid parameter"); in SetServiceContent()
66 ServiceExtData *data = GetServiceExtData(argv[0], HOOK_ID_SELINUX); in SetServiceContent()
69 PLUGIN_LOGE("failed to set service %s's secon (%s).", argv[0], (char *)data->data); in SetServiceContent()
74 PLUGIN_LOGV("Set content %s to %s.", (char *)data->data, argv[0]); in SetServiceContent()
78 "failed to set service %s's secon (%s).", argv[0], "u:r:limit_domain:s0"); in SetServiceContent()
79 …GIN_LOGE("Please set secon field in service %s's cfg file, limit_domain will be blocked", argv[0]); in SetServiceContent()
84 static int SetSockCreateCon(int id, const char *name, int argc, const char **argv) in SetSockCreateCon() argument
[all …]
/base/startup/init/services/modules/reboot/
Dreboot.c40 static int DoReboot(int id, const char *name, int argc, const char **argv) in DoReboot() argument
45 UNUSED(argv); in DoReboot()
51 static int DoRebootPanic(int id, const char *name, int argc, const char **argv) in DoRebootPanic() argument
56 UNUSED(argv); in DoRebootPanic()
75 PLUGIN_STATIC int DoRebootShutdown(int id, const char *name, int argc, const char **argv) in DoRebootShutdown() argument
80 UNUSED(argv); in DoRebootShutdown()
85 const char *cmd = strstr(argv[0], "reboot,"); in DoRebootShutdown()
100 static int DoRebootUpdater(int id, const char *name, int argc, const char **argv) in DoRebootUpdater() argument
105 PLUGIN_LOGI("DoRebootUpdater argv %s", argv[0]); in DoRebootUpdater()
106 int ret = UpdateMiscMessage(argv[0], "updater", "updater:", "boot_updater"); in DoRebootUpdater()
[all …]
/base/hiviewdfx/hidumper_lite/mini/
Dhidumper_core.c105 void ParameterMatching(int argc, const char *argv[]) in ParameterMatching() argument
110 if (strcmp(argv[0], "-h") == 0) { in ParameterMatching()
112 } else if (strcmp(argv[0], "-dc") == 0) { in ParameterMatching()
115 } else if (strcmp(argv[0], "-df") == 0) { in ParameterMatching()
117 } else if (strcmp(argv[0], "-dm") == 0) { in ParameterMatching()
120 } else if (strcmp(argv[0], "-dt") == 0) { in ParameterMatching()
123 } else if (strcmp(argv[0], "-ikc") == 0) { in ParameterMatching()
125 } else if (strcmp(argv[0], "-m") == 0) { in ParameterMatching()
134 } else if (argc == TWO_OF_ARGC_PARAMETERS && strcmp(argv[0], "-m") == 0) { in ParameterMatching()
137 if (strcmp(argv[0], "-m") == 0) { in ParameterMatching()
[all …]
/base/startup/init/services/init/
Dinit_common_cmds.c85 if (ctx->argv[i] == NULL) { in BuildStringFromCmdArg()
88 …en = snprintf_s(options + curr, OPTIONS_SIZE - curr, OPTIONS_SIZE - 1 - curr, "%s ", ctx->argv[i]); in BuildStringFromCmdArg()
124 ctx->argv[ctx->argc] = AddOneArg(p, end - p); in GetCmdArg()
125 INIT_CHECK(ctx->argv[ctx->argc] != NULL, FreeCmdArg(ctx); in GetCmdArg()
128 ctx->argv[ctx->argc] = AddOneArg(p, token - p); in GetCmdArg()
129 INIT_CHECK(ctx->argv[ctx->argc] != NULL, FreeCmdArg(ctx); in GetCmdArg()
133 ctx->argv[ctx->argc] = NULL; in GetCmdArg()
146 if (cmd->argv[i] != NULL) { in FreeCmdArg()
147 free(cmd->argv[i]); in FreeCmdArg()
173 size_t size = strlen(ctx->argv[0]); in SetProcName()
[all …]
/base/startup/init/test/moduletest/
Dparam_test_cmds.c64 static int32_t BShellParamCmdRead(BShellHandle shell, int32_t argc, char *argv[]) in BShellParamCmdRead() argument
68 PLUGIN_LOGV("BShellParamCmdWatch %s, threadId %d", argv[1], thread); in BShellParamCmdRead()
69 if (strcmp(argv[1], "start") == 0) { in BShellParamCmdRead()
74 pthread_create(&thread, NULL, CmdReader, argv[1]); in BShellParamCmdRead()
75 } else if (strcmp(argv[1], "stop") == 0) { in BShellParamCmdRead()
190 static int32_t BShellParamCmdWatch(BShellHandle shell, int32_t argc, char *argv[]) in BShellParamCmdWatch() argument
193 PLUGIN_LOGV("BShellParamCmdWatch %s", argv[1]); in BShellParamCmdWatch()
194 StartWatcher(argv[1]); in BShellParamCmdWatch()
199 if (strcmp(argv[CMD_INDEX], "thread") == 0) { // 2 cmd index in BShellParamCmdWatch()
200 StartWatcherInThread(argv[1]); in BShellParamCmdWatch()
[all …]
/base/hiviewdfx/hidumper_lite/lite/
Dhidumper.c156 int ParameterMatching(int argc, const char *argv[], int fd) in ParameterMatching() argument
161 } else if (argc == TWO_OF_ARGC_PARAMETERS && strcmp(argv[ONE_OF_ARGC_PARAMETERS], "-dc") == 0) { in ParameterMatching()
163 } else if (argc == TWO_OF_ARGC_PARAMETERS && strcmp(argv[ONE_OF_ARGC_PARAMETERS], "-df") == 0) { in ParameterMatching()
165 } else if (argc == TWO_OF_ARGC_PARAMETERS && strcmp(argv[ONE_OF_ARGC_PARAMETERS], "-dm") == 0) { in ParameterMatching()
167 } else if (argc == TWO_OF_ARGC_PARAMETERS && strcmp(argv[ONE_OF_ARGC_PARAMETERS], "-dt") == 0) { in ParameterMatching()
169 … } else if (argc == TWO_OF_ARGC_PARAMETERS && strcmp(argv[ONE_OF_ARGC_PARAMETERS], "-ikc") == 0) { in ParameterMatching()
171 … } else if (argc == TWO_OF_ARGC_PARAMETERS && strcmp(argv[ONE_OF_ARGC_PARAMETERS], "-iuc") == 0) { in ParameterMatching()
173 } else if (argc == TWO_OF_ARGC_PARAMETERS && strcmp(argv[ONE_OF_ARGC_PARAMETERS], "-m") == 0) { in ParameterMatching()
176 … } else if (argc == THREE_OF_ARGC_PARAMETERS && strcmp(argv[ONE_OF_ARGC_PARAMETERS], "-m") == 0) { in ParameterMatching()
179 argv[TWO_OF_ARGC_PARAMETERS], sizeof(param.filePath) - 1) != EOK) { in ParameterMatching()
[all …]

12345678910>>...20