/base/startup/init/services/init/standard/ |
D | init_cmdexecutor.c | 33 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 …]
|
D | init_control_fd_service.c | 118 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/ |
D | hievent_lite_command.c | 34 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/ |
D | hilogtool_test.cpp | 28 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/ |
D | event_logger_config | 2 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/ |
D | common_event_command_dump_test.cpp | 47 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 …]
|
D | common_event_command_publish_test.cpp | 50 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 …]
|
D | common_event_command_test.cpp | 72 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/ |
D | commands_unittest.cpp | 57 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 …]
|
D | commandsfunction_unittest.cpp | 37 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/ |
D | account_command_test.cpp | 69 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 …]
|
D | account_command_create_test.cpp | 83 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 …]
|
D | account_command_set_test.cpp | 80 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 …]
|
D | account_command_delete_test.cpp | 76 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 …]
|
D | account_command_dump_test.cpp | 76 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 …]
|
D | account_command_switch_test.cpp | 76 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/ |
D | reboot_static.c | 64 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/ |
D | notification_shell_command_dump_test.cpp | 147 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/ |
D | sim_data_type.h | 60 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/ |
D | transfer_manager.cpp | 67 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/ |
D | shell_bas.c | 48 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/ |
D | cmd_dumper.cpp | 41 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/ |
D | hiview_plugin_platform_module_test.cpp | 24 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/ |
D | script_generator.py | 43 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/ |
D | unit_test.cpp | 52 …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 …]
|