Lines Matching +defs:val +defs:from
89 { "from-uninitialized", SCF_TRANS(SCF_STATE_UNINIT, 0) },
91 { "from-maintenance", SCF_TRANS(SCF_STATE_MAINT, 0) },
93 { "from-offline", SCF_TRANS(SCF_STATE_OFFLINE, 0) },
95 { "from-disabled", SCF_TRANS(SCF_STATE_DISABLED, 0) },
97 { "from-online", SCF_TRANS(SCF_STATE_ONLINE, 0) },
99 { "from-degraded", SCF_TRANS(SCF_STATE_DEGRADED, 0) },
188 * Get the pg from the running snapshot of the instance (composed or not)
343 add_entry(scf_transaction_entry_t *te, scf_value_t *val)
345 if (scf_entry_add_value(te, val) != 0) {
346 scf_value_destroy(val);
356 scf_value_t *val = scf_value_create(h);
358 if (val == NULL)
361 scf_value_set_boolean(val, v);
363 return (add_entry(te, val));
369 scf_value_t *val = scf_value_create(h);
371 if (val == NULL)
374 scf_value_set_count(val, v);
376 return (add_entry(te, val));
382 scf_value_t *val = scf_value_create(h);
384 if (val == NULL)
387 scf_value_set_integer(val, v);
389 return (add_entry(te, val));
395 scf_value_t *val = scf_value_create(h);
397 if (val == NULL)
400 if (scf_value_set_astring(val, s) != 0) {
401 scf_value_destroy(val);
405 return (add_entry(te, val));
411 scf_value_t *val = scf_value_create(h);
415 if (val == NULL)
724 * if this is output from
906 get_value(scf_value_t *val, scf_values_t *v, int c, char *buf, int sz)
910 return (scf_value_get_boolean(val, v->values.v_boolean + c));
912 return (scf_value_get_count(val, v->values.v_count + c));
914 return (scf_value_get_integer(val, v->values.v_integer + c));
916 if (scf_value_get_astring(val, buf, sz) < 0 ||
923 if (scf_value_get_ustring(val, buf, sz) < 0 ||
937 * Populate scf_values_t structure with values from prop
944 scf_value_t *val = scf_value_create(h);
966 if (val == NULL || it == NULL)
985 while ((err = scf_iter_next_value(it, val)) == 1) {
998 if (get_value(val, v, count, buf, sz) != 0)
1019 scf_value_destroy(val);
1024 * Add values from property p to existing nvlist_t nvl. The data type in the
1025 * nvlist is inferred from the scf_type_t of the property.
1164 * and parameter. *mech must be freed by caller. *val points into
1172 get_mech_name(const char *name, char **mech, char **val)
1187 *val = p + 1;
1430 char *val;
1438 if (get_mech_name(name, &mech, &val) != SCF_SUCCESS) {
1453 if (add_prop_to_nvlist(p, val, nvl, 1) != SCF_SUCCESS) {
1816 char *from; /* from state */
1835 nvlist_lookup_string(attr, "from-state", &from) != 0 ||
1841 tset = SCF_TRANS(smf_state_from_string(from),