Lines Matching defs:context
1191 cil_context_init(&sidcon->context);
1193 rc = cil_fill_context(parse_current->next->next->cl_head, sidcon->context);
1216 if (sidcon->context_str == NULL && sidcon->context != NULL) {
1217 cil_destroy_context(sidcon->context);
4098 /* Fills in context starting from user */
4099 int cil_fill_context(struct cil_tree_node *user_node, struct cil_context *context)
4111 if (user_node == NULL || context == NULL) {
4120 context->user_str = user_node->data;
4121 context->role_str = user_node->next->data;
4122 context->type_str = user_node->next->next->data;
4124 context->range_str = NULL;
4127 context->range_str = user_node->next->next->next->data;
4129 cil_levelrange_init(&context->range);
4131 rc = cil_fill_levelrange(user_node->next->next->next->cl_head, context->range);
4140 cil_log(CIL_ERR, "Bad context\n");
4154 struct cil_context *context = NULL;
4166 cil_context_init(&context);
4170 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)context, (hashtab_key_t)key, CIL_SYM_CONTEXTS, CIL_CONTEXT);
4175 rc = cil_fill_context(parse_current->next->next->cl_head, context);
4183 cil_tree_log(parse_current, CIL_ERR, "Bad context declaration");
4184 cil_destroy_context(context);
4189 void cil_destroy_context(struct cil_context *context)
4191 if (context == NULL) {
4195 cil_symtab_datum_destroy(&context->datum);
4197 if (context->range_str == NULL && context->range != NULL) {
4198 cil_destroy_levelrange(context->range);
4201 free(context);
4258 filecon->context = NULL;
4260 cil_context_init(&filecon->context);
4262 rc = cil_fill_context(parse_current->next->next->next->cl_head, filecon->context);
4287 if (filecon->context_str == NULL && filecon->context != NULL) {
4288 cil_destroy_context(filecon->context);
4348 cil_context_init(&ibpkeycon->context);
4350 rc = cil_fill_context(parse_current->next->next->next->cl_head, ibpkeycon->context);
4371 if (!ibpkeycon->context_str && ibpkeycon->context)
4372 cil_destroy_context(ibpkeycon->context);
4447 cil_context_init(&portcon->context);
4449 rc = cil_fill_context(parse_current->next->next->next->cl_head, portcon->context);
4472 if (portcon->context_str == NULL && portcon->context != NULL) {
4473 cil_destroy_context(portcon->context);
4528 cil_context_init(&nodecon->context);
4530 rc = cil_fill_context(parse_current->next->next->next->cl_head, nodecon->context);
4561 if (nodecon->context_str == NULL && nodecon->context != NULL) {
4562 cil_destroy_context(nodecon->context);
4631 cil_context_init(&genfscon->context);
4632 rc = cil_fill_context(context_node->cl_head, genfscon->context);
4657 if (genfscon->context_str == NULL && genfscon->context != NULL) {
4658 cil_destroy_context(genfscon->context);
4774 cil_context_init(&ibendportcon->context);
4776 rc = cil_fill_context(parse_current->next->next->next->cl_head, ibendportcon->context);
4797 if (!ibendportcon->context_str && ibendportcon->context)
4798 cil_destroy_context(ibendportcon->context);
4834 cil_context_init(&pirqcon->context);
4836 rc = cil_fill_context(parse_current->next->next->cl_head, pirqcon->context);
4859 if (pirqcon->context_str == NULL && pirqcon->context != NULL) {
4860 cil_destroy_context(pirqcon->context);
4919 cil_context_init(&iomemcon->context);
4921 rc = cil_fill_context(parse_current->next->next->cl_head, iomemcon->context);
4944 if (iomemcon->context_str == NULL && iomemcon->context != NULL) {
4945 cil_destroy_context(iomemcon->context);
5004 cil_context_init(&ioportcon->context);
5006 rc = cil_fill_context(parse_current->next->next->cl_head, ioportcon->context);
5029 if (ioportcon->context_str == NULL && ioportcon->context != NULL) {
5030 cil_destroy_context(ioportcon->context);
5067 cil_context_init(&pcidevicecon->context);
5069 rc = cil_fill_context(parse_current->next->next->cl_head, pcidevicecon->context);
5092 if (pcidevicecon->context_str == NULL && pcidevicecon->context != NULL) {
5093 cil_destroy_context(pcidevicecon->context);
5127 cil_context_init(&devicetreecon->context);
5129 rc = cil_fill_context(parse_current->next->next->cl_head, devicetreecon->context);
5152 if (devicetreecon->context_str == NULL && devicetreecon->context != NULL) {
5153 cil_destroy_context(devicetreecon->context);
5202 cil_context_init(&fsuse->context);
5204 rc = cil_fill_context(parse_current->next->next->next->cl_head, fsuse->context);
5227 if (fsuse->context_str == NULL && fsuse->context != NULL) {
5228 cil_destroy_context(fsuse->context);