Lines Matching refs:fmri

1126 		char *fmri;
1132 fmri = safe_malloc(len + 1);
1134 if (scf_pg_to_fmri(pg, fmri, len + 1) < 0)
1138 "missing.\n"), propname, fmri);
1140 free(fmri);
1159 char *fmri;
1166 fmri = safe_malloc(len + 1);
1168 if (scf_property_to_fmri(prop, fmri, len + 1) < 0)
1176 fmri, tystr);
1178 free(fmri);
1201 char *fmri, *emsg;
1207 fmri = safe_malloc(len + 1);
1209 if (scf_property_to_fmri(prop, fmri, len + 1) < 0)
1221 warn(emsg, fmri);
1223 free(fmri);
1252 fmri_to_entity(scf_handle_t *h, const char *fmri, void **ep, int *isservice)
1259 fmri_copy = strdup(fmri);
1279 if (scf_handle_decode_fmri(h, fmri, NULL, svc, NULL, NULL, NULL,
1294 if (scf_handle_decode_fmri(h, fmri, NULL, NULL, inst, NULL,
1310 * Create the entity named by fmri. Place a pointer to its libscf handle in
1315 * SCF_ERROR_INVALID_ARGUMENT - fmri is invalid
1316 * SCF_ERROR_CONSTRAINT_VIOLATED - fmri is not a service or instance
1323 create_entity(scf_handle_t *h, const char *fmri, void **ep, int *isservicep)
1332 fmri_copy = safe_strdup(fmri);
1578 * instances. fmri is used for messages. inst, iter, and name_buf are used
1589 refresh_entity(int isservice, void *entity, const char *fmri,
1606 warn(gettext("Refreshed %s.\n"), fmri);
1712 fmri, name_buf);
1724 "Refresh of %s:%s failed: %s.\n"), fmri,
1853 const char *fmri = NULL;
1885 fmri = pg->sc_parent->sc_fmri;
1892 if (strcmp(cur_selection, fmri) != 0) {
1893 lscf_select(fmri);
1899 lscf_select(fmri);
1927 if (scf_tmpl_get_by_pg_name(fmri, NULL,
1938 fmri = e->sc_fmri;
2036 fmri = e->sc_fmri;
2074 fmri = (const char *)lfmri;
2106 fmri != NULL ? fmri : lcb->sc_source_fmri);
2134 const char *ofmri, *fmri;
2144 ofmri = fmri = si->sc_fmri;
2177 lscf_select(fmri);
2195 if (scf_tmpl_get_by_pg_name(fmri, NULL, pg->sc_pgroup_name,
2211 fmri = si->sc_fmri;
2249 "\"%s\" from \"%s\"\n"), pg->sc_pgroup_name, fmri);
2857 report_pg_diffs(const pgroup_t *pg1, const pgroup_t *pg2, const char *fmri,
2864 if (!pg_attrs_equal(pg1, pg2, fmri, new))
2872 (void) prop_equal(p1, p2, fmri, pg1->sc_pgroup_name,
2880 fmri, pg1->sc_pgroup_name, p1->sc_property_name);
2883 "\"%s/%s\" is missing).\n"), fmri,
2904 pgroup_t *cur, int speak, const char *fmri)
2963 "(property \"%s/%s\" is missing).\n"), fmri,
2977 (void) prop_equal(p, cur_p, fmri,
2980 (void) prop_equal(cur_p, new_p, fmri,
2988 "\"%s/%s\" (live property).\n"), fmri,
3000 fmri, old->sc_pgroup_name,
3043 fmri, old->sc_pgroup_name,
3094 (void) prop_equal(cur_p, new_p, fmri, old->sc_pgroup_name, 1);
3117 pgroup_t *new, int speak, const char *fmri)
3139 r = add_upgrade_entries(imp_tx, old, new, cur, speak, fmri);
4492 * If the fmri's are not equal then the old fmri will need to
7918 * - fmri wasn't found (error printed)
7927 imp_refresh_fmri(const char *fmri, const char *name, const char *d_fmri)
7938 serr = fmri_to_entity(g_hndl, fmri, &ent, &issvc);
7946 fmri);
7950 fmri, name, d_fmri);
7955 warn(deleted, fmri);
7957 warn(dpt_deleted, fmri, name, d_fmri);
7966 r = refresh_entity(issvc, ent, fmri, imp_inst, imp_iter, imp_str);
7975 "(repository connection broken).\n"), fmri, name,
7981 warn(deleted, fmri);
7983 warn(dpt_deleted, fmri, name, d_fmri);
7991 "(backend access denied).\n"), fmri);
7995 "(backend access denied).\n"), fmri, name, d_fmri);
8001 "(permission denied).\n"), fmri);
8005 "(permission denied).\n"), fmri, name, d_fmri);
8012 fmri);
8017 fmri, name, d_fmri);
8468 _lscf_import_err(int err, const char *fmri)
8473 warn(gettext("%s updated.\n"), fmri);
8478 "(repository connection broken).\n"), fmri);
8482 warn(gettext("Could not update %s (out of memory).\n"), fmri);
8487 "(repository server out of resources).\n"), fmri);
8492 "Could not update %s (deleted).\n"), fmri);
8502 fmri);
8507 "(backend access denied).\n"), fmri);
9909 * Given a dependency property group in the tfmri entity (target fmri), return
10032 char *type, *fmri;
10049 fmri = safe_malloc(max_scf_fmri_len + 2);
10072 if (scf_value_get_astring(exp_val, fmri,
10076 /* Look for a dependency group in the target fmri. */
10077 serr = fmri_to_entity(g_hndl, fmri, &entity, &isservice);
10088 if (scf_property_to_fmri(exp_prop, fmri,
10093 "FMRI.\n"), fmri);
10102 if (scf_property_to_fmri(exp_prop, fmri,
10107 "a service or an instance.\n"), fmri);
10116 if (scf_property_to_fmri(exp_prop, fmri,
10121 "not exist.\n"), fmri);
10142 "group %s.\n"), fmri, exp_str);
10153 if (scf_pg_to_fmri(opg, fmri, max_scf_fmri_len + 2) < 0)
10157 "expected type %s.\n"), fmri, SCF_GROUP_DEPENDENCY);
10164 n = export_dependent(opg, exp_str, fmri);
10179 free(fmri);
10891 * Get the service named by fmri, build an XML tree which represents it, and
10895 lscf_service_export(char *fmri, const char *filename, int flags)
10915 fmridup = alloca(strlen(fmri) + 1);
10916 (void) strcpy(fmridup, fmri);
10927 fmri = canonbuf;
10934 if ((ret = scf_walk_fmri(g_hndl, 1, (char **)&fmri,
11166 char *fmri;
11173 fmri = safe_malloc(len + 1);
11175 if (scf_instance_to_fmri(inst, fmri,
11180 "property group.\n", fmri,
11183 free(fmri);
11246 /* Returns 1 if maybe absolute fmri, 0 on success (dies on failure) */
11312 if (scf_handle_decode_fmri(g_hndl, wip->fmri, scope, svc,
11322 if (scf_handle_decode_fmri(g_hndl, wip->fmri, scope, svc,
11345 char **fmri = fmri_p;
11347 *fmri = strdup(wip->fmri);
11348 if (*fmri == NULL)
11355 * validate [fmri]
11359 lscf_validate_fmri(const char *fmri)
11369 if (fmri == NULL) {
11392 if ((scf_err = scf_walk_fmri(g_hndl, 1, (char **)&fmri, 0,
11468 * validate [fmri|file]
11491 lscf_select(const char *fmri)
11514 if (strcmp(buf, fmri) != 0) {
11530 if (strcmp(fmri, "svc:") == 0) {
11542 if (strcmp(fmri, ":properties") == 0) {
11554 if (select_inst(fmri) != 1)
11557 if (select_svc(fmri) != 1)
11562 if ((ret = scf_walk_fmri(g_hndl, 1, (char **)&fmri, SCF_WALK_SERVICE,
11999 * Delete the property group <fmri>/:properties/<name>. Returns
12001 * SCF_ERROR_INVALID_ARGUMENT if the fmri is bad, SCF_ERROR_TYPE_MISMATCH if
12006 delete_dependency_pg(const char *fmri, const char *name)
12018 result = fmri_to_entity(g_hndl, fmri, &entity, &isservice);
12146 (void) refresh_entity(isservice, entity, fmri, inst, iter,
12171 char *pgty, *name, *fmri;
12185 fmri = safe_malloc(max_scf_fmri_len + 1);
12186 if (scf_pg_to_fmri(pg, fmri, max_scf_fmri_len + 1) < 0)
12190 "type %s.\n"), fmri, scf_group_framework);
12192 free(fmri);
12211 fmri = safe_malloc(max_scf_fmri_len + 2);
12227 if (scf_value_get_astring(val, fmri, max_scf_fmri_len + 2) < 0)
12230 err = delete_dependency_pg(fmri, name);
12232 if (scf_property_to_fmri(prop, fmri,
12237 fmri);
12240 "does not have dependency type.\n"), name, fmri);
12244 fmri);
12366 char *fmri;
12368 fmri = safe_malloc(max_scf_fmri_len + 1);
12370 if (scf_instance_to_fmri(inst, fmri, max_scf_fmri_len + 1) < 0)
12374 "Use delete -f if it is not.\n"), fmri);
12376 free(fmri);
12610 lscf_delete(const char *fmri, int force)
12625 if (strcmp(buf, fmri) == 0) {
12642 if (scf_service_get_instance(cur_svc, fmri, inst) ==
12661 if (scf_scope_get_service(cur_scope, fmri, svc) ==
12678 if ((ret = scf_walk_fmri(g_hndl, 1, (char **)&fmri, SCF_WALK_SERVICE,
14175 /* select fmri */
15777 get_selection_str(char *fmri, size_t sz)
15786 lscf_get_selection_str(fmri, sz);
15799 char *fmri = NULL;
15809 fmri = safe_malloc(sz);
15811 (void) strlcpy(fmri, SCF_INSTANCE_GLOBAL, sz);
15812 } else if (get_selection_str(fmri, sz) != 0) {
15816 if (smf_notify_del_params(SCF_SVC_TRANSITION_CLASS, fmri,
15844 free(fmri);
15857 char *fmri = NULL;
15867 fmri = safe_malloc(sz);
15869 (void) strlcpy(fmri, SCF_INSTANCE_GLOBAL, sz);
15870 } else if (get_selection_str(fmri, sz) != 0) {
15874 if (_scf_get_svc_notify_params(fmri, nvl, tset, 1, 1) !=
15918 free(fmri);
16113 char *fmri = NULL;
16127 fmri = safe_malloc(sz);
16129 (void) strlcpy(fmri, SCF_INSTANCE_GLOBAL, sz);
16130 } else if (get_selection_str(fmri, sz) != 0) {
16134 if (nvlist_add_string(nvl, SCF_NOTIFY_NAME_FMRI, fmri) != 0 ||
16184 free(fmri);
16833 * of the fmri that is not used in the service
16965 assert(wip->fmri != NULL);
16990 upgrade_svc_mfst_connection(svc, wip->fmri);
17235 teardown_service(svc, wip->fmri);
17250 wip->fmri);
17264 r = check_instance_support(mpvbuf, wip->fmri,
17274 teardown_service(svc, wip->fmri);
17293 "service %s\n"), sp->str, wip->fmri);