Lines Matching refs:pg

587 	pgroup_t *pg;  in composed_pg_destroy()  local
605 if ((pg = cpg->cpg_instance_pg) != NULL) { in composed_pg_destroy()
606 assert((pg->sc_pgroup_composed == NULL) || in composed_pg_destroy()
607 (pg->sc_pgroup_composed == cpg)); in composed_pg_destroy()
608 pg->sc_pgroup_composed = NULL; in composed_pg_destroy()
620 grow_props_tree(pgroup_t *pg, uu_avl_t *tree) in grow_props_tree() argument
625 for (prop = uu_list_first(pg->sc_pgroup_props); in grow_props_tree()
627 prop = uu_list_next(pg->sc_pgroup_props, prop)) { in grow_props_tree()
687 pgroup_t *pg; in build_composed_property_groups() local
691 for (pg = uu_list_first(inst->sc_pgroups); in build_composed_property_groups()
692 pg != NULL; in build_composed_property_groups()
693 pg = uu_list_next(inst->sc_pgroups, pg)) { 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()
702 pg->sc_pgroup_composed = cpg; in build_composed_property_groups()
708 for (pg = uu_list_first(svc->sc_pgroups); in build_composed_property_groups()
709 pg != NULL; in build_composed_property_groups()
710 pg = uu_list_next(svc->sc_pgroups, pg)) { 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()
727 match->cpg_service_pg = pg; in build_composed_property_groups()
795 pgroup_type(pgroup_t *pg) in pgroup_type() argument
797 if (strcmp(pg->sc_pgroup_type, SCF_GROUP_TEMPLATE_PG_PATTERN) == 0) in pgroup_type()
799 if (strcmp(pg->sc_pgroup_type, SCF_GROUP_TEMPLATE_PROP_PATTERN) == 0) in pgroup_type()
811 property_find(pgroup_t *pg, const char *name) in property_find() argument
816 cpg = pg->sc_pgroup_composed; in property_find()
820 return (internal_property_find(pg, name)); in property_find()
991 av_get_values(pgroup_t *pg, const char *prop_name, scf_type_t type, in av_get_values() argument
1000 prop = property_find(pg, prop_name); in av_get_values()
1033 find_astring_value_in_pg(pgroup_t *pg, const char *prop_name) in find_astring_value_in_pg() argument
1038 prop = property_find(pg, prop_name); in find_astring_value_in_pg()
1095 pgroup_t *pg; in find_restarter() local
1099 pg = internal_pgroup_find(e, scf_pg_general, scf_group_framework); in find_restarter()
1100 if (pg != NULL) { in find_restarter()
1101 prop = property_find(pg, SCF_PROPERTY_RESTARTER); in find_restarter()
1674 pgroup_t *pg_pattern, pgroup_t *pg, pgroup_t *prop_pattern, in add_scf_error() argument
1690 if (pg != NULL) { in add_scf_error()
1691 ed[ED_PG_NAME] = pg->sc_pgroup_name; in add_scf_error()
1744 if (pg != NULL) { in add_scf_error()
1745 actual = pg->sc_pgroup_type; in add_scf_error()
1819 pgroup_t *pg_pattern, pgroup_t *pg, pgroup_t *prop_pattern, in tmpl_errors_add_im() argument
1831 ite->ite_pg = pg; in tmpl_errors_add_im()
1991 next_property(pgroup_t *pg, property_t *current) in next_property() argument
1996 cpg = pg->sc_pgroup_composed; in next_property()
2007 prop = uu_list_next(pg->sc_pgroup_props, current); in next_property()
2009 prop = uu_list_first(pg->sc_pgroup_props); in next_property()
2101 pgroup_t *pg; in gather_pattern() local
2117 for (pg = uu_list_first(e->sc_pgroups); in gather_pattern()
2118 pg != NULL; in gather_pattern()
2119 pg = uu_list_next(e->sc_pgroups, pg)) { in gather_pattern()
2120 if (strcmp(pg->sc_pgroup_type, selector) != 0) { in gather_pattern()
2127 info = ptrn_info_create(pg); in gather_pattern()
2255 pgroup_t *pg; in next_pattern_pg() local
2271 pg = NULL; in next_pattern_pg()
2273 pg = CPG2PG(cpg); in next_pattern_pg()
2277 pg = i->pgi_current.pgi_pg; in next_pattern_pg()
2278 if (pg == NULL) { in next_pattern_pg()
2279 pg = uu_list_first(i->pgi_entity->sc_pgroups); in next_pattern_pg()
2281 pg = uu_list_next(i->pgi_entity->sc_pgroups, in next_pattern_pg()
2282 pg); in next_pattern_pg()
2284 i->pgi_current.pgi_pg = pg; in next_pattern_pg()
2287 if (pg == NULL) { in next_pattern_pg()
2302 if (strcmp(pg->sc_pgroup_type, i->pgi_restrict) != 0) { in next_pattern_pg()
2307 return (pg); in next_pattern_pg()
2778 pgroup_t *pg; in tmpl_scan_general() local
2790 for (pg = uu_list_first(general->sc_pgroups); in tmpl_scan_general()
2791 pg != NULL; in tmpl_scan_general()
2792 pg = uu_list_next(general->sc_pgroups, pg)) { in tmpl_scan_general()
2793 if (strcmp(pg->sc_pgroup_type, in tmpl_scan_general()
2800 ginfo = ptrn_info_create(pg); in tmpl_scan_general()
2830 einfo.ei_u.ei_pattern_conflict.ei_pattern = pg; in tmpl_scan_general()
3143 tmpl_find_pg_pattern(entity_t *e, pgroup_t *pg, pgroup_t **pgp) in tmpl_find_pg_pattern() argument
3156 pg_names[PGN_BOTH] = gen_pg_pattern_pg_name(pg->sc_pgroup_name, in tmpl_find_pg_pattern()
3157 pg->sc_pgroup_type); in tmpl_find_pg_pattern()
3158 pg_names[PGN_NAME] = gen_pg_pattern_pg_name(pg->sc_pgroup_name, in tmpl_find_pg_pattern()
3161 pg->sc_pgroup_type); in tmpl_find_pg_pattern()
3283 pgroup_t *pg, pgroup_t *pg_pattern, tmpl_errors_t *errs) in tmpl_validate_cardinality() argument
3319 pg_pattern, pg, prop_pattern, prop, NULL, &einfo); in tmpl_validate_cardinality()
3338 pgroup_t *pg; in tmpl_required_pg_present() local
3353 while ((pg = next_pattern_pg(iter)) != NULL) { in tmpl_required_pg_present()
3354 if (is_required(pg) == 0) { in tmpl_required_pg_present()
3358 pg_name = find_astring_value_in_pg(pg, SCF_PROPERTY_TM_NAME); in tmpl_required_pg_present()
3359 pg_type = find_astring_value_in_pg(pg, SCF_PROPERTY_TM_TYPE); in tmpl_required_pg_present()
3360 if (pg_target_check(pg, iter->pgi_level) == 0) in tmpl_required_pg_present()
3371 if (add_scf_error(errs, SCF_TERR_MISSING_PG, pg, in tmpl_required_pg_present()
3398 tmpl_required_props_present(entity_t *e, pgroup_t *pg, pgroup_t *pg_pattern, in tmpl_required_props_present() argument
3439 if (property_find(pg, prop_name) == NULL) { in tmpl_required_props_present()
3444 if (add_scf_error(errs, ec, pg_pattern, pg, in tmpl_required_props_present()
3498 tmpl_validate_value_range(pgroup_t *pattern, property_t *prop, pgroup_t *pg, in tmpl_validate_value_range() argument
3524 pg_pattern, pg, pattern, prop, NULL, &einfo); in tmpl_validate_value_range()
3535 pg_pattern, pg, pattern, prop, NULL, &einfo); in tmpl_validate_value_range()
3557 pg, pattern, prop, v, &einfo) != 0) { in tmpl_validate_value_range()
3574 tmpl_validate_values(pgroup_t *prop_pattern, property_t *prop, pgroup_t *pg, in tmpl_validate_values() argument
3589 (void) tmpl_errors_add_im(errs, r, pg->sc_parent, pg_pattern, in tmpl_validate_values()
3590 pg, prop_pattern, prop, NULL, NULL); in tmpl_validate_values()
3635 SCF_TERR_VALUE_CONSTRAINT_VIOLATED, pg_pattern, pg, in tmpl_validate_values()
3666 pgroup_t *pg, pgroup_t *pg_pattern, tmpl_errors_t *errs) in tmpl_validate_value_constraints() argument
3671 rc = tmpl_validate_value_range(pattern, prop, pg, pg_pattern, errs); in tmpl_validate_value_constraints()
3672 r = tmpl_validate_values(pattern, prop, pg, pg_pattern, errs); in tmpl_validate_value_constraints()
3693 tmpl_validate_prop(property_t *prop, pgroup_t *tmpl, pgroup_t *pg, in tmpl_validate_prop() argument
3708 r = tmpl_errors_add_im(errs, rc, pg->sc_parent, NULL, in tmpl_validate_prop()
3709 pg, tmpl, NULL, NULL, NULL); in tmpl_validate_prop()
3727 pg_pattern, pg, tmpl, prop, NULL, &einfo); in tmpl_validate_prop()
3749 r = tmpl_validate_cardinality(tmpl, prop, pg, pg_pattern, errs); in tmpl_validate_prop()
3754 r = tmpl_validate_value_constraints(tmpl, prop, pg, pg_pattern, errs); in tmpl_validate_prop()
3770 tmpl_validate_pg(entity_t *e, pgroup_t *pg, tmpl_errors_t *errs) in tmpl_validate_pg() argument
3786 rc = tmpl_find_pg_pattern(e, pg, &pg_pattern); in tmpl_validate_pg()
3795 (void) tmpl_errors_add_im(errs, rc, e, NULL, pg, NULL, NULL, in tmpl_validate_pg()
3812 if ((pg->sc_pgroup_type != NULL) && in tmpl_validate_pg()
3813 (*(pg->sc_pgroup_type) != 0)) { in tmpl_validate_pg()
3815 pg->sc_pgroup_type) != 0) { in tmpl_validate_pg()
3818 SCF_TERR_WRONG_PG_TYPE, pg_pattern, pg, in tmpl_validate_pg()
3831 r = tmpl_errors_add_im(errs, rc, e, pg_pattern, pg, in tmpl_validate_pg()
3846 while ((prop = next_property(pg, prop)) != NULL) { in tmpl_validate_pg()
3860 (void) tmpl_errors_add_im(errs, r, e, NULL, pg, NULL, in tmpl_validate_pg()
3867 r = tmpl_validate_prop(prop, prop_pattern, pg, pg_pattern, in tmpl_validate_pg()
3876 r = tmpl_required_props_present(e, pg, pg_pattern, errs); in tmpl_validate_pg()
3901 pgroup_t *pg; in tmpl_validate_entity_pgs() local
3913 pg = CPG2PG(cpg); in tmpl_validate_entity_pgs()
3914 if ((r = tmpl_validate_pg(e, pg, errs)) != TVS_SUCCESS) in tmpl_validate_entity_pgs()