Lines Matching refs:cpg

226 #define	CPG2PG(cpg)	(cpg->cpg_instance_pg ? cpg->cpg_instance_pg : \  argument
227 cpg->cpg_service_pg)
576 composed_pg_t *cpg; in composed_pg_create() local
578 cpg = safe_malloc(sizeof (*cpg)); in composed_pg_create()
579 uu_avl_node_init(cpg, &cpg->cpg_node, composed_pg_pool); in composed_pg_create()
580 return (cpg); in composed_pg_create()
584 composed_pg_destroy(composed_pg_t *cpg) in composed_pg_destroy() argument
589 if (cpg == NULL) in composed_pg_destroy()
592 if ((cpg->cpg_composed_props != NULL)) { in composed_pg_destroy()
593 while (uu_avl_teardown(cpg->cpg_composed_props, &marker) != in composed_pg_destroy()
601 uu_avl_destroy(cpg->cpg_composed_props); in composed_pg_destroy()
605 if ((pg = cpg->cpg_instance_pg) != NULL) { in composed_pg_destroy()
607 (pg->sc_pgroup_composed == cpg)); in composed_pg_destroy()
611 uu_avl_node_fini(cpg, &cpg->cpg_node, composed_pg_pool); in composed_pg_destroy()
612 free(cpg); in composed_pg_destroy()
648 compose_props(composed_pg_t *cpg) in compose_props() argument
652 tree = uu_avl_create(composed_prop_pool, cpg, TMPL_DEBUG_TREE); in compose_props()
657 cpg->cpg_composed_props = tree; in compose_props()
668 assert(cpg->cpg_instance_pg != NULL); in compose_props()
669 grow_props_tree(cpg->cpg_instance_pg, tree); in compose_props()
674 assert(cpg->cpg_service_pg != NULL); in compose_props()
675 grow_props_tree(cpg->cpg_service_pg, tree); in compose_props()
684 composed_pg_t *cpg; in build_composed_property_groups() local
694 cpg = composed_pg_create(); in build_composed_property_groups()
695 cpg->cpg_name = pg->sc_pgroup_name; in build_composed_property_groups()
696 cpg->cpg_type = pg->sc_pgroup_type; in build_composed_property_groups()
697 cpg->cpg_instance_pg = pg; in build_composed_property_groups()
698 match = uu_avl_find(tree, cpg, NULL, &marker); in build_composed_property_groups()
701 uu_avl_insert(tree, cpg, marker); in build_composed_property_groups()
702 pg->sc_pgroup_composed = cpg; in build_composed_property_groups()
707 cpg = NULL; in build_composed_property_groups()
711 if (cpg == NULL) in build_composed_property_groups()
712 cpg = composed_pg_create(); in build_composed_property_groups()
713 cpg->cpg_name = pg->sc_pgroup_name; in build_composed_property_groups()
714 cpg->cpg_type = pg->sc_pgroup_type; in build_composed_property_groups()
715 cpg->cpg_service_pg = pg; in build_composed_property_groups()
716 match = uu_avl_find(tree, cpg, NULL, &marker); in build_composed_property_groups()
718 uu_avl_insert(tree, cpg, marker); in build_composed_property_groups()
720 cpg = NULL; in build_composed_property_groups()
731 if (cpg != NULL) in build_composed_property_groups()
732 composed_pg_destroy(cpg); in build_composed_property_groups()
757 composed_pg_t *cpg; in demolish_composed_instance() local
766 while ((cpg = uu_avl_teardown(tree, &marker)) != NULL) { in demolish_composed_instance()
767 composed_pg_destroy(cpg); in demolish_composed_instance()
813 composed_pg_t *cpg; in property_find() local
816 cpg = pg->sc_pgroup_composed; in property_find()
818 if ((cpg == NULL) || (cpg->cpg_composed_props == NULL)) { in property_find()
828 return (uu_avl_find(cpg->cpg_composed_props, &look, NULL, NULL)); in property_find()
1993 composed_pg_t *cpg; in next_property() local
1996 cpg = pg->sc_pgroup_composed; in next_property()
1997 if ((cpg != NULL) && (cpg->cpg_composed_props != NULL)) { in next_property()
2000 prop = uu_avl_next(cpg->cpg_composed_props, current); in next_property()
2002 prop = uu_avl_first(cpg->cpg_composed_props); in next_property()
2022 composed_pg_t cpg; in ptrn_info_create() local
2060 (void) memset(&cpg, 0, sizeof (cpg)); in ptrn_info_create()
2061 cpg.cpg_name = info->pi_pgp_name; in ptrn_info_create()
2062 cpg.cpg_type = SCF_GROUP_TEMPLATE_PG_PATTERN; in ptrn_info_create()
2064 &cpg, NULL, NULL); in ptrn_info_create()
2253 composed_pg_t *cpg; in next_pattern_pg() local
2264 cpg = i->pgi_current.pgi_cpg; in next_pattern_pg()
2265 if (cpg == NULL) { in next_pattern_pg()
2266 cpg = uu_avl_first(composed_tree); in next_pattern_pg()
2268 cpg = uu_avl_next(composed_tree, cpg); in next_pattern_pg()
2270 if (cpg == NULL) { in next_pattern_pg()
2273 pg = CPG2PG(cpg); in next_pattern_pg()
2274 i->pgi_current.pgi_cpg = cpg; in next_pattern_pg()
3145 pgroup_t *cpg; /* candidate property group */ in tmpl_find_pg_pattern() local
3175 while ((cpg = next_pattern_pg(iter)) != NULL) { in tmpl_find_pg_pattern()
3176 if (pg_target_check(cpg, iter->pgi_level) == 0) in tmpl_find_pg_pattern()
3181 if (strcmp(cpg->sc_pgroup_name, pg_names[i]) == 0) { in tmpl_find_pg_pattern()
3187 pg_patterns[i] = cpg; in tmpl_find_pg_pattern()
3334 composed_pg_t cpg; in tmpl_required_pg_present() local
3365 (void) memset(&cpg, 0, sizeof (cpg)); in tmpl_required_pg_present()
3366 cpg.cpg_name = pg_name; in tmpl_required_pg_present()
3367 cpg.cpg_type = pg_type; in tmpl_required_pg_present()
3368 match = uu_avl_find(tree, &cpg, NULL, NULL); in tmpl_required_pg_present()
3899 composed_pg_t *cpg; in tmpl_validate_entity_pgs() local
3908 for (cpg = uu_avl_first(pgroups); in tmpl_validate_entity_pgs()
3909 cpg != NULL; in tmpl_validate_entity_pgs()
3910 cpg = uu_avl_next(pgroups, cpg)) { in tmpl_validate_entity_pgs()
3911 if (strcmp(cpg->cpg_type, SCF_GROUP_TEMPLATE) == 0) in tmpl_validate_entity_pgs()
3913 pg = CPG2PG(cpg); in tmpl_validate_entity_pgs()