Lines Matching defs:pg

246 /* how long in ns we should wait between checks for a pg */
449 scf_propertygroup_t *pg)
452 return (scf_service_get_pg(ent, name, pg));
454 return (scf_instance_get_pg(ent, name, pg));
467 get_pg(const char *pg_name, scf_propertygroup_t *pg)
472 ret = scf_snaplevel_get_pg(cur_level, pg_name, pg);
474 ret = scf_instance_get_pg(cur_inst, pg_name, pg);
476 ret = scf_service_get_pg(cur_svc, pg_name, pg);
558 * a running snapshot, and that snapshot has an instance snaplevel, set pg to
560 * snapshot, set pg to the instance's current property group named name.
564 * pg to the property group named name in it. If no such snaplevel could be
565 * found, set pg to the service's current property group named name.
579 scf_propertygroup_t *pg, scf_iter_t *iter, scf_instance_t *inst,
604 if (scf_service_get_pg(ent, name, pg) == 0)
678 if (scf_instance_get_pg(ent, name, pg) == 0)
713 if (scf_snaplevel_get_pg(snpl, name, pg) == 0)
1116 pg_get_prop(scf_propertygroup_t *pg, const char *propname, scf_property_t *prop)
1118 if (scf_pg_get_property(pg, propname, prop) == SCF_SUCCESS)
1128 len = scf_pg_to_fmri(pg, NULL, 0);
1134 if (scf_pg_to_fmri(pg, fmri, len + 1) < 0)
1851 pgroup_t *pg = NULL;
1883 pg = lcb->sc_parent;
1884 issvc = (pg->sc_parent->sc_etype == SVCCFG_SERVICE_OBJECT);
1885 fmri = pg->sc_parent->sc_fmri;
1909 if (get_pg(pg->sc_pgroup_name, sc_pg) != SCF_SUCCESS) {
1928 pg->sc_pgroup_name, NULL, t_pg,
1936 entity_t *e = pg->sc_parent->sc_parent;
2034 entity_t *e = pg->sc_parent->sc_parent;
2042 * the pg was not used and can be used here.
2044 if ((pg = internal_pgroup_new()) == NULL) {
2051 pg->sc_pgroup_name = safe_malloc(max_scf_name_len + 1);
2052 if (scf_pg_get_name(sc_pg, (char *)pg->sc_pgroup_name,
2085 * If this is true then the pg was allocated
2087 * the name and the pg.
2089 if (pg != NULL && pg != lcb->sc_parent) {
2090 free((char *)pg->sc_pgroup_name);
2091 internal_pgroup_free(pg);
2132 pgroup_t *pg = p;
2145 if (pg->sc_pgroup_type != NULL) {
2179 if (get_pg(pg->sc_pgroup_name, sc_pg) == SCF_SUCCESS) {
2183 pg->sc_pgroup_type = pg_type;
2195 if (scf_tmpl_get_by_pg_name(fmri, NULL, pg->sc_pgroup_name,
2198 pg->sc_pgroup_type = pg_type;
2236 cb.sc_parent = pg;
2240 if (uu_list_walk(pg->sc_pgroup_props, find_current_prop_type,
2249 "\"%s\" from \"%s\"\n"), pg->sc_pgroup_name, fmri);
2894 * Add transaction entries to tx which will upgrade cur's pg according to old
3101 * Upgrade pg according to old & new.
3108 * ECANCELED - pg was deleted
3109 * EPERM - couldn't modify pg (permission denied)
3110 * EROFS - couldn't modify pg (backend read-only)
3111 * EACCES - couldn't modify pg (backend access denied)
3113 * EBUSY - pg changed unexpectedly
3116 upgrade_pg(scf_propertygroup_t *pg, pgroup_t *cur, pgroup_t *old,
3121 if (scf_transaction_start(imp_tx, pg) != 0) {
3235 * dependents pg, and add an entry to create a new property for this
3250 * - couldn't create dependency pg (permission denied) (error printed)
3251 * - couldn't modify dependency pg (permission denied) (error printed)
3253 * - couldn't create dependency pg (repository read-only)
3255 * - couldn't create dependency pg (backend access denied)
3256 * ECANCELED - sc_trans's pg was deleted
3257 * EALREADY - property for dependent already exists in sc_trans's pg
3258 * EEXIST - dependency pg already exists in target (error printed)
3455 * EPERM - could not modify dependents pg (permission denied) (error printed)
3458 * EROFS - could not modify dependents pg (repository read-only)
3461 * EACCES - could not modify dependents pg (backend access denied)
3464 * EBUSY - "dependents" pg of ent added, changed, or deleted (error printed)
3466 * - dependent pg changed (error printed)
3469 * - snpl has corrupt pg (error printed)
3470 * - dependency pg in target is corrupt (error printed)
3472 * EEXIST - dependency pg already existed in target service (error printed)
3898 upgrade_manifestfiles(pgroup_t *pg, const entity_t *ient,
3921 * path, and the fact that the manifests pg is a service
3961 if (entity_pgroup_import(pg, &cbdata) != UU_WALK_NEXT)
4062 * - snpl has corrupt pg (error printed)
4063 * - dependency pg in target is corrupt (error printed)
4065 * EPERM - couldn't delete dependency pg (permission denied) (error printed)
4067 * - couldn't modify dependent pg (permission denied) (error printed)
4068 * EROFS - couldn't delete dependency pg (repository read-only)
4070 * EACCES - couldn't delete dependency pg (backend access denied)
4073 * - tx's pg was deleted (error printed)
4074 * - dependent pg was changed or deleted (error printed)
4075 * EEXIST - dependency pg already exists in new target (error printed)
4675 * Fetch the current dependency pg. If it's what the manifest
5005 /* delete old pg */
5369 * EPERM - could not delete pg (permission denied) (error printed)
5371 * - couldn't import pg (permission denied) (error printed)
5372 * - couldn't upgrade pg (permission denied) (error printed)
5373 * EROFS - could not delete pg (repository read-only)
5375 * - couldn't import pg (repository read-only)
5376 * - couldn't upgrade pg (repository read-only)
5377 * EACCES - could not delete pg (backend access denied)
5379 * - couldn't import pg (backend access denied)
5380 * - couldn't upgrade pg (backend access denied)
5385 * - "dependents" pg was added, changed, or deleted (error printed)
5387 * - dependent pg changed (error printed)
5389 * - ent has bad pg (error printed)
5446 /* lookup pg in new properties */
5610 /* The manifest pg has not changed. Move on. */
5879 * - ent has corrupt pg (error printed)
5880 * - dependent has corrupt pg (error printed)
5882 * EBUSY - pg was added, changed, or deleted (error printed)
5884 * - dependent pg changed (error printed)
5891 * - couldn't delete, upgrade, or import pg or dependent (error printed)
5893 * - couldn't delete, upgrade, or import pg or dependent
5895 * - couldn't delete, upgrade, or import pg or dependent
5902 pgroup_t *pg, *rpg;
5977 for (pg = uu_list_first(pgs); pg != NULL; pg = uu_list_next(pgs, pg)) {
5978 if (pg->sc_pgroup_seen)
5981 /* pg is new */
5983 if (strcmp(pg->sc_pgroup_name, "dependents") == 0) {
6010 if (strcmp(pg->sc_pgroup_name, SCF_PG_MANIFESTFILES) == 0) {
6011 r = upgrade_manifestfiles(pg, ient, running, ent);
6037 r = scf_snaplevel_get_pg(running, pg->sc_pgroup_name,
6040 r = entity_get_pg(ent, issvc, pg->sc_pgroup_name,
6061 pg->sc_pgroup_name);
6071 /* User doesn't have pg, so import it. */
6080 r = entity_pgroup_import(pg, &cbdata);
6089 pg->sc_pgroup_name);
6099 /* report differences between pg & current */
6107 pg->sc_pgroup_name);
6119 report_pg_diffs(pg, rpg, ient->sc_fmri, 1);
6166 * - dependent has corrupt pg (error printed)
6985 * - couldn't create, modify, or delete pg (error printed)
6993 * - couldn't create, modify, or delete pg or dependent
7000 * - couldn't create, modify, or delete pg or dependent
7009 * - couldn't import dependent (dependency pg already exists) (printed)
7020 * - pg was added, changed, or deleted (error printed)
7021 * - dependent pg changed (error printed)
7572 * pg if it exists. If the last-import snapshot
9165 export_pg(scf_propertygroup_t *pg, struct entity_elts *eelts, int flags)
9175 if (scf_pg_get_name(pg, exp_str, max_scf_name_len + 1) < 0)
9180 if (scf_pg_get_type(pg, exp_str, exp_str_sz) < 0)
9185 if (scf_iter_pg_properties(exp_prop_iter, pg) != SCF_SUCCESS)
9195 if (_scf_pg_is_read_protected(pg, &read_protected) != SCF_SUCCESS)
9242 export_dependency(scf_propertygroup_t *pg, struct entity_elts *eelts)
9256 if (scf_pg_get_property(pg, scf_property_external, exp_prop) == 0) {
9273 if (scf_pg_get_name(pg, exp_str, max_scf_name_len + 1) < 0)
9278 if (pg_get_prop(pg, SCF_PROPERTY_GROUPING, exp_prop) != 0 ||
9283 if (pg_get_prop(pg, SCF_PROPERTY_RESTART_ON, exp_prop) != 0 ||
9288 if (pg_get_prop(pg, SCF_PROPERTY_TYPE, exp_prop) != 0 ||
9296 if (pg_get_prop(pg, SCF_PROPERTY_ENTITIES, exp_prop) == 0 &&
9336 export_pg(pg, eelts, SCE_ALL_VALUES);
9342 if (scf_iter_pg_properties(exp_prop_iter, pg) != SCF_SUCCESS)
9387 export_method_environment(scf_propertygroup_t *pg)
9393 if (scf_pg_get_property(pg, SCF_PROPERTY_ENVIRONMENT, NULL) != 0)
9400 if (pg_get_prop(pg, SCF_PROPERTY_ENVIRONMENT, exp_prop) != 0)
9450 export_method(scf_propertygroup_t *pg, struct entity_elts *eelts)
9464 if (scf_pg_get_name(pg, exp_str, max_scf_name_len + 1) < 0)
9469 if (pg_get_prop(pg, SCF_PROPERTY_TYPE, exp_prop) != 0 ||
9474 if (pg_get_prop(pg, SCF_PROPERTY_EXEC, exp_prop) != 0 ||
9479 if (pg_get_prop(pg, SCF_PROPERTY_TIMEOUT, exp_prop) == 0 &&
9499 export_pg(pg, eelts, SCE_ALL_VALUES);
9513 scf_pg_get_property(pg, SCF_PROPERTY_WORKING_DIRECTORY, NULL) ==
9515 scf_pg_get_property(pg, SCF_PROPERTY_PROJECT, NULL) ==
9517 scf_pg_get_property(pg, SCF_PROPERTY_RESOURCE_POOL, NULL) ==
9519 scf_pg_get_property(pg, SCF_PROPERTY_SECFLAGS, NULL) ==
9521 scf_pg_get_property(pg, SCF_PROPERTY_USE_PROFILE, NULL) ==
9529 if (pg_get_prop(pg, SCF_PROPERTY_WORKING_DIRECTORY, exp_prop) ==
9535 if (pg_get_prop(pg, SCF_PROPERTY_PROJECT, exp_prop) == 0 &&
9540 if (pg_get_prop(pg, SCF_PROPERTY_RESOURCE_POOL, exp_prop) ==
9546 if (pg_get_prop(pg, SCF_PROPERTY_SECFLAGS, exp_prop) == 0 &&
9556 if (pg_get_prop(pg, SCF_PROPERTY_USE_PROFILE, exp_prop) == 0 &&
9572 if (pg_get_prop(pg, SCF_PROPERTY_PROFILE,
9585 if (pg_get_prop(pg, SCF_PROPERTY_USER,
9592 if (pg_get_prop(pg, SCF_PROPERTY_GROUP,
9598 if (pg_get_prop(pg, SCF_PROPERTY_SUPP_GROUPS,
9604 if (pg_get_prop(pg, SCF_PROPERTY_PRIVILEGES,
9610 if (pg_get_prop(pg,
9620 if ((env = export_method_environment(pg)) != NULL) {
9636 if (scf_iter_pg_properties(exp_prop_iter, pg) != SCF_SUCCESS)
9727 export_svc_general(scf_propertygroup_t *pg, struct entity_elts *selts)
9740 if (scf_iter_pg_properties(exp_prop_iter, pg) != SCF_SUCCESS)
9812 export_method_context(scf_propertygroup_t *pg, struct entity_elts *elts)
9820 env = export_method_environment(pg);
9823 if (pg_get_prop(pg, SCF_PROPERTY_USE_PROFILE, exp_prop) == 0 &&
9842 if (scf_iter_pg_properties(exp_prop_iter, pg) != SCF_SUCCESS)
9901 export_pg(pg, elts, SCE_ALL_VALUES);
9913 export_dependent(scf_propertygroup_t *pg, const char *name, const char *tfmri)
9925 if (scf_pg_get_property(pg, scf_property_external, exp_prop) != 0 ||
9945 if (pg_get_prop(pg, SCF_PROPERTY_RESTART_ON, exp_prop) != 0 ||
9949 if (pg_get_prop(pg, SCF_PROPERTY_GROUPING, exp_prop) != 0 ||
9953 if (pg_get_prop(pg, SCF_PROPERTY_ENTITIES, exp_prop) == 0 &&
9974 if (scf_iter_pg_properties(exp_prop_iter, pg) != SCF_SUCCESS)
10028 export_dependents(scf_propertygroup_t *pg, struct entity_elts *eelts)
10043 if (scf_iter_pg_properties(iter, pg) != SCF_SUCCESS)
10201 export_tm_loctext(scf_propertygroup_t *pg, const char *parname)
10207 if (scf_iter_pg_properties(exp_prop_iter, pg) != SCF_SUCCESS)
10237 export_tm_manpage(scf_propertygroup_t *pg)
10243 if (pg_get_prop(pg, SCF_PROPERTY_TM_TITLE, exp_prop) != 0 ||
10245 pg_get_prop(pg, SCF_PROPERTY_TM_SECTION, exp_prop) != 0 ||
10251 if (pg_get_prop(pg, SCF_PROPERTY_TM_MANPATH, exp_prop) == 0)
10259 export_tm_doc_link(scf_propertygroup_t *pg)
10265 if (pg_get_prop(pg, SCF_PROPERTY_TM_NAME, exp_prop) != 0 ||
10267 pg_get_prop(pg, SCF_PROPERTY_TM_URI, exp_prop) != 0 ||
10279 export_template(scf_propertygroup_t *pg, struct entity_elts *elts,
10286 if (scf_pg_get_name(pg, exp_str, exp_str_sz) < 0)
10290 telts->common_name = export_tm_loctext(pg, "common_name");
10292 export_pg(pg, elts, SCE_ALL_VALUES);
10295 telts->description = export_tm_loctext(pg, "description");
10297 export_pg(pg, elts, SCE_ALL_VALUES);
10302 child = export_tm_manpage(pg);
10304 child = export_tm_doc_link(pg);
10311 export_pg(pg, elts, SCE_ALL_VALUES);
10387 export_notify_params(scf_propertygroup_t *pg, struct entity_elts *elts)
10399 if (scf_pg_get_name(pg, exp_str, max_scf_name_len + 1) < 0)
10412 if (scf_iter_pg_properties(exp_prop_iter, pg) != SCF_SUCCESS)
10424 * element, we should export as regular pg
10464 export_pg(pg, elts, SCE_ALL_VALUES);
10489 export_inst_general(scf_propertygroup_t *pg, xmlNodePtr inode,
10497 if (pg_get_prop(pg, scf_property_enabled, exp_prop) == 0 &&
10508 if (scf_iter_pg_properties(exp_prop_iter, pg) != SCF_SUCCESS)
10572 /* check existance of general pg (since general/enabled is required) */
10649 /* Ordinary pg. */
11083 scf_propertygroup_t *pg;
11126 (pg = scf_pg_create(g_hndl)) == NULL ||
11159 if (scf_instance_get_pg(inst, scf_pg_general, pg) !=
11189 if (pg_get_prop(pg, scf_property_enabled, prop) != 0 ||
11923 scf_propertygroup_t *pg = NULL;
11929 (pg = scf_pg_create(g_hndl)) == NULL)
11940 while ((err = scf_iter_next_pg(iter, pg)) == 1) {
11941 if (scf_pg_get_flags(pg, &flags) != 0)
11955 scf_pg_destroy(pg);
12002 * the pg is the wrong type, or SCF_ERROR_PERMISSION_DENIED if permission was
12010 scf_propertygroup_t *pg = NULL;
12039 pg = scf_pg_create(g_hndl);
12040 if (pg == NULL)
12043 if (entity_get_pg(entity, isservice, name, pg) != 0) {
12053 if (scf_pg_get_type(pg, pgty, max_scf_pg_type_len + 1) < 0)
12064 if (scf_pg_delete(pg) != 0) {
12161 scf_pg_destroy(pg);
12169 delete_dependents(scf_propertygroup_t *pg)
12178 /* Verify that the pg has the correct type. */
12180 if (scf_pg_get_type(pg, pgty, max_scf_pg_type_len + 1) < 0)
12186 if (scf_pg_to_fmri(pg, fmri, max_scf_fmri_len + 1) < 0)
12207 if (scf_iter_pg_properties(iter, pg) != SCF_SUCCESS)
12262 scf_propertygroup_t *pg;
12269 if ((pg = scf_pg_create(g_hndl)) == NULL ||
12274 if (scf_instance_get_pg(inst, SCF_PG_RESTARTER, pg) != SCF_SUCCESS) {
12280 if (pg_get_prop(pg, SCF_PROPERTY_STATE, prop) != 0 ||
12294 scf_pg_destroy(pg);
12299 pg_is_external_dependency(scf_propertygroup_t *pg)
12308 if (scf_pg_get_type(pg, type, max_scf_pg_type_len + 1) < 0)
12316 if (pg_get_prop(pg, scf_property_external, prop) == 0) {
12358 scf_propertygroup_t *pg;
12380 pg = scf_pg_create(g_hndl);
12381 if (pg == NULL)
12384 if (scf_instance_get_pg(inst, SCF_PG_DEPENDENTS, pg) == 0)
12385 (void) delete_dependents(pg);
12389 scf_pg_destroy(pg);
12397 (pg = scf_pg_create(g_hndl)) == NULL)
12403 while ((err = scf_iter_next_pg(iter, pg)) == 1) {
12404 if (pg_is_external_dependency(pg)) {
12409 if (scf_pg_delete(pg) != 0) {
12416 (void) scf_pg_destroy(pg);
12426 (void) scf_pg_destroy(pg);
12501 scf_propertygroup_t *pg;
12507 (pg = scf_pg_create(g_hndl)) == NULL ||
12521 scf_pg_destroy(pg);
12538 if (scf_service_get_pg(svc, SCF_PG_DEPENDENTS, pg) == 0)
12539 (void) delete_dependents(pg);
12544 scf_pg_destroy(pg);
12551 if ((pg = scf_pg_create(g_hndl)) == NULL ||
12558 while ((r = scf_iter_next_pg(iter, pg)) == 1) {
12559 if (pg_is_external_dependency(pg)) {
12564 if (scf_pg_delete(pg) != 0) {
12571 (void) scf_pg_destroy(pg);
12581 (void) scf_pg_destroy(pg);
12688 * :properties commands. These all end with "pg" or "prop" and generally
12697 list_pg_info(const scf_propertygroup_t *pg, const char *name, size_t namewidth)
12704 if (scf_pg_get_type(pg, buf, max_scf_pg_type_len + 1) < 0)
12707 if (scf_pg_get_flags(pg, &flags) != SCF_SUCCESS)
12805 * for describe -v, which includes all templates fields. If pg is
12810 list_pg_tmpl(scf_pg_tmpl_t *pgt, scf_propertygroup_t *pg, int templates)
12824 if (templates == 2 && pg != NULL) {
12825 if (scf_pg_get_property(pg, SCF_PROPERTY_STABILITY,
12854 if (pg == NULL || templates == 2) {
12857 if (pg != NULL)
12866 if (pg != NULL)
13176 read_astring(scf_propertygroup_t *pg, const char *prop_name)
13180 rv = _scf_read_single_astring_from_pg(pg, prop_name);
13193 display_documentation(scf_iter_t *iter, scf_propertygroup_t *pg)
13204 while ((rv = scf_iter_next_pg(iter, pg)) == 1) {
13205 if (scf_pg_get_name(pg, pg_name, max_scf_name_len + 1) == -1) {
13212 text = read_astring(pg, SCF_PROPERTY_TM_NAME);
13218 text = read_astring(pg, SCF_PROPERTY_TM_URI);
13229 text = read_astring(pg, SCF_PROPERTY_TM_TITLE);
13235 text = read_astring(pg, SCF_PROPERTY_TM_SECTION);
13241 text = read_astring(pg, SCF_PROPERTY_TM_MANPATH);
13263 scf_propertygroup_t *pg;
13268 if ((pg = scf_pg_create(g_hndl)) == NULL ||
13276 if (get_pg(SCF_PG_TM_COMMON_NAME, pg) == 0) {
13280 if (scf_pg_get_property(pg, locale, prop) == 0 ||
13282 scf_pg_get_property(pg, "C", prop) == 0)) {
13297 if (get_pg(SCF_PG_TM_DESCRIPTION, pg) == 0) {
13301 if (scf_pg_get_property(pg, locale, prop) == 0 ||
13303 scf_pg_get_property(pg, "C", prop) == 0)) {
13326 display_documentation(iter, pg);
13332 scf_pg_destroy(pg);
13426 scf_propertygroup_t *pg;
13447 if ((pg = scf_pg_create(g_hndl)) == NULL ||
13483 while ((ret = scf_iter_next_pg(iter, pg)) == 1) {
13488 pgnlen = scf_pg_get_name(pg, NULL, 0);
13494 szret = scf_pg_get_name(pg, pgnbuf, pgnlen + 1);
13499 if (scf_tmpl_get_by_pg(pg, pgt, 0) == -1) {
13521 objects[i] = pg;
13540 pg = scf_pg_create(g_hndl);
13541 if (pg == NULL)
13552 if (scf_iter_pg_properties(piter, pg) != SCF_SUCCESS)
13616 pg = scf_pg_create(g_hndl);
13617 if (pg == NULL)
13630 scf_pg_destroy(pg);
13638 pg = (scf_propertygroup_t *)objects[i];
13640 list_pg_info(pg, names[i], max_len);
13641 list_pg_tmpl(pgt, pg, templates);
13643 scf_pg_destroy(pg);
13680 scf_propertygroup_t *pg;
13717 pg = scf_pg_create(g_hndl);
13718 if (pg == NULL)
13722 ret = scf_instance_add_pg(cur_inst, name, type, flgs, pg);
13724 ret = scf_service_add_pg(cur_svc, name, type, flgs, pg);
13749 scf_pg_destroy(pg);
13825 scf_propertygroup_t *pg, *parent_pg;
13843 (pg = scf_pg_create(g_hndl)) == NULL ||
13879 ret = scf_instance_get_pg(cur_inst, pgname, pg);
13881 ret = scf_service_get_pg(cur_svc, pgname, pg);
13899 if (scf_pg_update(pg) == -1)
13901 if (scf_transaction_start(tx, pg) != SCF_SUCCESS) {
13909 ret = scf_pg_get_property(pg, propname, prop);
13939 } else if (scf_tmpl_get_by_pg(pg, pgt,
14024 scf_pg_destroy(pg);
14037 scf_propertygroup_t *pg;
14055 pg = scf_pg_create(g_hndl);
14056 if (pg == NULL)
14068 ret = scf_instance_get_pg(cur_inst, pgn, pg);
14070 ret = scf_service_get_pg(cur_svc, pgn, pg);
14085 scf_pg_destroy(pg);
14092 if (scf_pg_delete(pg) != SCF_SUCCESS) {
14101 scf_pg_destroy(pg);
14109 if (scf_pg_update(pg) == -1)
14111 if (scf_transaction_start(tx, pg) != SCF_SUCCESS) {
14149 scf_pg_destroy(pg);
14162 scf_propertygroup_t *pg;
14202 if ((pg = scf_pg_create(g_hndl)) == NULL ||
14221 while ((ret = scf_iter_next_pg(iter, pg)) == 1) {
14225 * # delprop pg
14226 * # addpg pg type
14228 if (scf_pg_get_name(pg, buf, max_scf_name_len + 1) < 0)
14231 if (scf_pg_get_type(pg, tybuf, max_scf_pg_type_len + 1) < 0)
14242 /* # setprop pg/prop = (values) */
14244 if (scf_iter_pg_properties(piter, pg) != SCF_SUCCESS)
14361 scf_pg_destroy(pg);
14542 scf_propertygroup_t *pg;
14565 (pg = scf_pg_create(g_hndl)) == NULL ||
14598 ret = scf_instance_get_pg(cur_inst, pgname, pg);
14600 ret = scf_service_get_pg(cur_svc, pgname, pg);
14622 if (scf_pg_update(pg) == -1)
14624 if (scf_transaction_start(tx, pg) != 0) {
14632 ret = scf_pg_get_property(pg, propname, prop);
14734 scf_pg_destroy(pg);
14771 scf_propertygroup_t *pg;
14776 if ((pg = scf_pg_create(g_hndl)) == NULL)
14782 ret = scf_instance_get_pg(inst, *p, pg);
14784 ret = scf_service_get_pg(cur_svc, *p, pg);
14790 if ((ret = scf_pg_get_type(pg, buf, bufsz)) < 0) {
14801 scf_pg_destroy(pg);
14816 scf_pg_destroy(pg);
14823 scf_propertygroup_t *pg;
14826 pg = scf_pg_create(g_hndl);
14827 if (pg == NULL)
14831 ret = scf_instance_add_pg(cur_inst, name, type, 0, pg);
14833 ret = scf_service_add_pg(cur_svc, name, type, 0, pg);
14850 scf_pg_destroy(pg);
14974 scf_propertygroup_t *pg;
14979 if ((pg = scf_pg_create(g_hndl)) == NULL)
14983 ret = scf_instance_get_pg(cur_inst, method, pg);
14985 ret = scf_service_get_pg(cur_svc, method, pg);
14988 scf_pg_destroy(pg);
15008 if (scf_pg_get_type(pg, buf, bufsz) < 0 ||
15014 scf_pg_destroy(pg);
15019 scf_pg_destroy(pg);
15333 scf_propertygroup_t *pg, *npg;
15382 (pg = scf_pg_create(g_hndl)) == NULL ||
15405 if (scf_instance_get_pg(cur_inst, scf_pg_general, pg) == 0 &&
15406 scf_pg_get_property(pg, scf_property_enabled, prop) == 0 &&
15432 while ((r = scf_iter_next_pg(iter, pg)) == 1) {
15433 if (scf_pg_get_flags(pg, &flags) != SCF_SUCCESS)
15440 if (scf_pg_delete(pg) != SCF_SUCCESS) {
15455 while ((r = scf_iter_next_pg(iter, pg)) == 1) {
15456 if (scf_pg_get_name(pg, nbuf, max_scf_name_len + 1) < 0)
15459 if (scf_pg_get_type(pg, tbuf, max_scf_pg_type_len + 1) <
15463 if (scf_pg_get_flags(pg, &flags) != SCF_SUCCESS)
15482 r = pg_copy(pg, npg, enabled);
15484 r = pg_copy(pg, npg, 2);
15535 scf_pg_destroy(pg);
15606 * describe [-v] [-t] [pg/prop]
16783 * SCF_PG_MANIFESTFILES pg. The function creates and populates
16784 * SCF_PG_MANIFESTFILES pg for the given service to keep track of service to
16885 * Create a manifestfiles pg and add the property.
17357 scf_propertygroup_t *pg;
17367 pg = scf_pg_create(g_hndl);
17371 if (pg == NULL || prop == NULL || val == NULL || iter == NULL ||
17375 uu_warn("%s\n", pg == NULL ? "pg is NULL" :
17376 "pg is not NULL");
17421 while ((r = scf_iter_next_pg(iter, pg)) != 0) {
17425 if (scf_pg_get_name(pg, pgname, max_scf_name_len + 1) < 0) {
17448 if (scf_pg_get_property(pg, MFSTFILEPR, prop) != SCF_SUCCESS) {
17493 (void) scf_pg_delete(pg);
17499 scf_pg_destroy(pg);