Lines Matching refs:pg
198 scf_propertygroup_t *pg = NULL; in get_start_pg() local
204 if ((pg = scf_pg_create(h)) == NULL) { in get_start_pg()
211 SCF_PG_FLAG_NONPERSISTENT, pg) == 0) { in get_start_pg()
214 return (pg); in get_start_pg()
234 scf_pg_destroy(pg); in get_start_pg()
235 pg = NULL; in get_start_pg()
239 if (scf_service_get_pg(svc, pg_name, pg) != 0) { in get_start_pg()
251 scf_pg_destroy(pg); in get_start_pg()
252 pg = NULL; in get_start_pg()
259 scf_pg_destroy(pg); in get_start_pg()
260 pg = NULL; in get_start_pg()
275 if (scf_pg_get_property(pg, SCF_LEGACY_PROPERTY_NAME, prop) == 0) { in get_start_pg()
278 scf_pg_destroy(pg); in get_start_pg()
279 pg = NULL; in get_start_pg()
282 scf_pg_destroy(pg); in get_start_pg()
283 pg = NULL; in get_start_pg()
292 return (pg); in get_start_pg()
300 scf_propertygroup_t *pg = NULL; in pg_match() local
304 if ((pg = scf_pg_create(h)) == NULL) { in pg_match()
330 while (scf_iter_next_pg(iter, pg) > 0) { in pg_match()
336 if (scf_pg_get_property(pg, SCF_LEGACY_PROPERTY_SUFFIX, in pg_match()
357 if (scf_pg_get_property(pg, SCF_LEGACY_PROPERTY_INODE, in pg_match()
375 scf_pg_destroy(pg); in pg_match()
376 pg = NULL; in pg_match()
382 return (pg); in pg_match()
397 scf_propertygroup_t *pg; in get_stop_pg() local
406 pg = pg_match(h, svc, st.st_ino, NULL); in get_stop_pg()
407 if (pg != NULL) in get_stop_pg()
412 if ((pg = pg_match(h, svc, st.st_ino, suffix)) != NULL) in get_stop_pg()
415 if ((pg = pg_match(h, svc, st.st_ino, NULL)) != NULL) in get_stop_pg()
418 if ((pg = pg_match(h, svc, 0, suffix)) == NULL) { in get_stop_pg()
428 return (pg); in get_stop_pg()
437 scf_propertygroup_t *pg = NULL; in get_script_pg() local
486 pg = get_start_pg(script, h, svc, ok); in get_script_pg()
488 pg = get_stop_pg(script, h, svc, ok); in get_script_pg()
493 return (pg); in get_script_pg()
559 cleanup_pg(scf_propertygroup_t *pg) in cleanup_pg() argument
564 if (scf_pg_delete(pg) == 0) in cleanup_pg()
569 if (scf_pg_to_fmri(pg, buf, sizeof (buf)) != 0) in cleanup_pg()
703 set_legacy_service(scf_propertygroup_t *pg, const char *script, ino_t inode) in set_legacy_service() argument
714 h = scf_pg_handle(pg); in set_legacy_service()
734 if (scf_transaction_start(tx, pg) != 0) { in set_legacy_service()
776 if (scf_pg_update(pg) == -1) { in set_legacy_service()
812 scf_propertygroup_t *pg; in main() local
854 pg = get_script_pg(script, start_flag, &pg_ok); in main()
866 if (start_flag && pg != NULL) in main()
867 cleanup_pg(pg); in main()
876 if (start_flag && pg != NULL) in main()
877 cleanup_pg(pg); in main()
900 if (start_flag && pg != NULL) in main()
901 cleanup_pg(pg); in main()
956 if (pg != NULL) in main()
957 cleanup_pg(pg); in main()
976 if (pg != NULL) { in main()
978 set_legacy_service(pg, script, st.st_ino); in main()
980 cleanup_pg(pg); in main()
981 scf_pg_destroy(pg); in main()