Lines Matching refs:prop

76     const char *prop)
82 if (prop == NULL) {
101 strlen(prop) + 1;
125 (void) strcat(fmri_buf, prop);
135 fill_prop(scf_property_t *prop, const char *pgname, const char *propname,
172 if (scf_property_type(prop, &ret->pr_type) == -1)
182 if (scf_iter_property_values(iter, prop) == -1)
360 scf_simple_pg *thispg, scf_property_t *prop, size_t namelen,
367 while ((propiter_ret = scf_iter_next_property(propiter, prop)) == 1) {
369 if (scf_property_get_name(prop, propname, namelen) < 0) {
382 if ((newprop = fill_prop(prop, pgname,
403 if ((newprop = fill_prop(prop, pgname, propname, h)) ==
718 scf_property_t *prop = NULL;
726 (prop = scf_property_create(h)) == NULL ||
779 if (scf_pg_get_property(pg, action, prop) != 0) {
797 } else if (scf_property_get_value(prop, v) != 0) {
911 scf_property_destroy(prop);
965 scf_property_t *prop = NULL;
971 ((prop = scf_property_create(h)) == NULL) ||
978 scf_pg_get_property(pg, SCF_PROPERTY_STATE, prop) == -1 ||
979 scf_property_get_value(prop, val) == -1) {
1006 scf_property_destroy(prop);
1226 scf_simple_prop_t *prop;
1232 if ((prop = scf_simple_prop_get(NULL, instance, SCF_PG_RESTARTER,
1236 if ((state_str = scf_simple_prop_next_astring(prop)) == NULL) {
1237 scf_simple_prop_free(prop);
1242 scf_simple_prop_free(prop);
1245 scf_simple_prop_free(prop);
1254 scf_simple_prop_t *prop;
1258 if ((prop = scf_simple_prop_get(NULL, instance, SCF_PG_RESTARTER,
1262 if ((state_str = scf_simple_prop_next_astring(prop)) == NULL) {
1263 scf_simple_prop_free(prop);
1275 scf_simple_prop_free(prop);
1282 scf_simple_prop_t *prop;
1286 if ((prop = scf_simple_prop_get(NULL, instance, SCF_PG_RESTARTER,
1290 if ((state_str = scf_simple_prop_next_astring(prop)) == NULL) {
1291 scf_simple_prop_free(prop);
1298 scf_simple_prop_free(prop);
1452 scf_property_t *prop = scf_property_create(simple_h->h);
1456 if ((val == NULL) || (prop == NULL)) {
1464 if (scf_pg_get_property(simple_h->running_pg, prop_name, prop) != 0) {
1469 if (scf_property_get_value(prop, val) == -1) {
1483 scf_property_destroy(prop);
1655 scf_property_t *prop = NULL;
1677 (prop = scf_property_create(h)) == NULL)
1679 if (scf_handle_decode_fmri(h, fmri_buf, NULL, NULL, NULL, NULL, prop,
1702 NULL, NULL, prop, 0) == -1) {
1719 if ((ret = fill_prop(prop, pgname, propname, h)) == NULL)
1723 scf_property_destroy(prop);
1736 scf_property_destroy(prop);
1746 scf_simple_prop_free(scf_simple_prop_t *prop)
1750 if (prop == NULL)
1753 free(prop->pr_propname);
1754 free(prop->pr_pgname);
1755 switch (prop->pr_type) {
1757 for (i = 0; i < prop->pr_numvalues; i++) {
1758 free(prop->pr_vallist[i].pv_opaque.o_value);
1771 for (i = 0; i < prop->pr_numvalues; i++) {
1772 free(prop->pr_vallist[i].pv_str);
1779 free(prop->pr_vallist);
1780 free(prop);
1790 scf_property_t *prop = NULL;
1846 (prop = scf_property_create(h)) == NULL) {
1920 while ((propiter_ret = scf_iter_next_property(propiter, prop))
1922 if (scf_property_get_name(prop, propname, namelen) <
1930 if ((nextprop = fill_prop(prop,
1937 if ((thisprop = fill_prop(prop,
2020 thispg, prop, namelen, h) == -1)
2052 scf_iter_next_property(propiter, prop)) == 1) {
2053 if (scf_property_get_name(prop, propname,
2061 if ((nextprop = fill_prop(prop,
2069 if ((thisprop = fill_prop(prop,
2102 scf_property_destroy(prop);
2124 scf_property_destroy(prop);
2203 * If last isn't NULL, then return the next prop in the property group,
2233 scf_simple_prop_t *prop;
2260 prop = pg->pg_proplist;
2262 while ((prop != NULL) && (strcmp(propname, prop->pr_propname) != 0))
2263 prop = prop->pr_next;
2265 if (prop == NULL) {
2270 return (prop);
2274 scf_simple_prop_next_reset(scf_simple_prop_t *prop)
2276 if (prop == NULL)
2278 prop->pr_iter = 0;
2282 scf_simple_prop_numvalues(const scf_simple_prop_t *prop)
2284 if (prop == NULL)
2287 return (prop->pr_numvalues);
2292 scf_simple_prop_type(const scf_simple_prop_t *prop)
2294 if (prop == NULL)
2297 return (prop->pr_type);
2302 scf_simple_prop_name(const scf_simple_prop_t *prop)
2304 if ((prop == NULL) || (prop->pr_propname == NULL)) {
2309 return (prop->pr_propname);
2314 scf_simple_prop_pgname(const scf_simple_prop_t *prop)
2316 if ((prop == NULL) || (prop->pr_pgname == NULL)) {
2321 return (prop->pr_pgname);
2326 scf_next_val(scf_simple_prop_t *prop, scf_type_t type)
2328 if (prop == NULL) {
2333 switch (prop->pr_type) {
2349 if (type != prop->pr_type) {
2357 if (prop->pr_iter >= prop->pr_numvalues) {
2362 return (&prop->pr_vallist[prop->pr_iter++]);
2367 scf_simple_prop_next_boolean(scf_simple_prop_t *prop)
2371 ret = scf_next_val(prop, SCF_TYPE_BOOLEAN);
2381 scf_simple_prop_next_count(scf_simple_prop_t *prop)
2385 ret = scf_next_val(prop, SCF_TYPE_COUNT);
2395 scf_simple_prop_next_integer(scf_simple_prop_t *prop)
2399 ret = scf_next_val(prop, SCF_TYPE_INTEGER);
2408 scf_simple_prop_next_time(scf_simple_prop_t *prop, int32_t *nsec)
2412 ret = scf_next_val(prop, SCF_TYPE_TIME);
2424 scf_simple_prop_next_astring(scf_simple_prop_t *prop)
2428 ret = scf_next_val(prop, SCF_TYPE_ASTRING);
2437 scf_simple_prop_next_ustring(scf_simple_prop_t *prop)
2441 ret = scf_next_val(prop, SCF_TYPE_USTRING);
2450 scf_simple_prop_next_opaque(scf_simple_prop_t *prop, size_t *length)
2454 ret = scf_next_val(prop, SCF_TYPE_OPAQUE);
2535 scf_propvec_t *prop;
2537 for (prop = propvec; prop->pv_prop != NULL; prop++) {
2538 assert(prop->pv_type != SCF_TYPE_INVALID);
2539 if (prop->pv_type == SCF_TYPE_OPAQUE) {
2540 scf_opaque_t *o = prop->pv_ptr;
2544 } else if (scf_true_base_type(prop->pv_type) ==
2546 if (*(char **)prop->pv_ptr != NULL)
2547 free(*(char **)prop->pv_ptr);
2601 scf_propvec_t *prop;
2632 for (prop = properties; prop->pv_prop != NULL; prop++) {
2633 if (prop->pv_type == SCF_TYPE_OPAQUE)
2634 ((scf_opaque_t *)prop->pv_ptr)->so_addr = NULL;
2635 else if (scf_true_base_type(prop->pv_type) == SCF_TYPE_ASTRING)
2636 *((char **)prop->pv_ptr) = NULL;
2639 for (prop = properties; prop->pv_prop != NULL; prop++) {
2642 if (scf_pg_get_property(pg, prop->pv_prop, p) == -1 ||
2644 *badprop = prop;
2647 switch (prop->pv_type) {
2654 if (prop->pv_aux != 0) {
2655 uint64_t *bits = prop->pv_ptr;
2656 *bits = b ? (*bits | prop->pv_aux) :
2657 (*bits & ~prop->pv_aux);
2659 boolean_t *bool = prop->pv_ptr;
2665 ret = scf_value_get_count(v, prop->pv_ptr);
2668 ret = scf_value_get_integer(v, prop->pv_ptr);
2671 scf_time_t *time = prop->pv_ptr;
2678 scf_opaque_t *opaque = prop->pv_ptr;
2682 *badprop = prop;
2697 assert(scf_true_base_type(prop->pv_type) ==
2702 *badprop = prop;
2710 *(char **)prop->pv_ptr = s;
2714 *badprop = prop;
2770 scf_propvec_t *prop;
2811 for (prop = properties, i = 0; prop->pv_prop != NULL; prop++, i++) {
2812 ret = scf_transaction_property_change(tx, e[i], prop->pv_prop,
2813 prop->pv_type);
2816 prop->pv_prop, prop->pv_type);
2819 *badprop = prop;
2823 switch (prop->pv_type) {
2825 boolean_t b = (prop->pv_aux != 0) ?
2826 (*(uint64_t *)prop->pv_ptr & prop->pv_aux) != 0 :
2827 *(boolean_t *)prop->pv_ptr;
2833 scf_value_set_count(v[i], *(uint64_t *)prop->pv_ptr);
2836 scf_value_set_integer(v[i], *(int64_t *)prop->pv_ptr);
2839 scf_time_t *time = prop->pv_ptr;
2846 scf_opaque_t *opaque = prop->pv_ptr;
2854 (const char *)prop->pv_ptr);
2857 ret = scf_value_set_from_string(v[i], prop->pv_type,
2858 (const char *)prop->pv_ptr);
2862 *badprop = prop;
3034 scf_simple_prop_t *prop;
3038 prop = scf_simple_prop_get(NULL, fmri, SCF_GROUP_APPLICATION,
3040 if (!prop)
3042 ret = scf_simple_prop_next_boolean(prop);
3044 scf_simple_prop_free(prop);