Lines Matching defs:pg

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