Lines Matching +defs:val +defs:callback

106 static void scf_value_reset_locked(scf_value_t *val, int and_destroy);
850 uint64_t val;
851 if (scf_value_get_count(v, &val) < 0)
855 handle->rh_debug = (uid_t)val;
2631 scf_scope_handle(const scf_scope_t *val)
2633 return (datael_handle(&val->rd_d));
2637 scf_scope_destroy(scf_scope_t *val)
2639 if (val == NULL)
2642 datael_destroy(&val->rd_d);
2643 uu_free(val);
2725 scf_service_handle(const scf_service_t *val)
2727 return (datael_handle(&val->rd_d));
2877 scf_service_destroy(scf_service_t *val)
2879 if (val == NULL)
2882 datael_destroy(&val->rd_d);
2883 uu_free(val);
2916 scf_instance_handle(const scf_instance_t *val)
2918 return (datael_handle(&val->rd_d));
2922 scf_instance_destroy(scf_instance_t *val)
2924 if (val == NULL)
2927 datael_destroy(&val->rd_d);
2928 uu_free(val);
2961 scf_snapshot_handle(const scf_snapshot_t *val)
2963 return (datael_handle(&val->rd_d));
2967 scf_snapshot_destroy(scf_snapshot_t *val)
2969 if (val == NULL)
2972 datael_destroy(&val->rd_d);
2973 uu_free(val);
3006 scf_snaplevel_handle(const scf_snaplevel_t *val)
3008 return (datael_handle(&val->rd_d));
3012 scf_snaplevel_destroy(scf_snaplevel_t *val)
3014 if (val == NULL)
3017 datael_destroy(&val->rd_d);
3018 uu_free(val);
3148 scf_pg_handle(const scf_propertygroup_t *val)
3150 return (datael_handle(&val->rd_d));
3154 scf_pg_destroy(scf_propertygroup_t *val)
3156 if (val == NULL)
3159 datael_destroy(&val->rd_d);
3160 uu_free(val);
3547 scf_property_handle(const scf_property_t *val)
3549 return (datael_handle(&val->rd_d));
3553 scf_property_destroy(scf_property_t *val)
3555 if (val == NULL)
3558 datael_destroy(&val->rd_d);
3559 uu_free(val);
3690 scf_transaction_handle(const scf_transaction_t *val)
3692 return (handle_get(val->tran_pg.rd_d.rd_handle));
3958 commit_value(caddr_t data, scf_value_t *val, rep_protocol_value_type_t t)
3962 assert(val->value_type == t);
3965 len = scf_opaque_encode(data, val->value_value,
3966 val->value_size);
3969 len = strlcpy(data, val->value_value,
3972 len = strlen(val->value_value);
4156 scf_transaction_destroy(scf_transaction_t *val)
4158 if (val == NULL)
4161 scf_transaction_reset(val);
4163 datael_destroy(&val->tran_pg.rd_d);
4165 uu_list_destroy(val->tran_props);
4166 uu_free(val);
4213 scf_entry_handle(const scf_transaction_entry_t *val)
4215 return (handle_get(val->entry_handle));
4360 scf_value_reset_locked(scf_value_t *val, int and_destroy)
4365 scf_handle_t *h = val->value_handle;
4367 if (val->value_tx != NULL) {
4368 te = val->value_tx;
4371 val->value_tx = NULL;
4375 if (*curp == val) {
4376 *curp = val->value_next;
4383 val->value_type = REP_PROTOCOL_TYPE_INVALID;
4386 val->value_handle = NULL;
4390 uu_free(val);
4395 scf_value_reset(scf_value_t *val)
4397 scf_handle_t *h = val->value_handle;
4400 scf_value_reset_locked(val, 0);
4405 scf_value_handle(const scf_value_t *val)
4407 return (handle_get(val->value_handle));
4411 scf_value_destroy(scf_value_t *val)
4415 if (val == NULL)
4418 h = val->value_handle;
4421 scf_value_reset_locked(val, 1);
4426 scf_value_base_type(const scf_value_t *val)
4429 scf_handle_t *h = val->value_handle;
4432 t = val->value_type;
4446 scf_value_type(const scf_value_t *val)
4449 scf_handle_t *h = val->value_handle;
4452 t = val->value_type;
4459 scf_value_is_type(const scf_value_t *val, scf_type_t base_arg)
4463 scf_handle_t *h = val->value_handle;
4466 t = val->value_type;
4481 * _NOT_SET - val is reset
4482 * _TYPE_MISMATCH - val's type is not compatible with t
4485 scf_value_check_type(const scf_value_t *val, rep_protocol_value_type_t t)
4487 if (val->value_type == REP_PROTOCOL_TYPE_INVALID) {
4491 if (!scf_is_compatible_protocol_type(t, val->value_type)) {
4500 * _NOT_SET - val is reset
4501 * _TYPE_MISMATCH - val is not _TYPE_BOOLEAN
4504 scf_value_get_boolean(const scf_value_t *val, uint8_t *out)
4507 scf_handle_t *h = val->value_handle;
4511 if (!scf_value_check_type(val, REP_PROTOCOL_TYPE_BOOLEAN)) {
4516 c = val->value_value[0];
4517 assert((c == '0' || c == '1') && val->value_value[1] == 0);
4527 scf_value_get_count(const scf_value_t *val, uint64_t *out)
4529 scf_handle_t *h = val->value_handle;
4533 if (!scf_value_check_type(val, REP_PROTOCOL_TYPE_COUNT)) {
4538 o = strtoull(val->value_value, NULL, 10);
4546 scf_value_get_integer(const scf_value_t *val, int64_t *out)
4548 scf_handle_t *h = val->value_handle;
4552 if (!scf_value_check_type(val, REP_PROTOCOL_TYPE_INTEGER)) {
4557 o = strtoll(val->value_value, NULL, 10);
4565 scf_value_get_time(const scf_value_t *val, int64_t *sec_out, int32_t *nsec_out)
4567 scf_handle_t *h = val->value_handle;
4573 if (!scf_value_check_type(val, REP_PROTOCOL_TYPE_TIME)) {
4578 os = strtoll(val->value_value, &p, 10);
4594 * _NOT_SET - val is reset
4595 * _TYPE_MISMATCH - val's type is not compatible with _TYPE_STRING.
4598 scf_value_get_astring(const scf_value_t *val, char *out, size_t len)
4601 scf_handle_t *h = val->value_handle;
4604 if (!scf_value_check_type(val, REP_PROTOCOL_TYPE_STRING)) {
4608 ret = (ssize_t)strlcpy(out, val->value_value, len);
4614 scf_value_get_ustring(const scf_value_t *val, char *out, size_t len)
4617 scf_handle_t *h = val->value_handle;
4620 if (!scf_value_check_type(val, REP_PROTOCOL_SUBTYPE_USTRING)) {
4624 ret = (ssize_t)strlcpy(out, val->value_value, len);
6046 * execute the callback.
6270 scf_walk_callback callback, void *data, int *err,
6590 if ((ret = callback(data, &info)) != 0)
6633 * Without arguments, execute the callback
6643 if ((ret = callback(data, &info)) != 0)
6728 if ((ret = callback(data, &info)) != 0)
6857 * callback.
6898 if ((ret = callback(data, &info)) != 0)
6940 if ((ret = callback(data, &info)) != 0)