Lines Matching defs:pg

196 		logerr("ilbd_name_to_scfpgname: invalid pg type %d for pg %s",
206 scf_propertygroup_t *pg)
208 if (pg != NULL)
209 scf_pg_destroy(pg);
256 * The created or found entry is returned as *pg.
257 * Caller frees *pg and its handle scf_pg_handle(pg)
260 ilbd_scf_retrieve_pg(const char *pgname, scf_propertygroup_t **pg,
272 *pg = scf_pg_create(h);
273 if (*pg == NULL)
276 if (scf_instance_get_pg(inst, pgname, *pg) != 0) {
279 ilbd_scf_destroy(h, svc, inst, *pg);
280 *pg = NULL;
285 * Found pg, don't want to create, return EEXIST. Note that
293 /* found pg, need to create, destroy the existing one */
295 (void) ilbd_scf_delete_pg(*pg);
300 SCF_GROUP_APPLICATION, 0, *pg) != 0) {
301 ilbd_scf_destroy(h, svc, inst, *pg);
302 *pg = NULL;
741 scf_propertygroup_t *pg = NULL;
774 logdebug("ilbd_create_pg: invalid pg type %d for pg %s",
783 ret = ilbd_scf_retrieve_pg(scfpgbuf, &pg, B_TRUE);
788 h = scf_pg_handle(pg);
808 ret = ilbd_scf_set_prop(pg, scfpgbuf,
811 ret = ilbd_scf_set_prop(pg,
821 ilbd_scf_destroy(h, NULL, NULL, pg);
829 ilbd_scf_delete_pg(scf_propertygroup_t *pg)
831 if (scf_pg_delete(pg) != 0)
841 scf_propertygroup_t *pg;
849 ret = ilbd_scf_retrieve_pg(scfname, &pg, B_FALSE);
853 ret = ilbd_scf_delete_pg(pg);
854 ilbd_scf_destroy(scf_pg_handle(pg), NULL, NULL, pg);
863 ilbd_scf_set_prop(scf_propertygroup_t *pg, const char *propname,
875 h = scf_pg_handle(pg);
879 ret = ilbd_scf_get_prop_val(pg, propname, &oldval);
896 if (scf_transaction_start(tx, pg) == -1) {
928 /* update pg here, so subsequent property setting succeeds */
929 (void) scf_pg_update(pg);
932 /* transaction failed due to not having most recent pg */
954 ilbd_scf_get_prop_val(scf_propertygroup_t *pg, const char *propname,
962 h = scf_pg_handle(pg);
969 if (scf_pg_get_property(pg, propname, prop) != 0) {
1256 ilbd_scf_load_prop(scf_propertygroup_t *pg, const char *prop_name, void *arg)
1264 h = scf_pg_handle(pg);
1268 ret = ilbd_scf_get_prop_val(pg, prop_name, &val);
1291 ilbd_scf_pg_walk_props(scf_propertygroup_t *pg,
1303 h = scf_pg_handle(pg);
1312 if (scf_iter_pg_properties(propiter, pg) != 0)
1325 ret = cb(pg, prop_name, arg);
1389 * if pg name indicates it's a ilb configuration, walk its prop
1627 scf_propertygroup_t *pg;
1638 ret = ilbd_scf_retrieve_pg(buf, &pg, B_FALSE);
1652 if ((h = scf_pg_handle(pg)) == NULL) {
1653 ilbd_scf_destroy(NULL, NULL, NULL, pg);
1659 ilbd_scf_destroy(h, NULL, NULL, pg);
1667 ret = ilbd_scf_set_prop(pg, buf, SCF_TYPE_ASTRING, val);
1669 ilbd_scf_destroy(h, NULL, NULL, pg);
1683 scf_propertygroup_t *pg;
1693 ret = ilbd_scf_retrieve_pg(buf, &pg, B_FALSE);
1705 if ((h = scf_pg_handle(pg)) == NULL) {
1708 ilbd_scf_destroy(NULL, NULL, NULL, pg);
1723 if (scf_transaction_start(tx, pg) == -1) {
1747 ilbd_scf_destroy(h, NULL, NULL, pg);