Lines Matching defs:pg

188  * Get the pg from the running snapshot of the instance (composed or not)
192 scf_propertygroup_t *pg, int composed)
214 if (scf_instance_get_pg_composed(i, snap, n, pg) != 0)
218 scf_snaplevel_get_pg(slvl, n, pg) != 0)
222 if (scf_service_get_pg(s, n, pg) != 0)
235 * Add a pg if it does not exist, or get it if it exists.
242 uint32_t flags, scf_propertygroup_t *pg)
247 r = scf_instance_add_pg(i, n, t, flags, pg);
249 r = scf_service_add_pg(s, n, t, flags, pg);
257 r = scf_instance_get_pg(i, n, pg);
259 r = scf_service_get_pg(s, n, pg);
284 scf_propertygroup_t *pg)
286 if ((s == NULL ? scf_instance_get_pg(i, n, pg) :
287 scf_service_get_pg(s, n, pg)) != SCF_SUCCESS)
293 if (scf_pg_delete(pg) != SCF_SUCCESS)
675 notify_set_params(scf_propertygroup_t *pg, nvlist_t *params)
677 scf_handle_t *h = scf_pg_handle(pg);
704 * make sure we have the most recent version of the pg
707 if (scf_pg_update(pg) == SCF_FAILED ||
708 scf_transaction_start(tx, pg) != SCF_SUCCESS) {
1272 scf_propertygroup_t *pg = scf_pg_create(h);
1288 if (i == NULL || s == NULL || pg == NULL)
1333 SCF_NOTIFY_PARAMS_PG_TYPE, 0, pg) != 0 &&
1337 if (notify_set_params(pg, params) != 0)
1354 if (get_or_add_pg(s, i, pgname, SCF_GROUP_APPLICATION, 0, pg) !=
1360 if (notify_set_params(pg, params) != 0) {
1372 scf_pg_destroy(pg);
1394 _scf_notify_get_params(scf_propertygroup_t *pg, nvlist_t *params)
1396 scf_handle_t *h = scf_pg_handle(pg);
1420 if (scf_iter_pg_properties(it, pg) != SCF_SUCCESS) {
1488 * Look up pg containing an SMF state transition parameters. If it cannot find
1489 * the pg in the composed view of the instance, it will look in the global
1509 const char *pgname, scf_propertygroup_t *pg)
1511 if (get_pg(s, i, pgname, pg, 1) == 0 ||
1513 get_pg(NULL, g, pgname, pg, 0) == 0)
1520 * Populates nvlist_t params with the source fmri for the pg
1528 get_pg_source(scf_propertygroup_t *pg, nvlist_t *params)
1540 if (scf_pg_to_fmri(pg, fmri, sz) == -1) {
1546 /* get rid of the properties part of the pg source */
1584 scf_propertygroup_t *pg = scf_pg_create(h);
1600 if (s == NULL || i == NULL || g == NULL || pg == NULL)
1638 if ((getglobal ? get_stn_pg(s, i, g, pgname, pg) :
1639 get_pg(s, i, pgname, pg, 1)) == SCF_SUCCESS) {
1641 if (_scf_notify_get_params(pg, params[c]) !=
1644 if (getsource && get_pg_source(pg, params[c]) !=
1674 scf_pg_destroy(pg);
1707 scf_propertygroup_t *pg = scf_pg_create(h);
1719 if (i == NULL || pg == NULL)
1732 while (get_pg(NULL, i, pgname, pg, 0) != 0) {
1757 if (_scf_notify_get_params(pg, params) != SCF_SUCCESS)
1760 if (getsource && get_pg_source(pg, params) != SCF_SUCCESS)
1774 scf_pg_destroy(pg);
1883 scf_propertygroup_t *pg = scf_pg_create(h);
1900 if (s == NULL || i == NULL || pg == NULL)
1925 if (del_pg(s, i, st_pgnames[j].st_pgname, pg) !=
1954 if (del_pg(NULL, i, pgname, pg) != SCF_SUCCESS &&
1971 scf_pg_destroy(pg);