Home
last modified time | relevance | path

Searched refs:groupNode (Results 1 – 6 of 6) sorted by relevance

/base/startup/init/services/init/
Dinit_group_manager.c85 InitGroupNode *groupNode = groupRoot; in InitImportGroupCfg_() local
86 while (groupNode != NULL) { in InitImportGroupCfg_()
87 groupRoot = groupNode->next; in InitImportGroupCfg_()
88 InitParseGroupCfg_(groupNode->name); in InitImportGroupCfg_()
89 free(groupNode); in InitImportGroupCfg_()
90 groupNode = groupRoot; in InitImportGroupCfg_()
97 InitGroupNode *groupNode = groupRoot; in InitFreeGroupNodes_() local
98 while (groupNode != NULL) { in InitFreeGroupNodes_()
99 groupRoot = groupNode->next; in InitFreeGroupNodes_()
100 if (groupNode->type < NODE_TYPE_GROUPS) { // remove from hashmap in InitFreeGroupNodes_()
[all …]
Dinit_service_manager.c179 InitGroupNode *groupNode = GetGroupNode(NODE_TYPE_SERVICES, service->name); in ReleaseService() local
180 if (groupNode != NULL) { in ReleaseService()
181 groupNode->data.service = NULL; in ReleaseService()
1165 InitGroupNode *groupNode = GetGroupNode(NODE_TYPE_SERVICES, servName); in GetServiceByName() local
1166 if (groupNode != NULL) { in GetServiceByName()
1167 return groupNode->data.service; in GetServiceByName()
/base/startup/init/services/init/standard/
Dinit_cmdexecutor.c34 InitGroupNode *groupNode = GetGroupNode(NODE_TYPE_CMDS, cmdName); in AddCmdExecutor_() local
35 if (groupNode == NULL) { in AddCmdExecutor_()
36 groupNode = AddGroupNode(NODE_TYPE_CMDS, cmdName); in AddCmdExecutor_()
37 INIT_ERROR_CHECK(groupNode != NULL, return -1, "Failed to create group node"); in AddCmdExecutor_()
39 cmd = groupNode->data.cmd; in AddCmdExecutor_()
43 groupNode->data.cmd = cmd; in AddCmdExecutor_()
45 cmd->name = groupNode->name; in AddCmdExecutor_()
74 InitGroupNode *groupNode = GetGroupNode(NODE_TYPE_CMDS, cmdName); in RemoveCmdExecutor() local
75 INIT_ERROR_CHECK(groupNode != NULL && groupNode->data.cmd != NULL, in RemoveCmdExecutor()
78 PluginCmd *cmd = groupNode->data.cmd; in RemoveCmdExecutor()
[all …]
/base/security/selinux_adapter/test/unittest/parameter_static/
Dunit_test.cpp45 static bool GenerateParamHashNode(const std::string &name, ParamHashNode **groupNode) in GenerateParamHashNode() argument
58 *groupNode = tmp; in GenerateParamHashNode()
62 static void FreeParamHashNode(ParamHashNode *groupNode) in FreeParamHashNode() argument
64 if (groupNode == nullptr) { in FreeParamHashNode()
67 if (groupNode->name != nullptr) { in FreeParamHashNode()
68 free(groupNode->name); in FreeParamHashNode()
70 free(groupNode); in FreeParamHashNode()
123 ParamHashNode *groupNode = nullptr; variable
124 ASSERT_TRUE(GenerateParamHashNode(std::to_string(i), &groupNode));
125 ASSERT_EQ(HashMapAdd(handle, &(groupNode->hashNode)), 0);
[all …]
/base/security/selinux_adapter/interfaces/policycoreutils/src/
Dcontexts_trie.c45 ParamHashNode *groupNode = GetGroupNode(root, name, nameLen); in AddGroupNode() local
46 if (groupNode != NULL) { in AddGroupNode()
47 return groupNode; in AddGroupNode()
50 groupNode = (ParamHashNode *)calloc(1, sizeof(ParamHashNode)); in AddGroupNode()
51 if (groupNode == NULL) { in AddGroupNode()
54 groupNode->nameLen = nameLen; in AddGroupNode()
55 groupNode->name = (char *)calloc(1, nameLen + 1); in AddGroupNode()
56 if (groupNode->name == NULL) { in AddGroupNode()
57 free(groupNode); in AddGroupNode()
60 memcpy(groupNode->name, name, nameLen + 1); in AddGroupNode()
[all …]
Dselinux_map.c45 ParamHashNode *groupNode = HASHMAP_ENTRY(node, ParamHashNode, hashNode); in GroupNodeGetNodeHashCode() local
46 return GenerateHashCode(groupNode->name, groupNode->nameLen); in GroupNodeGetNodeHashCode()
51 ParamHashNode *groupNode = HASHMAP_ENTRY(node, ParamHashNode, hashNode); in GroupNodeFree() local
52 free(groupNode); in GroupNodeFree()