Lines Matching +defs:val +defs:method
1185 prop_get_val(scf_property_t *prop, scf_value_t *val)
1189 if (scf_property_get_value(prop, val) == SCF_SUCCESS)
2281 scf_value_t *val;
2357 val = scf_value_create(g_hndl);
2358 if (val == NULL) {
2371 scf_value_set_boolean(val, vp->sc_u.sc_count);
2374 scf_value_set_count(val, vp->sc_u.sc_count);
2377 scf_value_set_integer(val, vp->sc_u.sc_integer);
2381 if (scf_value_set_from_string(val, tp,
2390 scf_value_destroy(val);
2396 if (scf_entry_add_value(entr, val) != 0)
3271 scf_value_t *val;
3377 val = scf_value_create(lcbdata->sc_handle);
3378 if (val == NULL) {
3386 if (scf_value_set_from_string(val, SCF_TYPE_FMRI,
3391 if (scf_entry_add_value(e, val) != 0)
5001 scf_value_t *val;
5070 (val = scf_value_create(g_hndl)) == NULL) {
5132 if (scf_value_set_from_string(val, SCF_TYPE_FMRI,
5138 if (scf_entry_add_value(ent, val) != 0)
8953 safe_setprop(xmlNodePtr n, const char *name, const char *val)
8955 if (xmlSetProp(n, (const xmlChar *)name, (const xmlChar *)val) == NULL)
8969 scf_value_t *val;
8973 val = scf_value_create(g_hndl);
8974 if (val == NULL)
8977 if (prop_get_val(prop, val) != 0) {
8978 scf_value_destroy(val);
8982 len = scf_value_get_as_string(val, NULL, 0);
8988 if (scf_value_get_as_string(val, str, len + 1) < 0)
8991 scf_value_destroy(val);
9447 * As above, but for a method property group.
11085 scf_value_t *val;
11128 (val = scf_value_create(g_hndl)) == NULL ||
11191 prop_get_val(prop, val) != 0)
11205 if (scf_value_get_boolean(val, &b) != SCF_SUCCESS)
12173 scf_value_t *val;
12203 (val = scf_value_create(g_hndl)) == NULL ||
12224 prop_get_val(prop, val) != 0)
12227 if (scf_value_get_astring(val, fmri, max_scf_fmri_len + 2) < 0)
12250 scf_value_destroy(val);
12264 scf_value_t *val;
12271 (val = scf_value_create(g_hndl)) == NULL)
12282 prop_get_val(prop, val) != 0)
12285 szret = scf_value_get_astring(val, buf, sizeof (buf));
12292 scf_value_destroy(val);
12302 scf_value_t *val;
12312 (val = scf_value_create(g_hndl)) == NULL)
12317 if (scf_property_get_value(prop, val) != 0)
12319 if (scf_value_get_boolean(val, &b) != 0)
12325 (void) scf_value_destroy(val);
12721 prop_has_multiple_values(const scf_property_t *prop, scf_value_t *val)
12723 if (scf_property_get_value(prop, val) == 0) {
12743 scf_value_t *val;
12749 (val = scf_value_create(g_hndl)) == NULL)
12757 if (prop_has_multiple_values(prop, val) &&
12758 (scf_value_type(val) == SCF_TYPE_ASTRING ||
12759 scf_value_type(val) == SCF_TYPE_USTRING))
12765 while ((ret = scf_iter_next_value(iter, val)) == 1) {
12769 vlen = scf_value_get_as_string(val, NULL, 0);
12775 szret = scf_value_get_as_string(val, buf, vlen + 1);
13050 scf_value_t *val;
13054 (val = scf_value_create(g_hndl)) == NULL)
13062 while ((ret = scf_iter_next_value(iter, val)) == 1) {
13063 if (scf_value_get_as_string(val, val_buf,
13266 scf_value_t *val;
13270 (val = scf_value_create(g_hndl)) == NULL ||
13283 if (prop_get_val(prop, val) == 0 &&
13284 scf_value_get_ustring(val, common_name,
13304 if (prop_get_val(prop, val) == 0 &&
13305 scf_value_get_ustring(val, description,
13334 scf_value_destroy(val);
14164 scf_value_t *val;
14204 (val = scf_value_create(g_hndl)) == NULL ||
14261 multiple = prop_has_multiple_values(prop, val);
14278 while ((ret3 = scf_iter_next_value(viter, val)) == 1) {
14282 buflen = scf_value_get_as_string(val, NULL, 0);
14288 if (scf_value_get_as_string(val, buf,
14359 scf_value_destroy(val);
14499 scf_value_t *val;
14503 (val = scf_value_create(g_hndl)) == NULL)
14509 while ((ret = scf_iter_next_value(iter, val)) == 1) {
14513 vlen = scf_value_get_as_string(val, NULL, 0);
14519 szret = scf_value_get_as_string(val, buf, vlen + 1);
14533 scf_value_destroy(val);
14765 * Look for a standard start method, first in the instance (if any),
14866 const char *method = NULL;
14906 method = optarg;
14951 if (method == NULL) {
14953 method = "method_context";
14962 method = start_method_name(&in_instance);
14963 if (method == NULL) {
14965 "Couldn't find start method; please "
14966 "specify a method with '-m'.\n"));
14983 ret = scf_instance_get_pg(cur_inst, method, pg);
14985 ret = scf_service_get_pg(cur_svc, method, pg);
14991 semerr(gettext("Couldn't find the method "
14992 "\"%s\".\n"), method);
14996 semerr(gettext("Invalid method name \"%s\".\n"),
14997 method);
15011 "\"method\".\n"), method);
15022 prop = uu_msprintf("%s/environment", method);
15033 prop = uu_msprintf("%s/environment", method);
15335 scf_value_t *val;
15385 (val = scf_value_create(g_hndl)) == NULL)
15407 scf_property_get_value(prop, val) == 0)
15408 (void) scf_value_get_boolean(val, &enabled);
15532 scf_value_destroy(val);
15986 char *val;
16014 if ((param = strtok_r(p, "=", &val)) != NULL)
16015 if (nvlist_add_string(mech, param, val) != 0)
17359 scf_value_t *val;
17369 val = scf_value_create(g_hndl);
17371 if (pg == NULL || prop == NULL || val == NULL || iter == NULL ||
17379 uu_warn("%s\n", val == NULL ? "val is NULL" :
17380 "val is not NULL");
17452 if (scf_property_get_value(prop, val) != SCF_SUCCESS) {
17475 if (scf_value_get_astring(val, mfile, max_scf_value_len + 1)
17501 scf_value_destroy(val);