Lines Matching refs:fmri

303 	{SCF_TYPE_FMRI,		REP_PROTOCOL_SUBTYPE_FMRI,	"fmri"},
5151 * scf_parse_fmri(), fmri isn't const because that would require
5153 * in the passed in fmri.
5157 scf_parse_svc_fmri(char *fmri, const char **scope, const char **service,
5174 s = fmri;
5293 scf_parse_file_fmri(char *fmri, const char **scope, const char **path)
5300 s = fmri;
5346 assert(s > fmri);
5355 scf_parse_fmri(char *fmri, int *type, const char **scope, const char **service,
5358 if (strncmp(fmri, SCF_FMRI_SVC_PREFIX,
5362 return (scf_parse_svc_fmri(fmri, scope, service, instance,
5364 } else if (strncmp(fmri, SCF_FMRI_FILE_PREFIX,
5368 return (scf_parse_file_fmri(fmri, scope, NULL));
5371 * Parse as a svc if the fmri type is not explicitly
5376 return (scf_parse_svc_fmri(fmri, scope, service, instance,
5382 * Fails with _INVALID_ARGUMENT. fmri and buf may be equal.
5385 scf_canonify_fmri(const char *fmri, char *buf, size_t bufsz)
5392 if (strlcpy(local, fmri, sizeof (local)) >= sizeof (local)) {
5438 scf_handle_decode_fmri(scf_handle_t *h, const char *fmri, scf_scope_t *sc,
5459 if (strlcpy(local, fmri, sizeof (local)) >= sizeof (local)) {
6080 scf_get_key(scf_matchkey_t **htable, const char *fmri, const char *legacy)
6086 k = strstr(fmri, ":/");
6107 if (strcmp(key->sk_fmri, fmri) == 0)
6117 if ((key->sk_fmri = strdup(fmri)) == NULL) {
6142 scf_add_match(scf_matchkey_t **htable, const char *fmri, const char *legacy,
6162 if (strncmp(match->sm_key->sk_fmri, fmri, len) == 0 &&
6163 fmri[len] == ':') {
6181 if (strncmp(match->sm_key->sk_fmri, fmri, len) == 0 &&
6182 fmri[len] == ':')
6190 if ((match->sm_key = scf_get_key(htable, fmri, legacy)) == NULL) {
6203 * Returns 1 if the fmri matches the given pattern, 0 otherwise.
6206 scf_cmp_pattern(char *fmri, scf_pattern_t *pattern)
6211 if (fnmatch(pattern->sp_arg, fmri, 0) == 0)
6214 (tmp = strstr(fmri, pattern->sp_arg)) != NULL) {
6220 if (tmp != fmri && tmp[-1] != '/' && tmp[-1] != ':' &&
6224 if (tmp != fmri + strlen(fmri) && tmp[0] != ':' &&
6232 if (tmp <= fmri + 4)
6246 scf_pattern_match(scf_matchkey_t **htable, char *fmri, const char *legacy,
6253 if (scf_cmp_pattern(fmri, &pattern[i]) &&
6254 (ret = scf_add_match(htable, fmri,
6275 char *fmri = NULL;
6310 if ((fmri = malloc(max_fmri_length + 1)) == NULL ||
6343 * For each fmri given, we first check to see if it's a full service,
6346 * not match a full fmri is identified as a globbed pattern or a partial
6347 * fmri and stored in a private array when walking instances.
6360 (void) strcpy(fmri, argv[i]);
6361 if (scf_parse_svc_fmri(fmri, &scope_name, &svc_name, &inst_name,
6381 if (scf_canonify_fmri(argv[i], fmri, max_fmri_length)
6389 if ((ret = scf_add_match(htable, fmri, NULL,
6418 if (scf_canonify_fmri(argv[i], fmri, max_fmri_length)
6422 if ((ret = scf_add_match(htable, fmri, NULL,
6445 if (scf_service_to_fmri(svc, fmri,
6451 if ((ret = scf_add_match(htable, fmri, NULL,
6485 if (scf_instance_to_fmri(inst, fmri,
6489 if ((ret = scf_add_match(htable, fmri, NULL,
6516 * complete fmri, so mark it as a partial or globbed FMRI for
6577 if (scf_service_to_fmri(svc, fmri,
6584 info.fmri = fmri;
6594 fmri, NULL, argc, pattern,
6626 if (scf_instance_to_fmri(inst, fmri,
6637 info.fmri = fmri;
6646 fmri, NULL, argc, pattern,
6673 (void) strcpy(fmri, LEGACY_SCHEME);
6708 fmri + sizeof (LEGACY_SCHEME) - 1,
6722 info.fmri = fmri;
6731 fmri, pgname, argc, pattern,
6829 * more than one fmri, then this is an error if we matched
6830 * because of a partial fmri parameter, unless we also matched
6831 * more than one fmri because of wildcards in the parameters.
6833 * to match more than one fmri in this case.
6835 * one fmri is an error, but parameters of 'foo *bar*' that
6892 info.fmri = key->sk_fmri;
6906 info.fmri = key->sk_fmri;
6984 free(fmri);