Home
last modified time | relevance | path

Searched refs:cmd (Results 1 – 25 of 220) sorted by relevance

123456789

/base/startup/init/services/init/standard/
Dinit_cmdexecutor.c33 PluginCmd *cmd = NULL; in AddCmdExecutor() local
39 cmd = groupNode->data.cmd; in AddCmdExecutor()
40 if (cmd == NULL) { in AddCmdExecutor()
41 cmd = (PluginCmd *)calloc(1, sizeof(PluginCmd)); in AddCmdExecutor()
42 INIT_ERROR_CHECK(cmd != NULL, return -1, "Failed to create cmd condition"); in AddCmdExecutor()
43 groupNode->data.cmd = cmd; in AddCmdExecutor()
44 cmd->cmdId = g_cmdId++; in AddCmdExecutor()
45 cmd->name = groupNode->name; in AddCmdExecutor()
46 OH_ListInit(&cmd->cmdExecutor); in AddCmdExecutor()
56 OH_ListAddTail(&cmd->cmdExecutor, &cmdExec->node); in AddCmdExecutor()
[all …]
Dinit_control_fd_service.c118 static void PrintBootEventHead(const char *cmd) in PrintBootEventHead() argument
120 if (strcmp(cmd, "bootevent") == 0) { in PrintBootEventHead()
127 static void DumpAllExtData(const char *cmd) in DumpAllExtData() argument
129 PrintBootEventHead(cmd); in DumpAllExtData()
136 DumpServiceHookExecute(node->name, cmd); in DumpAllExtData()
177 char *cmd = strrchr(serviceCmd, '#'); in ProcessDumpServiceControlFd() local
178 if (cmd != NULL) { in ProcessDumpServiceControlFd()
179 cmd[0] = '\0'; in ProcessDumpServiceControlFd()
180 cmd++; in ProcessDumpServiceControlFd()
184 if (cmd != NULL) { in ProcessDumpServiceControlFd()
[all …]
/base/hiviewdfx/hievent_lite/command/
Dhievent_lite_command.c34 static boolean CheckCmdStr(const char *cmd);
36 static void HieventSetProc(const char *cmd);
39 void HieventCmdProc(const char *cmd) in HieventCmdProc() argument
41 if (cmd == NULL) { in HieventCmdProc()
45 int32 len = strnlen(cmd, CMD_MAX_LEN + 1); in HieventCmdProc()
46 if ((len < CMD_MIN_LEN) || (len > CMD_MAX_LEN) || (CheckCmdStr(cmd) == FALSE)) { in HieventCmdProc()
51 if (*cmd != OPTION_TAG) { in HieventCmdProc()
56 switch (*(++cmd)) { in HieventCmdProc()
61 HieventSetProc(++cmd); in HieventCmdProc()
76 static void HieventSetProc(const char *cmd) in HieventSetProc() argument
[all …]
/base/hiviewdfx/hilog/test/unittest/common/
Dhilogtool_test.cpp28 std::string GetCmdResultFromPopen(const std::string& cmd);
38 int GetCmdLinesFromPopen(const std::string& cmd) in GetCmdLinesFromPopen() argument
40 if (cmd.empty()) { in GetCmdLinesFromPopen()
43 FILE* fp = popen(cmd.c_str(), "r"); in GetCmdLinesFromPopen()
61 std::string GetCmdResultFromPopen(const std::string& cmd) in GetCmdResultFromPopen() argument
63 if (cmd.empty()) { in GetCmdResultFromPopen()
66 FILE* fp = popen(cmd.c_str(), "r"); in GetCmdResultFromPopen()
85 bool IsExistInCmdResult(const std::string &cmd, const std::string &str) in IsExistInCmdResult() argument
87 if (cmd.empty()) { in IsExistInCmdResult()
90 FILE* fp = popen(cmd.c_str(), "r"); in IsExistInCmdResult()
[all …]
/base/hiviewdfx/hiview/plugins/eventlogger/config/
Devent_logger_config2 event id="" name="UI_BLOCK_6S" action="s,cmd:c,cmd:m" interval="10"
4 event id="" name="THREAD_BLOCK_6S" action="s,cmd:c,cmd:m" interval="10"
6 event id="" name="LIFECYCLE_TIMEOUT" action="s,pb:0,cmd:c,cmd:m" interval="10"
7 event id="" name="APP_LIFECYCLE_TIMEOUT" action="s,pb:0,cmd:c,cmd:m" interval="10"
8 event id="" name="APPLICATION_BLOCK_INPUT" action="s,pb:0,cmd:c,cmd:m" interval="10"
9 event id="" name="SCREEN_ON_TIMEOUT" action="cmd:p" interval="10"
10 event id="" name="NO_FOCUS_WINDOW" action="cmd:w,cmd:a" interval="10"
11 event id="" name="SERVICE_BLOCK" action="s,pb:0,cmd:c,cmd:m" interval="0"
12 event id="" name="SERVICE_WARNING" action="s,pb:0,cmd:c,cmd:m" interval="0"
13 event id="" name="SERVICE_TIMEOUT" action="s,pb:0,cmd:c,cmd:m" interval="0"
[all …]
/base/notification/common_event_service/tools/test/unittest/cem/
Dcommon_event_command_dump_test.cpp47 void SetMockObjects(const CommonEventCommand &cmd) const;
86 void CemCommandDumpTest::SetMockObjects(const CommonEventCommand &cmd) const in SetMockObjects()
116 CommonEventCommand cmd(argc, argv);
119 SetMockObjects(cmd);
121 EXPECT_EQ(cmd.ExecCommand(), Concatenate(HELP_MSG_NO_OPTION, HELP_MSG_DUMP));
139 CommonEventCommand cmd(argc, argv);
141 SetMockObjects(cmd);
143 EXPECT_EQ(cmd.ExecCommand(), Concatenate(HELP_MSG_NO_OPTION, HELP_MSG_DUMP));
161 CommonEventCommand cmd(argc, argv);
164 SetMockObjects(cmd);
[all …]
Dcommon_event_command_publish_test.cpp50 void SetMockObjects(const CommonEventCommand &cmd) const;
89 void CemCommandPublishTest::SetMockObjects(const CommonEventCommand &cmd) const in SetMockObjects()
106 CommonEventCommand cmd(argc, argv);
107 EXPECT_EQ(cmd.ExecCommand(), Concatenate(HELP_MSG_NO_OPTION, HELP_MSG_PUBLISH));
125 CommonEventCommand cmd(argc, argv);
126 EXPECT_EQ(cmd.ExecCommand(), Concatenate(HELP_MSG_NO_OPTION, HELP_MSG_PUBLISH));
144 CommonEventCommand cmd(argc, argv);
145 EXPECT_EQ(cmd.ExecCommand(), Concatenate("error: unknown option.\n", HELP_MSG_PUBLISH));
163 CommonEventCommand cmd(argc, argv);
164 EXPECT_EQ(cmd.ExecCommand(), Concatenate("error: unknown option.\n", HELP_MSG_PUBLISH));
[all …]
Dcommon_event_command_test.cpp72 CommonEventCommand cmd(argc, argv);
73 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG);
90 CommonEventCommand cmd(argc, argv);
91 …EXPECT_EQ(cmd.ExecCommand(), Concatenate("cem: 'xxx' is not a valid cem command. See 'cem help'.\n…
108 CommonEventCommand cmd(argc, argv);
109 EXPECT_EQ(cmd.ExecCommand(), cmd.GetCommandErrorMsg() + HELP_MSG);
126 CommonEventCommand cmd(argc, argv);
127 EXPECT_EQ(cmd.ExecCommand(), Concatenate(cmd.GetCommandErrorMsg(), HELP_MSG));
144 CommonEventCommand cmd(argc, argv);
145 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG);
[all …]
/base/update/updater/test/unittest/applypatch_test/
Dcommands_unittest.cpp57 Command *cmd = new Command(); variable
58 cmd->Init(cmdLine);
59 auto type = cmd->GetCommandType();
61 auto sha256 = cmd->GetArgumentByPos(10);
62 sha256 = cmd->GetArgumentByPos(1);
64 EXPECT_EQ(cmd->GetCommandLine(), cmdLine);
65 delete cmd;
73 Command *cmd = new Command(); variable
74 EXPECT_EQ(cmd->Init(cmdLine), true);
76 EXPECT_EQ(cmd->Init(cmdLine), true);
[all …]
Dcommandsfunction_unittest.cpp37 CommandResult TestCommandFnExec(std::shared_ptr<Command> cmd, std::string cmdLine) in TestCommandFnExec() argument
39 cmd->Init(cmdLine); in TestCommandFnExec()
40 …std::unique_ptr<CommandFunction> cf = CommandFunctionFactory::GetCommandFunction(cmd->GetCommandTy… in TestCommandFnExec()
41 CommandResult ret = cf->Execute(const_cast<Command &>(*cmd.get())); in TestCommandFnExec()
65 std::shared_ptr<Command> cmd; variable
66 cmd = std::make_shared<Command>();
78 cmd->SetFileDescriptor(fd);
80 CommandResult ret = CommandFunctionUnitTest::TestCommandFnExec(cmd, cmdLine);
83 ret = CommandFunctionUnitTest::TestCommandFnExec(cmd, cmdLine);
88 ret = CommandFunctionUnitTest::TestCommandFnExec(cmd, cmdLine);
[all …]
/base/account/os_account/tools/test/unittest/acm/
Daccount_command_test.cpp69 AccountCommand cmd(argc, argv);
70 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG);
88 AccountCommand cmd(argc, argv);
89 EXPECT_EQ(cmd.ExecCommand(), cmd.GetCommandErrorMsg() + HELP_MSG);
107 AccountCommand cmd(argc, argv);
108 EXPECT_EQ(cmd.ExecCommand(), cmd.GetCommandErrorMsg() + HELP_MSG);
126 AccountCommand cmd(argc, argv);
127 EXPECT_EQ(cmd.ExecCommand(), cmd.GetCommandErrorMsg() + HELP_MSG);
145 AccountCommand cmd(argc, argv);
146 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG);
[all …]
Daccount_command_create_test.cpp83 AccountCommand cmd(argc, argv);
84 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG_NO_OPTION + "\n" + HELP_MSG_CREATE);
104 AccountCommand cmd(argc, argv);
105 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG_NO_OPTION + "\n" + HELP_MSG_CREATE);
125 AccountCommand cmd(argc, argv);
126 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG_UNKNOWN_OPTION + "\n" + HELP_MSG_CREATE);
146 AccountCommand cmd(argc, argv);
147 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG_UNKNOWN_OPTION + "\n" + HELP_MSG_CREATE);
167 AccountCommand cmd(argc, argv);
168 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG_UNKNOWN_OPTION + "\n" + HELP_MSG_CREATE);
[all …]
Daccount_command_set_test.cpp80 AccountCommand cmd(argc, argv);
81 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG_NO_OPTION + "\n" + HELP_MSG_SET);
100 AccountCommand cmd(argc, argv);
101 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG_NO_OPTION + "\n" + HELP_MSG_SET);
120 AccountCommand cmd(argc, argv);
121 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG_UNKNOWN_OPTION + "\n" + HELP_MSG_SET);
140 AccountCommand cmd(argc, argv);
141 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG_UNKNOWN_OPTION + "\n" + HELP_MSG_SET);
160 AccountCommand cmd(argc, argv);
161 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG_UNKNOWN_OPTION + "\n" + HELP_MSG_SET);
[all …]
Daccount_command_delete_test.cpp76 AccountCommand cmd(argc, argv);
77 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG_NO_OPTION + "\n" + HELP_MSG_DELETE);
96 AccountCommand cmd(argc, argv);
97 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG_NO_OPTION + "\n" + HELP_MSG_DELETE);
116 AccountCommand cmd(argc, argv);
117 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG_UNKNOWN_OPTION + "\n" + HELP_MSG_DELETE);
136 AccountCommand cmd(argc, argv);
137 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG_UNKNOWN_OPTION + "\n" + HELP_MSG_DELETE);
156 AccountCommand cmd(argc, argv);
157 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG_UNKNOWN_OPTION + "\n" + HELP_MSG_DELETE);
[all …]
Daccount_command_dump_test.cpp76 AccountCommand cmd(argc, argv);
77 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG_NO_OPTION + "\n" + HELP_MSG_DUMP);
96 AccountCommand cmd(argc, argv);
97 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG_NO_OPTION + "\n" + HELP_MSG_DUMP);
116 AccountCommand cmd(argc, argv);
117 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG_UNKNOWN_OPTION + "\n" + HELP_MSG_DUMP);
136 AccountCommand cmd(argc, argv);
137 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG_UNKNOWN_OPTION + "\n" + HELP_MSG_DUMP);
156 AccountCommand cmd(argc, argv);
157 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG_UNKNOWN_OPTION + "\n" + HELP_MSG_DUMP);
[all …]
Daccount_command_switch_test.cpp76 AccountCommand cmd(argc, argv);
77 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG_NO_OPTION + "\n" + HELP_MSG_SWITCH);
96 AccountCommand cmd(argc, argv);
97 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG_NO_OPTION + "\n" + HELP_MSG_SWITCH);
116 AccountCommand cmd(argc, argv);
117 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG_UNKNOWN_OPTION + "\n" + HELP_MSG_SWITCH);
136 AccountCommand cmd(argc, argv);
137 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG_UNKNOWN_OPTION + "\n" + HELP_MSG_SWITCH);
156 AccountCommand cmd(argc, argv);
157 EXPECT_EQ(cmd.ExecCommand(), HELP_MSG_UNKNOWN_OPTION + "\n" + HELP_MSG_SWITCH);
[all …]
/base/startup/init/services/modules/reboot/
Dreboot_static.c64 static int CheckParamCmdExist(const char *cmd) in CheckParamCmdExist() argument
69 char *cmdName = Dup2String(REBOOT_CMD_PREFIX, cmd); in CheckParamCmdExist()
70 PLUGIN_CHECK(cmdName != NULL, return 0, "Failed to copy %s", cmd); in CheckParamCmdExist()
72 if (strcmp(g_rebootParamCmdInfos[i].cmd, cmdName) == 0) { in CheckParamCmdExist()
81 static int SetParamCmdInfo(ParamCmdInfo *currInfo, CmdExecutor executor, const char *cmd) in SetParamCmdInfo() argument
84 currInfo->name = Dup2String(REBOOT_NAME_PREFIX, cmd); in SetParamCmdInfo()
85 PLUGIN_CHECK(currInfo->name != NULL, break, "Failed to copy %s", cmd); in SetParamCmdInfo()
86 currInfo->replace = Dup2String(REBOOT_REPLACE_PREFIX, cmd); in SetParamCmdInfo()
87 PLUGIN_CHECK(currInfo->replace != NULL, break, "Failed to copy %s", cmd); in SetParamCmdInfo()
88 currInfo->cmd = Dup2String(REBOOT_CMD_PREFIX, cmd); in SetParamCmdInfo()
[all …]
/base/notification/distributed_notification_service/tools/test/unittest/dump/
Dnotification_shell_command_dump_test.cpp147 NotificationShellCommand cmd(argc, argv);
149 EXPECT_EQ(cmd.ExecCommand(), g_dumpHelpMsg);
167 NotificationShellCommand cmd(argc, argv);
169 cmd.ExecCommand();
189 NotificationShellCommand cmd(argc, argv);
191 cmd.ExecCommand();
212 NotificationShellCommand cmd(argc, argv);
214 EXPECT_EQ(cmd.ExecCommand(), g_dumpActiveBound);
234 NotificationShellCommand cmd(argc, argv);
236 cmd.ExecCommand();
[all …]
/base/telephony/core_service/services/sim/include/
Dsim_data_type.h60 ControllerToFileMsg(const FileToControllerMsg *cmd, const IccFileData *fd) in ControllerToFileMsg()
62 if (cmd != nullptr) { in ControllerToFileMsg()
63 arg1 = cmd->arg1; in ControllerToFileMsg()
64 arg2 = cmd->arg2; in ControllerToFileMsg()
65 iccLoader = cmd->iccLoader; in ControllerToFileMsg()
89 explicit EfLinearResult(const FileToControllerMsg *cmd) in EfLinearResult()
91 if (cmd != nullptr) { in EfLinearResult()
92 arg1 = cmd->arg1; in EfLinearResult()
93 arg2 = cmd->arg2; in EfLinearResult()
94 iccLoader = cmd->iccLoader; in EfLinearResult()
[all …]
/base/update/updater/services/applypatch/
Dtransfer_manager.cpp67 std::unique_ptr<Command> cmd; in CommandsParser() local
70 cmd = std::make_unique<Command>(); in CommandsParser()
71 UPDATER_ERROR_CHECK(cmd != nullptr, "Failed to parse command line.", return false); in CommandsParser()
72 …if (!cmd->Init(*ct) || cmd->GetCommandType() == CommandType::LAST || globalParams->env == nullptr)… in CommandsParser()
79 if (cmd->GetCommandType() != CommandType::NEW) { in CommandsParser()
84 cmd->SetFileDescriptor(fd); in CommandsParser()
85 …std::unique_ptr<CommandFunction> cf = CommandFunctionFactory::GetCommandFunction(cmd->GetCommandTy… in CommandsParser()
87 CommandResult ret = cf->Execute(const_cast<Command &>(*cmd.get())); in CommandsParser()
89 if (CheckResult(ret, cmd->GetCommandLine(), cmd->GetCommandType()) == false) { in CommandsParser()
95 … if (totalSize != 0 && globalParams->env != nullptr && NeedSetProgress(cmd->GetCommandType())) { in CommandsParser()
[all …]
/base/startup/init/services/begetctl/shell/
Dshell_bas.c48 static void BShellCmdOutputCmdHelp(BShellHandle handle, BShellCommand *cmd) in BShellCmdOutputCmdHelp() argument
51 int32_t spaceLength = BShellEnvOutputString(handle, cmd->help); in BShellCmdOutputCmdHelp()
58 BShellEnvOutputString(handle, cmd->desc); in BShellCmdOutputCmdHelp()
69 BShellCommand *cmd = shell->command; in BShellCmdHelp() local
70 while (cmd != NULL) { in BShellCmdHelp()
72 (strncmp(argv[0], cmd->name, strlen(argv[0])) == 0) && in BShellCmdHelp()
74 BShellCmdOutputCmdHelp(handle, cmd); in BShellCmdHelp()
77 cmd = cmd->next; in BShellCmdHelp()
82 cmd = shell->command; in BShellCmdHelp()
83 while (cmd != NULL) { in BShellCmdHelp()
[all …]
/base/hiviewdfx/hidumper/frameworks/native/src/executor/
Dcmd_dumper.cpp41 std::string cmd = ptrDumpCfg_->target_; in PreExecute() local
48 ReplacePidInCmd(cmd, pid); in PreExecute()
52 ReplaceCpuIdInCmd(cmd, cpuId); in PreExecute()
55 cmd_ = cmd; in PreExecute()
113 DumpStatus CMDDumper::GetCmdInterface(const std::string& cmd, StringMatrix dumpDatas) in GetCmdInterface() argument
116 FILE* fp = popen((CMD_PREFIX + cmd).c_str(), "r"); in GetCmdInterface()
167 void CMDDumper::ReplacePidInCmd(std::string &cmd, int pid) in ReplacePidInCmd() argument
169 size_t pos = cmd.find("%pid"); in ReplacePidInCmd()
171 cmd = cmd.replace(pos, strlen("%pid"), std::to_string(pid)); in ReplacePidInCmd()
172 cmd_ = cmd; in ReplacePidInCmd()
[all …]
/base/hiviewdfx/hiview/test/moduletest/common/
Dhiview_plugin_platform_module_test.cpp24 std::string GetCmdResultFromPopen(const std::string& cmd) in GetCmdResultFromPopen() argument
26 if (cmd.empty()) { in GetCmdResultFromPopen()
30 FILE* fp = popen(cmd.c_str(), "r"); in GetCmdResultFromPopen()
48 std::string cmd = "pidof " + serviceName; in GetServicePid() local
49 std::string pidStr = GetCmdResultFromPopen(cmd); in GetServicePid()
60 std::string cmd = "start " + serviceName; in WaitForServiceReady() local
61 GetCmdResultFromPopen(cmd); in WaitForServiceReady()
/base/update/packaging_tools/
Dscript_generator.py43 def add_command(self, cmd=None): argument
49 self.script.append(cmd)
112 cmd = ('sha_check("/{partition}", "{ranges_str}", '
116 return cmd
127 cmd = ('image_sha_check("/{partition}", '
132 return cmd
140 cmd = 'first_block_check("/{partition}")'.format(
142 return cmd
150 cmd = 'abort("ERROR: {partition} partition ' \
153 return cmd
[all …]
/base/security/selinux/test/unittest/service_checker/
Dunit_test.cpp52 …std::string cmd = "hilog -T Selinux -x | grep 'avc: denied { list } for service=hdf_devmgr_class… variable
54 std::string cmdRes = RunCommand(cmd);
69 …std::string cmd = "hilog -T Selinux -x | grep 'avc: denied { get } for service=" + TEST_SERVICE_… variable
71 std::string cmdRes = RunCommand(cmd);
86 …std::string cmd = "hilog -T Selinux -x | grep 'avc: denied { add } for service=" + TEST_SERVICE_… variable
88 std::string cmdRes = RunCommand(cmd);
103 std::string cmd = variable
106 std::string cmdRes = RunCommand(cmd);
122 …std::string cmd = "hilog -T Selinux -x | grep 'avc: denied { get } for service=" + TEST_SERVICE_… variable
124 std::string cmdRes = RunCommand(cmd);
[all …]

123456789