Lines Matching refs:pg
186 pgroup_t *pg = v; in internal_pgroup_dump() local
188 (void) printf("pgroup name = %s\n", pg->sc_pgroup_name); in internal_pgroup_dump()
189 (void) printf(" type = %s\n", pg->sc_pgroup_type); in internal_pgroup_dump()
191 (void) uu_list_walk(pg->sc_pgroup_props, internal_property_dump, in internal_pgroup_dump()
325 pgroup_t *pg; in internal_service_free() local
334 while ((pg = uu_list_teardown(s->sc_pgroups, &cookie)) != NULL) in internal_service_free()
335 internal_pgroup_free(pg); in internal_service_free()
338 while ((pg = uu_list_teardown(s->sc_dependents, &cookie)) != NULL) in internal_service_free()
339 internal_pgroup_free(pg); in internal_service_free()
370 pgroup_t *pg; in internal_instance_free() local
377 while ((pg = uu_list_teardown(i->sc_pgroups, &cookie)) != NULL) in internal_instance_free()
378 internal_pgroup_free(pg); in internal_instance_free()
381 while ((pg = uu_list_teardown(i->sc_dependents, &cookie)) != NULL) in internal_instance_free()
382 internal_pgroup_free(pg); in internal_instance_free()
410 internal_pgroup_free(pgroup_t *pg) in internal_pgroup_free() argument
419 assert(pg->sc_pgroup_composed == NULL); in internal_pgroup_free()
421 while ((prop = uu_list_teardown(pg->sc_pgroup_props, &cookie)) != NULL) in internal_pgroup_free()
424 uu_free(pg); in internal_pgroup_free()
430 pgroup_t *pg; in find_pgroup() local
432 for (pg = uu_list_first(list); in find_pgroup()
433 pg != NULL; in find_pgroup()
434 pg = uu_list_next(list, pg)) { in find_pgroup()
435 if (strcmp(pg->sc_pgroup_name, name) != 0) in find_pgroup()
439 return (pg); in find_pgroup()
441 if (strcmp(pg->sc_pgroup_type, type) == 0) in find_pgroup()
442 return (pg); in find_pgroup()
464 pgroup_t *pg; in internal_pgroup_create_common() local
466 pg = internal_pgroup_find(e, name, type); in internal_pgroup_create_common()
467 if (pg != NULL) { in internal_pgroup_create_common()
471 return (pg); in internal_pgroup_create_common()
475 pg = internal_pgroup_new(); in internal_pgroup_create_common()
476 (void) internal_attach_pgroup(e, pg); in internal_pgroup_create_common()
477 pg->sc_pgroup_name = strdup(name); in internal_pgroup_create_common()
478 pg->sc_pgroup_flags = 0; in internal_pgroup_create_common()
480 pg->sc_pgroup_type = strdup(type); in internal_pgroup_create_common()
483 pg->sc_pgroup_type = NULL; in internal_pgroup_create_common()
486 if (pg->sc_pgroup_name == NULL || in internal_pgroup_create_common()
487 (e->sc_op != SVCCFG_OP_APPLY && pg->sc_pgroup_type == NULL)) in internal_pgroup_create_common()
490 return (pg); in internal_pgroup_create_common()
546 internal_property_find(pgroup_t *pg, const char *name) in internal_property_find() argument
550 for (p = uu_list_first(pg->sc_pgroup_props); in internal_property_find()
552 p = uu_list_next(pg->sc_pgroup_props, p)) in internal_property_find()
696 internal_attach_dependent(entity_t *ent, pgroup_t *pg) in internal_attach_dependent() argument
698 if (uu_list_find(ent->sc_dependents, pg, NULL, NULL) != NULL) { in internal_attach_dependent()
700 "entity %s.\n"), pg->sc_pgroup_name, ent->sc_name); in internal_attach_dependent()
704 (void) uu_list_append(ent->sc_dependents, pg); in internal_attach_dependent()
706 pg->sc_parent = ent; in internal_attach_dependent()
978 load_pg_attrs(const scf_propertygroup_t *pg, pgroup_t **ipgp) in load_pg_attrs() argument
984 if (scf_pg_get_flags(pg, &ipg->sc_pgroup_flags) != 0) { in load_pg_attrs()
1001 if (scf_pg_get_name(pg, loadbuf, loadbuf_sz) < 0) { in load_pg_attrs()
1024 if (scf_pg_get_type(pg, loadbuf, loadbuf_sz) < 0) { in load_pg_attrs()
1064 load_pg(const scf_propertygroup_t *pg, pgroup_t **ipgp, const char *fmri, in load_pg() argument
1070 if (scf_iter_pg_properties(load_propiter, pg) != 0) { in load_pg()
1086 r = load_pg_attrs(pg, &ipg); in load_pg()