Lines Matching refs:fmri

1073  *   Returns 0, EEXIST, or EINVAL if the arguments are invalid (i.e., fmri
1077 graph_insert_vertex_unconfigured(const char *fmri, gv_type_t type,
1088 if (strncmp(fmri, "svc:", sizeof ("svc:") - 1) != 0)
1093 if (strncmp(fmri, "file:", sizeof ("file:") - 1) != 0)
1109 *vp = vertex_get_by_name(fmri);
1113 *vp = graph_add_vertex(fmri);
1123 if (strcmp(fmri, special_vertices[i].name) == 0) {
1140 sfmri = inst_fmri_to_svc_fmri(fmri);
2161 * The fmri doesn't specify an instance - translate
2177 * Add all of the instances of the service named by fmri to the graph.
2180 * ENOENT - service indicated by fmri does not exist
2186 add_service(const char *fmri, scf_handle_t *h, boolean_t *reboundp)
2202 if (scf_handle_decode_fmri(h, fmri, NULL, svc, NULL, NULL, NULL,
2325 * Find or create a vertex for fmri and make info->v depend on it.
2331 * EINVAL - fmri is invalid
2332 * fmri does not match info->type
2339 process_dependency_fmri(const char *fmri, struct depfmri_info *info)
2354 if (strncmp(fmri, "file:", sizeof ("file:") - 1) == 0) {
2358 "dependency's type of instance %s.\n", fmri,
2363 err = graph_insert_vertex_unconfigured(fmri, info->type, 0,
2381 "dependency's type of instance %s.\n", fmri,
2387 * We must canonify fmri & add a vertex for it.
2389 fmri_copy_sz = strlen(fmri) + 1;
2391 (void) strcpy(fmri_copy, fmri);
2400 fmri);
2538 char *fmri, *pg_name;
2591 fmri = startd_alloc(fmri_sz);
2593 (void) snprintf(fmri, fmri_sz, "%s>%s", info->v->gv_name,
2602 startd_free(fmri, fmri_sz);
2612 startd_free(fmri, fmri_sz);
2623 startd_free(fmri, fmri_sz);
2627 startd_free(fmri, fmri_sz);
2636 startd_free(fmri, fmri_sz);
2643 err = graph_insert_vertex_unconfigured(fmri, GVT_GROUP, deptype,
2646 startd_free(fmri, fmri_sz);
2741 handle_cycle(const char *fmri, int *path)
2752 "details):\n%s", fmri ? fmri : "?", cp);
3018 char *fmri;
3057 r = libscf_instance_get_fmri(inst, &fmri);
3077 fmri ? fmri : "?");
3081 handle_cycle(fmri, path);
3085 startd_free(fmri, max_scf_fmri_size);
3169 * If the instance fmri is in the deathrow list then set the
3172 * repository for this instance fmri.
3180 * non-persistent repository for this instance fmri.
4175 char *fmri;
4204 err = libscf_instance_get_fmri(inst, &fmri);
4222 "Graph engine: Reloading general properties for %s.\n", fmri);
4226 v = vertex_get_by_name(fmri);
4230 err = dgraph_add_instance(fmri, inst, B_TRUE);
4231 startd_free(fmri, max_scf_fmri_size);
4243 startd_free(fmri, max_scf_fmri_size);
4280 startd_free(fmri, max_scf_fmri_size);
4754 nvlist_add_string(attr, "fmri", v->gv_name) != 0 ||
4977 * If a vertex for fmri exists and it is enabled, send _DISABLE to the
4985 dgraph_remove_instance(const char *fmri, scf_handle_t *h)
4992 log_framework(LOG_DEBUG, "Graph engine: Removing %s.\n", fmri);
4996 v = vertex_get_by_name(fmri);
5513 * Bring down all services which are not dependencies of fmri. The
5514 * dependencies of fmri (direct & indirect) will constitute the "subgraph",
5536 * services which are dependencies of fmri.
5546 * EINVAL - fmri is invalid (error is logged)
5547 * EALREADY - the milestone is already set to fmri
5548 * ENOENT - a configured vertex does not exist for fmri (an error is logged)
5551 dgraph_set_milestone(const char *fmri, scf_handle_t *h, boolean_t norepository)
5559 /* Validate fmri */
5560 isall = (strcmp(fmri, "all") == 0);
5561 isnone = (strcmp(fmri, "none") == 0);
5564 if (fmri_canonify(fmri, (char **)&cfmri, B_FALSE) == EINVAL)
5574 fmri);
5617 log_framework(LOG_DEBUG, "Changing milestone to %s.\n", fmri);
5857 char *fmri, *cfmri;
5862 fmri = startd_alloc(max_scf_fmri_size);
5880 sz = strlcpy(fmri, st->st_subgraph,
5884 fmri[0] = '\0';
5900 sz = strlcpy(fmri, st->st_subgraph, max_scf_fmri_size);
5923 sz = strlcpy(fmri, st->st_subgraph,
5932 r = libscf_clear_runlevel(pg, fmri);
5950 sz = strlcpy(fmri, st->st_subgraph,
5967 r = libscf_get_milestone(inst, prop, val, fmri,
5984 fmri[0] = '\0';
5996 if (fmri[0] == '\0' || strcmp(fmri, "all") == 0)
5999 if (strcmp(fmri, "none") != 0) {
6001 if (scf_handle_decode_fmri(h, fmri, NULL, NULL, inst, NULL,
6007 "Reverting to \"all\".\n", fmri);
6013 "Reverting to \"all\".\n", fmri);
6023 "\"all\".\n", fmri);
6033 r = fmri_canonify(fmri, &cfmri, B_FALSE);
6048 "Reverting to \"all\".\n", fmri);
6055 fmri);
6064 log_console(LOG_INFO, "Booting to milestone \"%s\".\n", fmri);
6066 r = dgraph_set_milestone(fmri, h, B_FALSE);
6080 startd_free(fmri, max_scf_fmri_size);
6090 char *fmri;
6119 fmri = startd_alloc(max_scf_fmri_size);
6121 r = libscf_get_milestone(inst, prop, val, fmri, max_scf_fmri_size);
6139 r = dgraph_set_milestone(fmri, h, B_TRUE);
6153 startd_free(fmri, max_scf_fmri_size);
6483 char *fmri;
6548 * instance, so get the fmri and compare. Plus, once we know it's
6570 switch (r = libscf_instance_get_fmri(inst, &fmri)) {
6584 if (strcmp(fmri, SCF_SERVICE_STARTD) != 0) {
6585 startd_free(fmri, max_scf_fmri_size);
6704 r = libscf_get_milestone(inst, prop, val, fmri, max_scf_fmri_size);
6722 (void) strcpy(fmri, "all");
6729 r = dgraph_set_milestone(fmri, h, B_FALSE);
6737 log_error(LOG_WARNING, "Milestone %s is invalid.\n", fmri);
6741 log_error(LOG_WARNING, "Milestone %s does not exist.\n", fmri);
6749 startd_free(fmri, max_scf_fmri_size);
6757 * process_delete() deletes an instance from the dgraph if 'fmri' is an
6758 * instance fmri or if 'fmri' matches the 'general' property group of an
6761 * 'fmri' may be overwritten and cannot be trusted on return by the caller.
6764 process_delete(char *fmri, scf_handle_t *h)
6771 lfmri = safe_strdup(fmri);
6778 fmri);
6780 (void) dgraph_remove_instance(fmri, h);
6804 end_inst_fmri = strstr(fmri, SCF_FMRI_PROPERTYGRP_PREFIX);
6810 (void) dgraph_remove_instance(fmri, h);
6823 char *fmri = startd_alloc(max_scf_fmri_size);
6852 /* Note: fmri is only set on delete events. */
6853 res = _scf_notify_wait(pg, fmri, max_scf_fmri_size);
6901 * Don't trust fmri on return.
6903 process_delete(fmri, h);