Lines Matching defs:pt

435 _scf_read_tmpl_prop_type_as_string(const scf_prop_tmpl_t *pt)
439 type = _scf_read_single_astring_from_pg(pt->prt_pg,
2668 scf_prop_tmpl_t *pt;
2674 pt = calloc(1, sizeof (scf_prop_tmpl_t));
2675 if (pt == NULL)
2678 pt->prt_h = handle;
2680 return (pt);
2710 scf_tmpl_iter_props(scf_pg_tmpl_t *t, scf_prop_tmpl_t *pt, int flags)
2724 if (t == NULL || pt == NULL) {
2737 if (pt->prt_populated == 0) {
2768 prop_tmpl = pt;
2774 prop_tmpl = pt;
5249 scf_propertygroup_t *pg, const scf_prop_tmpl_t *pt)
5269 if (scf_tmpl_prop_name(pt, &t_prop_name) == -1) {
5272 t_prop_type = _scf_read_tmpl_prop_type_as_string(pt);
5319 scf_propertygroup_t *pg, const scf_prop_tmpl_t *pt, scf_property_t *prop)
5331 if ((t_fmri = _scf_tmpl_get_fmri(pt->prt_t)) == NULL)
5339 if (scf_tmpl_pg_name(pt->prt_t, &t_pg_name) == -1) {
5342 if (scf_tmpl_pg_type(pt->prt_t, &t_pg_type) == -1) {
5345 if (scf_tmpl_prop_name(pt, &t_prop_name) == -1) {
5348 t_prop_type = _scf_read_tmpl_prop_type_as_string(pt);
5397 scf_propertygroup_t *pg, const scf_prop_tmpl_t *pt, scf_property_t *prop,
5411 if ((t_fmri = _scf_tmpl_get_fmri(pt->prt_t)) == NULL)
5425 if (scf_tmpl_pg_name(pt->prt_t, &t_pg_name) == -1) {
5428 if (scf_tmpl_pg_type(pt->prt_t, &t_pg_type) == -1) {
5431 if (scf_tmpl_prop_name(pt, &t_prop_name) == -1) {
5434 t_prop_type = _scf_read_tmpl_prop_type_as_string(pt);
5506 scf_propertygroup_t *pg, const scf_prop_tmpl_t *pt, scf_property_t *prop,
5519 if ((t_fmri = _scf_tmpl_get_fmri(pt->prt_t)) == NULL)
5544 if (scf_tmpl_pg_name(pt->prt_t, &t_pg_name) == -1) {
5547 if (scf_tmpl_pg_type(pt->prt_t, &t_pg_type) == -1) {
5550 if (scf_tmpl_prop_name(pt, &t_prop_name) == -1) {
5553 t_prop_type = _scf_read_tmpl_prop_type_as_string(pt);
5597 scf_propertygroup_t *pg, const scf_prop_tmpl_t *pt, scf_property_t *prop,
5611 if ((t_fmri = _scf_tmpl_get_fmri(pt->prt_t)) == NULL)
5625 if (scf_tmpl_pg_name(pt->prt_t, &t_pg_name) == -1) {
5628 if (scf_tmpl_pg_type(pt->prt_t, &t_pg_type) == -1) {
5631 if (scf_tmpl_prop_name(pt, &t_prop_name) == -1) {
5634 t_prop_type = _scf_read_tmpl_prop_type_as_string(pt);
5801 const scf_prop_tmpl_t *pt, scf_value_t *value, scf_tmpl_errors_t *errs)
5825 if (scf_tmpl_prop_type(pt, &tmpl_type) == -1) {
5833 SCF_TERR_PROP_TYPE_MISMATCH, NULL, pt,
5847 if (scf_tmpl_value_count_range_constraints(pt, &cr) != 0) {
5872 if (scf_tmpl_value_int_range_constraints(pt, &ir) != 0) {
5907 if (scf_tmpl_value_name_constraints(pt, &vals) != 0) {
5951 if (_add_tmpl_count_error(errs, terr_type, pg, pt,
5960 if (_add_tmpl_int_error(errs, terr_type, pg, pt, prop,
5970 pt, prop, value) == -1)
5992 scf_tmpl_value_in_constraint(const scf_prop_tmpl_t *pt, scf_value_t *value,
6000 if ((fmri = _scf_tmpl_get_fmri(pt->prt_t)) == NULL)
6009 return (_value_in_constraint(NULL, NULL, pt, value, e));
6088 _validate_cardinality(scf_propertygroup_t *pg, scf_prop_tmpl_t *pt,
6099 if (scf_tmpl_prop_cardinality(pt, &min, &max) != 0) {
6151 pg, pt, prop, (uint64_t)count, &min, &max) == -1)
6176 _check_property(scf_prop_tmpl_t *pt, scf_propertygroup_t *pg,
6206 if (scf_tmpl_prop_required(pt, &required) != 0)
6210 if (scf_tmpl_prop_type(pt, &tmpl_type) == -1) {
6223 if (_add_tmpl_wrong_prop_type_error(errs, pg, pt,
6242 if (_validate_cardinality(pg, pt, prop, errs) == -1)
6257 if (_value_in_constraint(pg, prop, pt, val, errs) == -1) {
6306 scf_prop_tmpl_t *pt = NULL;
6327 if ((pt = scf_tmpl_prop_create(h)) == NULL) {
6382 if (scf_tmpl_get_by_prop(t, prop_name, pt, 0) != 0) {
6397 if (_check_property(pt, pg, prop, errs) != 0)
6410 scf_tmpl_prop_reset(pt);
6416 while ((r = scf_tmpl_iter_props(t, pt,
6420 if (scf_tmpl_prop_name(pt, &prop_name) == -1)
6424 if (scf_tmpl_prop_type(pt, &prop_type) == -1) {
6437 pt) == -1)
6475 scf_tmpl_prop_destroy(pt);