Lines Matching +defs:val +defs:to

4  * The contents of this file are subject to the terms of the
82 * Mapping of state transition to pgname.
88 { "to-uninitialized", SCF_TRANS(0, SCF_STATE_UNINIT) },
90 { "to-maintenance", SCF_TRANS(0, SCF_STATE_MAINT) },
92 { "to-offline", SCF_TRANS(0, SCF_STATE_OFFLINE) },
94 { "to-disabled", SCF_TRANS(0, SCF_STATE_DISABLED) },
96 { "to-online", SCF_TRANS(0, SCF_STATE_ONLINE) },
98 { "to-degraded", SCF_TRANS(0, SCF_STATE_DEGRADED) },
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)
634 * Add new transaction entry to scf_transaction_t
725 * smf_notify_get_params() we want to skip
749 /* map the nvpair type to scf type */
815 * exact match to the fmri parameter.
817 * The function destroys and sets the unused entity (service or instance) to
879 * Return a pointer to the array of values according to its type
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 ||
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
1059 * mapping them all to SCF_TYPE_USTRING
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;
1341 /* We only need to refresh the instance */
1346 /* We have to refresh all instances in the service */
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) {
1491 * Instance, service and global instance have to be passed by caller.
1562 * Specialized function to get SMF state transition notification parameters
1688 * Specialized function to get fma notification parameters
1786 * The function will allocate an nvlist_t to store the notification
1818 char *to; /* to state */
1837 nvlist_lookup_string(attr, "to-state", &to) != 0) {
1843 smf_state_from_string(to));
1937 /* We only need to refresh the instance */
1942 /* We have to refresh all instances in the service */