/base/startup/init/services/modules/trace/ |
D | init_trace.c | 111 static int InitTraceWorkspace(TraceWorkspace *workspace) in InitTraceWorkspace() argument 113 workspace->traceRootPath = NULL; in InitTraceWorkspace() 114 workspace->traceState = TRACE_STATE_IDLE; in InitTraceWorkspace() 115 workspace->compress = 0; in InitTraceWorkspace() 118 workspace->jsonRootNode = cJSON_Parse(fileBuf); in InitTraceWorkspace() 119 PLUGIN_CHECK(workspace->jsonRootNode != NULL, free(fileBuf); in InitTraceWorkspace() 121 …workspace->compress = cJSON_IsTrue(cJSON_GetObjectItem(workspace->jsonRootNode, "compress")) ? 1 :… in InitTraceWorkspace() 122 PLUGIN_LOGI("InitTraceWorkspace compress :%d", workspace->compress); in InitTraceWorkspace() 127 static void DestroyTraceWorkspace(TraceWorkspace *workspace) in DestroyTraceWorkspace() argument 129 if (workspace->traceRootPath) { in DestroyTraceWorkspace() [all …]
|
/base/startup/init/services/param/include/ |
D | param_osadp.h | 138 #define PARAMSPACE_AREA_INIT_LOCK(workspace) ParamRWMutexCreate(&workspace->rwlock) argument 139 #define PARAMSPACE_AREA_RW_LOCK(workspace) ParamRWMutexWRLock(&workspace->rwlock) argument 140 #define PARAMSPACE_AREA_RD_LOCK(workspace) ParamRWMutexRDLock(&workspace->rwlock) argument 141 #define PARAMSPACE_AREA_RW_UNLOCK(workspace) ParamRWMutexUnlock(&workspace->rwlock) argument
|
D | param_common.h | 123 struct WorkSpace_ *workspace; member
|
D | param_security.h | 97 struct WorkSpace_ *workspace; member
|
/base/startup/init/test/unittest/init/ |
D | group_unittest.cpp | 184 InitWorkspace *workspace = GetInitWorkspace(); variable 185 EXPECT_EQ(workspace->groupMode, GROUP_BOOT); 186 workspace->groupMode = GROUP_BOOT; 187 if (strcpy_s(workspace->groupModeStr, GROUP_NAME_MAX_LENGTH, "device.boot.group") != EOK) { 283 InitWorkspace *workspace = GetInitWorkspace(); variable 284 workspace->groupMode = GROUP_CHARGE; 294 workspace->groupMode = GROUP_BOOT; 314 InitWorkspace *workspace = GetInitWorkspace(); variable 315 workspace->groupMode = GROUP_CHARGE; 335 workspace->groupMode = GROUP_BOOT;
|
/base/startup/init/test/unittest/param/ |
D | paramservice_unittest.cpp | 90 WorkSpace *workspace = GetWorkSpace(WORKSPACE_INDEX_DAC); in TestAddSecurityLabel1() local 91 (void)FindTrieNode(workspace, name, strlen(name), &labelIndex); in TestAddSecurityLabel1() 92 ParamSecurityNode *node = (ParamSecurityNode *)GetTrieNode(workspace, labelIndex); in TestAddSecurityLabel1() 115 WorkSpace *workspace = GetWorkSpace(WORKSPACE_INDEX_DAC); in TestAddSecurityLabel2() local 116 (void)FindTrieNode(workspace, name, strlen(name), &labelIndex); in TestAddSecurityLabel2() 117 ParamSecurityNode *node = (ParamSecurityNode *)GetTrieNode(workspace, labelIndex); in TestAddSecurityLabel2() 148 WorkSpace *workspace = GetWorkSpace(WORKSPACE_INDEX_DAC); in TestAddSecurityLabel3() local 149 ParamTrieNode *paramNode = FindTrieNode(workspace, name, strlen(name), &labelIndex); in TestAddSecurityLabel3() 150 ParamSecurityNode *node = (ParamSecurityNode *)GetTrieNode(workspace, labelIndex); in TestAddSecurityLabel3() 173 WorkSpace *workspace = GetWorkSpace(WORKSPACE_INDEX_DAC); in TestAddSecurityLabel4() local [all …]
|
D | param_unittest.cpp | 89 WorkSpace *workspace = GetWorkSpace(WORKSPACE_INDEX_DAC); in TestAddSecurityLabel1() local 90 (void)FindTrieNode(workspace, name, strlen(name), &labelIndex); in TestAddSecurityLabel1() 91 ParamSecurityNode *node = (ParamSecurityNode *)GetTrieNode(workspace, labelIndex); in TestAddSecurityLabel1() 114 WorkSpace *workspace = GetWorkSpace(WORKSPACE_INDEX_DAC); in TestAddSecurityLabel2() local 115 (void)FindTrieNode(workspace, name, strlen(name), &labelIndex); in TestAddSecurityLabel2() 116 ParamSecurityNode *node = (ParamSecurityNode *)GetTrieNode(workspace, labelIndex); in TestAddSecurityLabel2() 147 WorkSpace *workspace = GetWorkSpace(WORKSPACE_INDEX_DAC); in TestAddSecurityLabel3() local 148 ParamTrieNode *paramNode = FindTrieNode(workspace, name, strlen(name), &labelIndex); in TestAddSecurityLabel3() 149 ParamSecurityNode *node = (ParamSecurityNode *)GetTrieNode(workspace, labelIndex); in TestAddSecurityLabel3() 175 WorkSpace *workspace = GetWorkSpace(WORKSPACE_INDEX_DAC); in TestAddSecurityLabel4() local [all …]
|
D | param_stub.cpp | 760 labelIndex.workspace = paramWorkspace->workSpace[index]; in TestGetParamLabelIndex() 761 PARAM_CHECK(labelIndex.workspace != nullptr, return nullptr, "Invalid workSpace"); in TestGetParamLabelIndex() 762 labelIndex.selinuxLabelIndex = labelIndex.workspace->spaceIndex; in TestGetParamLabelIndex()
|
/base/startup/init/services/include/param/ |
D | sys_param.h | 55 …long long spaceCommitId = ATOMIC_UINT64_LOAD_EXPLICIT(¶m->workspace->area->commitId, MEMORY_OR… in CachedParameterGet() 74 …long long spaceCommitId = ATOMIC_UINT64_LOAD_EXPLICIT(¶m->workspace->area->commitId, MEMORY_OR… in CachedParameterGetChanged()
|
/base/startup/init/services/param/manager/ |
D | param_manager.c | 38 WorkSpace *workspace = GetWorkSpaceByName(name); in SystemCheckMatchParamWait() local 39 PARAM_CHECK(workspace != NULL, return NULL, "Failed to get workspace %s", name); in SystemCheckMatchParamWait() 42 ParamTrieNode *node = FindTrieNode(workspace, name, nameLength, NULL); in SystemCheckMatchParamWait() 46 ParamNode *param = (ParamNode *)GetTrieNode(workspace, node->dataIndex); in SystemCheckMatchParamWait() 626 static int CheckParamPermission_(WorkSpace **workspace, ParamTrieNode **node, in CheckParamPermission_() argument 636 labelIndex.workspace = GetWorkSpaceByName(name); in CheckParamPermission_() 637 …PARAM_CHECK(labelIndex.workspace != NULL, return DAC_RESULT_FORBIDED, "Invalid workSpace for %s", … in CheckParamPermission_() 638 labelIndex.selinuxLabelIndex = labelIndex.workspace->spaceIndex; in CheckParamPermission_() 643 *workspace = labelIndex.workspace; in CheckParamPermission_() 650 WorkSpace *workspace = NULL; in CheckParamPermission() local [all …]
|
/base/startup/init/services/param/base/ |
D | param_base.c | 347 STATIC_INLINE int ReadParamWithCheck(WorkSpace **workspace, const char *name, uint32_t op, ParamTri… in ReadParamWithCheck() argument 354 labelIndex.workspace = GetWorkSpaceByName(name); in ReadParamWithCheck() 355 …PARAM_CHECK(labelIndex.workspace != NULL, return DAC_RESULT_FORBIDED, "Invalid workSpace for %s", … in ReadParamWithCheck() 356 labelIndex.selinuxLabelIndex = labelIndex.workspace->spaceIndex; in ReadParamWithCheck() 362 *node = BaseFindTrieNode(labelIndex.workspace, name, strlen(name), NULL); in ReadParamWithCheck() 364 *workspace = labelIndex.workspace; in ReadParamWithCheck() 580 WorkSpace *workspace = NULL; in CachedParameterCreate() local 581 int ret = ReadParamWithCheck(&workspace, name, DAC_READ, &node); in CachedParameterCreate() 583 …PARAM_CHECK(workspace != NULL && workspace->area != NULL, return NULL, "Forbid to access parameter… in CachedParameterCreate() 592 param->workspace = workspace; in CachedParameterCreate() [all …]
|