Lines Matching refs:vals

510  * appends to an existing scf_values_t *vals.  vals may be empty, but
531 scf_values_t *vals)
540 assert(vals != NULL);
541 assert(vals->value_type == SCF_TYPE_ASTRING);
542 assert(vals->reserved == NULL);
543 count = vals->value_count;
546 vals->values.v_astring = calloc(cursz, sizeof (char *));
547 if (vals->values.v_astring == NULL) {
596 (void) memcpy(aux, vals->values.v_astring,
598 free(vals->values.v_astring);
599 vals->values.v_astring = aux;
602 vals->values.v_astring[count] = malloc(rsize);
603 if (vals->values.v_astring[count] == NULL) {
609 vals->values.v_astring[count], rsize)) <= 0) {
612 free(vals->values.v_astring[count]);
620 if (strncmp(vals->values.v_astring[i],
621 vals->values.v_astring[count], rsize) == 0) {
622 free(vals->values.v_astring[count]);
633 vals->value_count = count;
641 vals->values_as_strings = vals->values.v_astring;
648 if (vals->values.v_astring[i] != NULL)
649 free(vals->values.v_astring[i]);
650 vals->values.v_astring[i] = NULL;
652 free(vals->values.v_astring);
653 vals->values.v_astring = NULL;
654 vals->value_count = 0;
660 return (vals->values.v_astring);
682 scf_values_t *vals)
684 assert(vals != NULL);
685 vals->value_count = 0;
686 vals->value_type = SCF_TYPE_ASTRING;
687 vals->reserved = NULL;
688 return (_append_astrings_values(pg, prop_name, vals));
3637 scf_tmpl_prop_internal_seps(const scf_prop_tmpl_t *t, scf_values_t *vals)
3640 SCF_PROPERTY_INTERNAL_SEPARATORS, vals) == NULL) {
3658 } else if (vals->value_count == 0) {
3661 scf_values_destroy(vals);
3685 scf_values_t *vals)
3690 SCF_PROPERTY_TM_CONSTRAINT_NAME, vals);
3710 } else if (vals->value_count == 0) {
3713 scf_values_destroy(vals);
3788 scf_values_t vals;
3791 SCF_PROPERTY_TM_CHOICES_INCLUDE_VALUES, &vals)) == NULL) {
3810 for (n = 0; n < vals.value_count; ++n) {
3816 scf_values_destroy(&vals);
3866 scf_values_t vals;
3876 if ((ret = _read_astrings_values(t->prt_pg, prop, &vals)) == NULL)
3878 if (vals.value_count == 0) {
3884 min = malloc(vals.value_count * sizeof (uint64_t));
3885 max = malloc(vals.value_count * sizeof (uint64_t));
3890 for (i = 0; i < vals.value_count; ++i) {
3914 ranges->scr_num_ranges = vals.value_count;
3917 scf_values_destroy(&vals);
3923 scf_values_destroy(&vals);
3965 scf_values_t vals;
3975 if ((ret = _read_astrings_values(t->prt_pg, prop, &vals)) == NULL)
3977 if (vals.value_count == 0) {
3983 min = malloc(vals.value_count * sizeof (int64_t));
3984 max = malloc(vals.value_count * sizeof (int64_t));
3989 while (n < vals.value_count) {
4014 ranges->sir_num_ranges = vals.value_count;
4017 scf_values_destroy(&vals);
4023 scf_values_destroy(&vals);
4110 scf_tmpl_value_name_choices(const scf_prop_tmpl_t *t, scf_values_t *vals)
4118 SCF_PROPERTY_TM_CHOICES_NAME, vals)) != NULL) {
4130 SCF_PROPERTY_TM_VALUES_NAME, vals);
4134 SCF_PROPERTY_TM_VALUES_NAME, vals);
4151 SCF_PROPERTY_TM_CONSTRAINT_NAME, vals);
4155 SCF_PROPERTY_TM_CONSTRAINT_NAME, vals);
4165 if (c_flag == 0 || vals->value_count == 0) {
4190 scf_values_destroy(scf_values_t *vals)
4196 if (vals == NULL)
4199 str = vals->values_as_strings;
4202 switch (vals->value_type) {
4204 free(vals->values.v_boolean);
4207 free(vals->values.v_count);
4210 free(vals->values.v_integer);
4213 items = vals->values.v_astring;
4217 items = vals->values.v_ustring;
4221 items = vals->values.v_opaque;
4225 free(vals->values.v_time);
4231 for (i = 0; i < vals->value_count; ++i) {
4237 vals->value_count = 0;
5804 scf_values_t vals;
5907 if (scf_tmpl_value_name_constraints(pt, &vals) != 0) {
5921 constraints = vals.values.v_astring;
5925 scf_values_destroy(&vals);
5932 scf_values_destroy(&vals);