Lines Matching defs:pg

268 	EIT_MISSING_PG,		/* Name of missing pg */
298 const char *ei_pg_name; /* Name of missing pg */
299 const char *ei_pg_type; /* Type of missing pg */
497 const char *pi_pgp_name; /* Name of the pg pattern. Only */
587 pgroup_t *pg;
605 if ((pg = cpg->cpg_instance_pg) != NULL) {
606 assert((pg->sc_pgroup_composed == NULL) ||
607 (pg->sc_pgroup_composed == cpg));
608 pg->sc_pgroup_composed = NULL;
616 * Walk the property group at pg, and add its properties to the AVL tree at
620 grow_props_tree(pgroup_t *pg, uu_avl_t *tree)
625 for (prop = uu_list_first(pg->sc_pgroup_props);
627 prop = uu_list_next(pg->sc_pgroup_props, prop)) {
687 pgroup_t *pg;
691 for (pg = uu_list_first(inst->sc_pgroups);
692 pg != NULL;
693 pg = uu_list_next(inst->sc_pgroups, pg)) {
695 cpg->cpg_name = pg->sc_pgroup_name;
696 cpg->cpg_type = pg->sc_pgroup_type;
697 cpg->cpg_instance_pg = pg;
702 pg->sc_pgroup_composed = cpg;
708 for (pg = uu_list_first(svc->sc_pgroups);
709 pg != NULL;
710 pg = uu_list_next(svc->sc_pgroups, pg)) {
713 cpg->cpg_name = pg->sc_pgroup_name;
714 cpg->cpg_type = pg->sc_pgroup_type;
715 cpg->cpg_service_pg = pg;
725 * pg and compose the properties.
727 match->cpg_service_pg = pg;
795 pgroup_type(pgroup_t *pg)
797 if (strcmp(pg->sc_pgroup_type, SCF_GROUP_TEMPLATE_PG_PATTERN) == 0)
799 if (strcmp(pg->sc_pgroup_type, SCF_GROUP_TEMPLATE_PROP_PATTERN) == 0)
805 * Search the property group at pg for a property named name. If the
811 property_find(pgroup_t *pg, const char *name)
816 cpg = pg->sc_pgroup_composed;
820 return (internal_property_find(pg, name));
979 * Find the property whose name is prop_name in the property group at pg.
991 av_get_values(pgroup_t *pg, const char *prop_name, scf_type_t type,
1000 prop = property_find(pg, prop_name);
1026 * Find the property in pg whose name is prop_name. Return a pointer to
1033 find_astring_value_in_pg(pgroup_t *pg, const char *prop_name)
1038 prop = property_find(pg, prop_name);
1095 pgroup_t *pg;
1099 pg = internal_pgroup_find(e, scf_pg_general, scf_group_framework);
1100 if (pg != NULL) {
1101 prop = property_find(pg, SCF_PROPERTY_RESTARTER);
1674 pgroup_t *pg_pattern, pgroup_t *pg, pgroup_t *prop_pattern,
1690 if (pg != NULL) {
1691 ed[ED_PG_NAME] = pg->sc_pgroup_name;
1744 if (pg != NULL) {
1745 actual = pg->sc_pgroup_type;
1819 pgroup_t *pg_pattern, pgroup_t *pg, pgroup_t *prop_pattern,
1831 ite->ite_pg = pg;
1986 * Find the next property after current in the property group at pg. If
1991 next_property(pgroup_t *pg, property_t *current)
1996 cpg = pg->sc_pgroup_composed;
2007 prop = uu_list_next(pg->sc_pgroup_props, current);
2009 prop = uu_list_first(pg->sc_pgroup_props);
2101 pgroup_t *pg;
2117 for (pg = uu_list_first(e->sc_pgroups);
2118 pg != NULL;
2119 pg = uu_list_next(e->sc_pgroups, pg)) {
2120 if (strcmp(pg->sc_pgroup_type, selector) != 0) {
2127 info = ptrn_info_create(pg);
2255 pgroup_t *pg;
2271 pg = NULL;
2273 pg = CPG2PG(cpg);
2277 pg = i->pgi_current.pgi_pg;
2278 if (pg == NULL) {
2279 pg = uu_list_first(i->pgi_entity->sc_pgroups);
2281 pg = uu_list_next(i->pgi_entity->sc_pgroups,
2282 pg);
2284 i->pgi_current.pgi_pg = pg;
2287 if (pg == NULL) {
2299 * this pg is of that type.
2302 if (strcmp(pg->sc_pgroup_type, i->pgi_restrict) != 0) {
2307 return (pg);
2778 pgroup_t *pg;
2790 for (pg = uu_list_first(general->sc_pgroups);
2791 pg != NULL;
2792 pg = uu_list_next(general->sc_pgroups, pg)) {
2793 if (strcmp(pg->sc_pgroup_type,
2800 ginfo = ptrn_info_create(pg);
2830 einfo.ei_u.ei_pattern_conflict.ei_pattern = pg;
3137 * Given an instance entity, e, and a propety group, pg, within the
3143 tmpl_find_pg_pattern(entity_t *e, pgroup_t *pg, pgroup_t **pgp)
3156 pg_names[PGN_BOTH] = gen_pg_pattern_pg_name(pg->sc_pgroup_name,
3157 pg->sc_pgroup_type);
3158 pg_names[PGN_NAME] = gen_pg_pattern_pg_name(pg->sc_pgroup_name,
3161 pg->sc_pgroup_type);
3277 * pg is the property group that holds prop, and pg_pattern is the
3278 * pg_pattern for the property group. pg and pg_pattern are only used for
3283 pgroup_t *pg, pgroup_t *pg_pattern, tmpl_errors_t *errs)
3319 pg_pattern, pg, prop_pattern, prop, NULL, &einfo);
3338 pgroup_t *pg;
3353 while ((pg = next_pattern_pg(iter)) != NULL) {
3354 if (is_required(pg) == 0) {
3355 /* If pg is not required, there is nothing to check. */
3358 pg_name = find_astring_value_in_pg(pg, SCF_PROPERTY_TM_NAME);
3359 pg_type = find_astring_value_in_pg(pg, SCF_PROPERTY_TM_TYPE);
3360 if (pg_target_check(pg, iter->pgi_level) == 0)
3371 if (add_scf_error(errs, SCF_TERR_MISSING_PG, pg,
3383 * Verify that the property group, pg, contains property declarations for
3394 * property is true. If it is, we verify that the property group at pg
3398 tmpl_required_props_present(entity_t *e, pgroup_t *pg, pgroup_t *pg_pattern,
3433 /* If the property is required, see if it is in the pg. */
3439 if (property_find(pg, prop_name) == NULL) {
3444 if (add_scf_error(errs, ec, pg_pattern, pg,
3493 * pg is the property group that holds prop, and pg_pattern is the
3494 * pg_pattern for the property group. pg and pg_pattern are only used for
3498 tmpl_validate_value_range(pgroup_t *pattern, property_t *prop, pgroup_t *pg,
3524 pg_pattern, pg, pattern, prop, NULL, &einfo);
3535 pg_pattern, pg, pattern, prop, NULL, &einfo);
3557 pg, pattern, prop, v, &einfo) != 0) {
3569 * pg is the property group that holds prop, and pg_pattern is the
3570 * pg_pattern for the property group. pg and pg_pattern are only used for
3574 tmpl_validate_values(pgroup_t *prop_pattern, property_t *prop, pgroup_t *pg,
3589 (void) tmpl_errors_add_im(errs, r, pg->sc_parent, pg_pattern,
3590 pg, prop_pattern, prop, NULL, NULL);
3635 SCF_TERR_VALUE_CONSTRAINT_VIOLATED, pg_pattern, pg,
3660 * pg is the property group that holds prop, and pg_pattern is the
3661 * pg_pattern for the property group. pg and pg_pattern are only used for
3666 pgroup_t *pg, pgroup_t *pg_pattern, tmpl_errors_t *errs)
3671 rc = tmpl_validate_value_range(pattern, prop, pg, pg_pattern, errs);
3672 r = tmpl_validate_values(pattern, prop, pg, pg_pattern, errs);
3688 * pg is the property group that holds prop, and pg_pattern is the
3689 * pg_pattern for the property group. pg and pg_pattern are only used for
3693 tmpl_validate_prop(property_t *prop, pgroup_t *tmpl, pgroup_t *pg,
3708 r = tmpl_errors_add_im(errs, rc, pg->sc_parent, NULL,
3709 pg, tmpl, NULL, NULL, NULL);
3727 pg_pattern, pg, tmpl, prop, NULL, &einfo);
3749 r = tmpl_validate_cardinality(tmpl, prop, pg, pg_pattern, errs);
3754 r = tmpl_validate_value_constraints(tmpl, prop, pg, pg_pattern, errs);
3762 * Validate the property group at pg by performing the following checks:
3764 * - Verify that the types of the pg and the pg_pattern are
3766 * - Verify the properties in the pg.
3770 tmpl_validate_pg(entity_t *e, pgroup_t *pg, tmpl_errors_t *errs)
3786 rc = tmpl_find_pg_pattern(e, pg, &pg_pattern);
3795 (void) tmpl_errors_add_im(errs, rc, e, NULL, pg, NULL, NULL,
3812 if ((pg->sc_pgroup_type != NULL) &&
3813 (*(pg->sc_pgroup_type) != 0)) {
3815 pg->sc_pgroup_type) != 0) {
3818 SCF_TERR_WRONG_PG_TYPE, pg_pattern, pg,
3831 r = tmpl_errors_add_im(errs, rc, e, pg_pattern, pg,
3846 while ((prop = next_property(pg, prop)) != NULL) {
3860 (void) tmpl_errors_add_im(errs, r, e, NULL, pg, NULL,
3867 r = tmpl_validate_prop(prop, prop_pattern, pg, pg_pattern,
3876 r = tmpl_required_props_present(e, pg, pg_pattern, errs);
3901 pgroup_t *pg;
3913 pg = CPG2PG(cpg);
3914 if ((r = tmpl_validate_pg(e, pg, errs)) != TVS_SUCCESS)