Lines Matching defs:pg

239  * Returns 0, ECANCELED if pg is deleted, ENOENT if propname doesn't exist,
244 get_bool_prop(scf_propertygroup_t *pg, const char *propname, uint8_t *bp)
254 if (scf_pg_get_property(pg, propname, prop) != 0) {
318 set_bool_prop(scf_propertygroup_t *pg, const char *propname, boolean_t b)
333 if (scf_transaction_start(tx, pg) == -1) {
382 if (scf_pg_update(pg) == -1)
394 * Gets the single astring value of the propname property of pg. prop & v are
396 * -ENOENT - pg has no property named propname
401 get_astring_prop(const scf_propertygroup_t *pg, const char *propname,
406 if (scf_pg_get_property(pg, propname, prop) != 0) {
440 const char *pgtype, uint32_t pgflags, scf_propertygroup_t *pg)
443 if (scf_instance_get_pg(inst, pgname, pg) == 0)
449 if (scf_instance_add_pg(inst, pgname, pgtype, pgflags, pg) == 0)
495 * Set auxiliary_tty and auxiliary_fmri properties in restarter_actions pg to
505 scf_propertygroup_t *pg = NULL;
508 if ((pg = scf_pg_create(h)) == NULL)
513 pg) == EPERM) {
529 switch (set_bool_prop(pg, SCF_PROPERTY_AUX_TTY, b) != 0) {
573 scf_pg_destroy(pg);
587 scf_propertygroup_t *pg;
592 pg = scf_pg_create(h);
593 if (pg == NULL)
606 SCF_PG_GENERAL_FLAGS, pg) != 0)
609 if (get_bool_prop(pg, SCF_PROPERTY_ENABLED, &b) != 0) {
611 switch (set_bool_prop(pg, SCF_PROPERTY_ENABLED, B_FALSE) != 0) {
639 SCF_PG_GENERAL_OVR_FLAGS, pg) != 0)
642 switch (set_bool_prop(pg, SCF_PROPERTY_ENABLED, enable) != 0) {
672 * Both pg and property should exist since we created
678 SCF_PG_GENERAL_FLAGS, pg) != 0)
681 switch (set_bool_prop(pg, SCF_PROPERTY_ENABLED, enable)) {
693 switch (get_bool_prop(pg, SCF_PROPERTY_ENABLED, &b)) {
761 scf_pg_destroy(pg);
772 scf_pg_destroy(pg);
923 const scf_propertygroup_t *pg, const char *propname, scf_property_t *prop,
928 sz = get_astring_prop(pg, propname, prop, v, buf, bufsz);
1028 scf_propertygroup_t *pg;
1081 (pg = scf_pg_create(h)) == NULL ||
1109 if (scf_instance_get_pg_composed(inst, snap, SCF_PG_GENERAL, pg) != 0) {
1119 sz = get_astring_prop(pg, SCF_PROPERTY_RESTARTER, prop, v, buf,
1179 while (scf_iter_next_pg(pg_iter, pg) > 0) {
1180 len = scf_pg_get_name(pg, pgname, name_sz);
1185 if (dep_get_astring(fmri, pgname, pg, SCF_PROPERTY_TYPE, prop,
1192 if (dep_get_astring(fmri, pgname, pg, SCF_PROPERTY_GROUPING,
1207 if (scf_pg_get_property(pg, SCF_PROPERTY_ENTITIES, prop) ==
1315 scf_pg_destroy(pg);
1332 scf_propertygroup_t *pg;
1341 if ((pg = scf_pg_create(h)) == NULL ||
1353 if (scf_instance_get_pg(inst, scf_pg_restarter_actions, pg) == -1) {
1360 SCF_PG_RESTARTER_ACTIONS_FLAGS, pg) == -1) {
1391 if (scf_transaction_start(tx, pg) == -1) {
1403 if (scf_pg_get_property(pg, action, prop) == -1) {
1457 if (scf_pg_update(pg) == -1)
1470 scf_pg_destroy(pg);
1490 scf_propertygroup_t *pg;
1496 if ((pg = scf_pg_create(h)) == NULL ||
1501 if (scf_instance_get_pg(inst, SCF_PG_RESTARTER, pg) != SCF_SUCCESS) {
1511 szret = get_astring_prop(pg, SCF_PROPERTY_STATE, prop, val, state,
1550 *pgp = pg;
1556 scf_pg_destroy(pg);
1565 scf_propertygroup_t *pg;
1579 if ((pg = scf_pg_create(h)) == NULL ||
1586 if (scf_instance_get_pg(inst, pgname, pg) != SCF_SUCCESS) {
1590 if (scf_instance_add_pg(inst, pgname, pgtype, pgflags, pg) !=
1594 if (scf_instance_get_pg(inst, pgname, pg) !=
1620 if (scf_transaction_start(tx, pg) != SCF_SUCCESS) {
1663 if (scf_pg_update(pg) == -1)
1673 scf_pg_destroy(pg);
1691 assert(wip->pg == NULL);
1741 scf_propertygroup_t *pg = NULL;
1745 assert(wip->pg == NULL);
1748 if (pg)
1749 scf_pg_destroy(pg);
1750 if (inst_get_state(wip->inst, state, wip->fmri, &pg) != 0) {
1798 } while (_scf_pg_wait(pg, WAIT_INTERVAL) >= 0);
1803 scf_pg_destroy(pg);
1811 scf_propertygroup_t *pg = NULL;
1815 assert(wip->pg == NULL);
1818 if (pg)
1819 scf_pg_destroy(pg);
1820 if (inst_get_state(wip->inst, state, wip->fmri, &pg) != 0) {
1857 } while (_scf_pg_wait(pg, WAIT_INTERVAL) >= 0);
1862 scf_pg_destroy(pg);
1873 assert(wip->pg == NULL);
1899 assert(wip->inst != NULL && wip->pg == NULL);
1981 scf_propertygroup_t *pg;
1992 (pg = scf_pg_create(h)) == NULL)
2045 scf_pg_destroy(pg);