Lines Matching refs:errs

4843 _create_error(scf_tmpl_errors_t *errs)  in _create_error()  argument
4848 assert(errs != NULL); in _create_error()
4855 ret->te_errs = errs; in _create_error()
4857 assert(errs->tes_num_errs <= errs->tes_errs_size); in _create_error()
4858 if (errs->tes_num_errs == errs->tes_errs_size) { in _create_error()
4860 saved_errs = errs->tes_errs; in _create_error()
4861 errs->tes_errs = calloc(2 * errs->tes_errs_size, in _create_error()
4863 if (errs->tes_errs == NULL) { in _create_error()
4865 errs->tes_errs = saved_errs; in _create_error()
4869 (void) memcpy(errs->tes_errs, saved_errs, errs->tes_errs_size * in _create_error()
4871 errs->tes_errs_size = 2 * errs->tes_errs_size; in _create_error()
4875 errs->tes_errs[errs->tes_num_errs] = ret; in _create_error()
4876 errs->tes_num_errs++; in _create_error()
4940 _scf_tmpl_error_set_prefix(scf_tmpl_errors_t *errs, const char *prefix) in _scf_tmpl_error_set_prefix() argument
4942 free((void *) errs->tes_prefix); in _scf_tmpl_error_set_prefix()
4944 errs->tes_prefix = strdup(""); in _scf_tmpl_error_set_prefix()
4946 errs->tes_prefix = strdup(prefix); in _scf_tmpl_error_set_prefix()
4947 if (errs->tes_prefix == NULL) { in _scf_tmpl_error_set_prefix()
4960 _scf_tmpl_add_error(scf_tmpl_errors_t *errs, scf_tmpl_error_type_t type, in _scf_tmpl_add_error() argument
4968 assert(errs != NULL); in _scf_tmpl_add_error()
4971 err = _create_error(errs); in _scf_tmpl_add_error()
5032 _add_tmpl_missing_pg_error(scf_tmpl_errors_t *errs, scf_pg_tmpl_t *t) in _add_tmpl_missing_pg_error() argument
5057 return (_scf_tmpl_add_error(errs, SCF_TERR_MISSING_PG, NULL, NULL, ev1, in _add_tmpl_missing_pg_error()
5083 _add_tmpl_wrong_pg_type_error(scf_tmpl_errors_t *errs, scf_pg_tmpl_t *t, in _add_tmpl_wrong_pg_type_error() argument
5110 return (_scf_tmpl_add_error(errs, SCF_TERR_WRONG_PG_TYPE, pg_name, NULL, in _add_tmpl_wrong_pg_type_error()
5137 _add_tmpl_missing_prop_error(scf_tmpl_errors_t *errs, scf_pg_tmpl_t *t, in _add_tmpl_missing_prop_error() argument
5178 return (_scf_tmpl_add_error(errs, SCF_TERR_MISSING_PROP, pg_name, NULL, in _add_tmpl_missing_prop_error()
5207 _add_tmpl_wrong_prop_type_error(scf_tmpl_errors_t *errs, in _add_tmpl_wrong_prop_type_error() argument
5254 return (_scf_tmpl_add_error(errs, SCF_TERR_WRONG_PROP_TYPE, pg_name, in _add_tmpl_wrong_prop_type_error()
5285 _add_tmpl_count_error(scf_tmpl_errors_t *errs, scf_tmpl_error_type_t type, in _add_tmpl_count_error() argument
5362 return (_scf_tmpl_add_error(errs, type, pg_name, prop_name, s_min, in _add_tmpl_count_error()
5394 _add_tmpl_constraint_error(scf_tmpl_errors_t *errs, scf_tmpl_error_type_t type, in _add_tmpl_constraint_error() argument
5455 return (_scf_tmpl_add_error(errs, type, pg_name, prop_name, NULL, NULL, in _add_tmpl_constraint_error()
5485 _add_tmpl_int_error(scf_tmpl_errors_t *errs, scf_tmpl_error_type_t type, in _add_tmpl_int_error() argument
5562 return (_scf_tmpl_add_error(errs, type, pg_name, prop_name, s_min, in _add_tmpl_int_error()
5594 _add_tmpl_pg_redefine_error(scf_tmpl_errors_t *errs, scf_pg_tmpl_t *t, in _add_tmpl_pg_redefine_error() argument
5618 return (_scf_tmpl_add_error(errs, SCF_TERR_PG_REDEFINE, NULL, NULL, in _add_tmpl_pg_redefine_error()
5690 const scf_prop_tmpl_t *pt, scf_value_t *value, scf_tmpl_errors_t *errs) in _value_in_constraint() argument
5719 if (errs != NULL) { in _value_in_constraint()
5721 if (_add_tmpl_constraint_error(errs, in _value_in_constraint()
5827 if (ret == 1 && errs != NULL) { in _value_in_constraint()
5840 if (_add_tmpl_count_error(errs, terr_type, pg, pt, in _value_in_constraint()
5849 if (_add_tmpl_int_error(errs, terr_type, pg, pt, prop, in _value_in_constraint()
5858 if (_add_tmpl_constraint_error(errs, terr_type, pg, in _value_in_constraint()
5882 scf_tmpl_errors_t **errs) in scf_tmpl_value_in_constraint() argument
5886 if (errs != NULL) { in scf_tmpl_value_in_constraint()
5891 *errs = _scf_create_errors(fmri, 1); in scf_tmpl_value_in_constraint()
5893 if (*errs == NULL) in scf_tmpl_value_in_constraint()
5895 e = *errs; in scf_tmpl_value_in_constraint()
5902 scf_tmpl_next_error(scf_tmpl_errors_t *errs) in scf_tmpl_next_error() argument
5904 if (errs->tes_index < errs->tes_num_errs) { in scf_tmpl_next_error()
5905 assert(errs->tes_errs[errs->tes_index] != NULL); in scf_tmpl_next_error()
5906 return (errs->tes_errs[errs->tes_index++]); in scf_tmpl_next_error()
5913 scf_tmpl_reset_errors(scf_tmpl_errors_t *errs) in scf_tmpl_reset_errors() argument
5915 errs->tes_index = 0; in scf_tmpl_reset_errors()
5978 scf_property_t *prop, scf_tmpl_errors_t *errs) in _validate_cardinality() argument
6039 if (_add_tmpl_count_error(errs, SCF_TERR_CARDINALITY_VIOLATION, in _validate_cardinality()
6066 scf_property_t *prop, scf_tmpl_errors_t *errs) in _check_property() argument
6112 if (_add_tmpl_wrong_prop_type_error(errs, pg, pt, in _check_property()
6131 if (_validate_cardinality(pg, pt, prop, errs) == -1) in _check_property()
6146 if (_value_in_constraint(pg, prop, pt, val, errs) == -1) { in _check_property()
6193 char *type, scf_tmpl_errors_t *errs) in _check_pg() argument
6250 if (_add_tmpl_wrong_pg_type_error(errs, t, pg) == -1) in _check_pg()
6286 if (_check_property(pt, pg, prop, errs) != 0) in _check_pg()
6325 if (_add_tmpl_missing_prop_error(errs, t, pg, in _check_pg()
6390 const char *snapname, scf_tmpl_errors_t *errs) in _scf_tmpl_check_pg_redef() argument
6447 if (_add_tmpl_pg_redefine_error(errs, t, in _scf_tmpl_check_pg_redef()
6530 scf_tmpl_errors_t **errs, int flags) in scf_tmpl_validate_fmri() argument
6544 assert(errs != NULL); in scf_tmpl_validate_fmri()
6546 if ((*errs = _scf_create_errors(fmri, 1)) == NULL) in scf_tmpl_validate_fmri()
6600 if (_scf_tmpl_check_pg_redef(h, fmri, snapshot, *errs) != 0) { in scf_tmpl_validate_fmri()
6652 if (_check_pg(t, pg, pg_name, type, *errs) != 0) in scf_tmpl_validate_fmri()
6693 if (_add_tmpl_missing_pg_error(*errs, t) == -1) in scf_tmpl_validate_fmri()
6723 if ((*errs)->tes_num_errs > 0) in scf_tmpl_validate_fmri()
6728 scf_tmpl_errors_destroy(*errs); in scf_tmpl_validate_fmri()
6729 *errs = NULL; in scf_tmpl_validate_fmri()
6744 scf_tmpl_errors_destroy(scf_tmpl_errors_t *errs) in scf_tmpl_errors_destroy() argument
6749 if (errs == NULL) in scf_tmpl_errors_destroy()
6752 for (i = 0; i < errs->tes_num_errs; ++i) { in scf_tmpl_errors_destroy()
6753 e = errs->tes_errs[i]; in scf_tmpl_errors_destroy()
6754 if (errs->tes_flag != 0) { in scf_tmpl_errors_destroy()
6768 free((char *)errs->tes_fmri); in scf_tmpl_errors_destroy()
6769 free((char *)errs->tes_prefix); in scf_tmpl_errors_destroy()
6770 free(errs->tes_errs); in scf_tmpl_errors_destroy()
6771 free(errs); in scf_tmpl_errors_destroy()