Lines Matching refs:inst

62 	scf_instance_destroy(simple_h->inst);
476 get_inst_enabled(const scf_instance_t *inst, const char *pgname)
485 if ((h = scf_instance_handle(inst)) == NULL)
493 if (scf_instance_get_pg(inst, pgname, gpg) ||
514 set_inst_enabled(const scf_instance_t *inst, uint8_t desired,
527 if ((h = scf_instance_handle(inst)) == NULL)
538 if (scf_instance_get_pg(inst, SCF_PG_GENERAL, gpg) == -1) {
542 if (scf_instance_add_pg(inst, SCF_PG_GENERAL,
552 if (scf_instance_get_pg(inst, pgname, gpg) == -1) {
556 if (scf_instance_add_pg(inst, pgname,
647 delete_inst_enabled(const scf_instance_t *inst, const char *pgname)
656 if ((h = scf_instance_handle(inst)) == NULL)
664 if (scf_instance_get_pg(inst, pgname, gpg) != 0)
700 * SCF_ERROR_HANDLE_DESTROYED - inst's handle has been destroyed
701 * SCF_ERROR_NOT_BOUND - inst's handle is not bound
703 * SCF_ERROR_NOT_SET - inst is not set
704 * SCF_ERROR_DELETED - inst was deleted
710 set_inst_action_inst(scf_instance_t *inst, const char *action)
722 if ((h = scf_instance_handle(inst)) == NULL ||
731 if (scf_instance_get_pg(inst, SCF_PG_RESTARTER_ACTIONS, pg) == -1) {
750 if (scf_instance_add_pg(inst, SCF_PG_RESTARTER_ACTIONS,
918 scf_instance_t *inst;
925 inst = scf_instance_create(h);
927 if (inst != NULL) {
928 if (scf_handle_decode_fmri(h, fmri, NULL, NULL, inst, NULL,
930 ret = set_inst_action_inst(inst, action);
945 scf_instance_destroy(inst);
960 get_inst_state(scf_instance_t *inst, scf_handle_t *h)
975 if (scf_instance_get_pg(inst, SCF_PG_RESTARTER, pg) == -1 ||
1016 set_inst_enabled_atboot(scf_instance_t *inst, uint8_t desired)
1022 if ((persistent = get_inst_enabled(inst, SCF_PG_GENERAL)) < 0) {
1027 if ((enabled = get_inst_enabled(inst, SCF_PG_GENERAL_OVR)) < 0) {
1033 if (set_inst_enabled(inst, persistent,
1039 if (set_inst_enabled(inst, desired, SCF_PG_GENERAL,
1043 ret = delete_inst_enabled(inst, SCF_PG_GENERAL_OVR);
1056 scf_instance_t *inst;
1067 if ((inst = scf_instance_create(h)) == NULL) {
1072 if (scf_handle_decode_fmri(h, fmri, NULL, NULL, inst, NULL, NULL,
1080 ret = set_inst_enabled_atboot(inst, desired);
1082 if (set_inst_enabled(inst, desired, flags & SMF_TEMPORARY ?
1094 ret = delete_inst_enabled(inst, SCF_PG_GENERAL_OVR);
1098 scf_instance_destroy(inst);
1140 if (scf_instance_get_pg(simple_h->inst, pg_name, ret_pg) == -1) {
1160 _smf_refresh_instance_i(scf_instance_t *inst)
1162 return (set_inst_action_inst(inst, SCF_PROPERTY_REFRESH));
1332 ret->inst = scf_instance_create(ret->h);
1337 if ((ret->h == NULL) || (ret->inst == NULL) ||
1342 if (scf_handle_decode_fmri(ret->h, fmri, NULL, NULL, ret->inst,
1347 if ((scf_instance_get_snapshot(ret->inst, "running", ret->snap))
1352 if (scf_instance_get_pg_composed(ret->inst, ret->snap, pg_name,
1568 scf_instance_t *inst = NULL;
1580 ((inst = scf_instance_create(h)) == NULL) ||
1601 scf_iter_next_instance(inst_iter, inst)) > 0) {
1609 if ((inst_state = get_inst_state(inst, h)) == -1) {
1618 if (inst_callback(h, inst, private) !=
1638 scf_instance_destroy(inst);
1801 scf_instance_t *inst = NULL;
1855 if ((inst = scf_instance_create(h)) == NULL ||
1863 if (scf_handle_decode_fmri(h, sys_fmri, NULL, svc, inst, NULL, NULL,
1980 if (scf_iter_instance_pgs_typed(pgiter, inst, SCF_GROUP_APPLICATION)
2110 scf_instance_destroy(inst);
2135 scf_instance_destroy(inst);
3024 scf_instance_t *inst = scf_instance_create(h);
3036 if (h == NULL || s == NULL || inst == NULL || pg == NULL || p == NULL ||
3040 if (scf_handle_decode_fmri(h, fmri, NULL, s, inst, NULL, NULL, 0)
3044 if (scf_instance_to_fmri(inst, NULL, 0) == -1) {
3050 if ((instance ? scf_instance_get_pg(inst, pgname, pg) :
3152 scf_instance_destroy(inst);
3168 * ECANCELED - inst was deleted
3175 scf_instance_delete_prop(scf_instance_t *inst, const char *pgname,
3185 h = scf_instance_handle(inst);
3191 if (scf_instance_get_pg(inst, pgname, pg) != 0) {
3411 smf_take_snapshot(scf_instance_t *inst, const char *name, scf_snapshot_t *snap)
3417 h = inst->rd_d.rd_handle;
3424 if (scf_instance_get_snapshot(inst, name, snap) == 0) {
3425 if (_scf_snapshot_take_attach(inst, snap) != 0) {
3453 if (_scf_snapshot_take_new(inst, name, snap) != 0) {
3482 scf_instance_t *inst, scf_propertygroup_t *pg, scf_value_t *v)
3552 ret = smf_take_snapshot(inst, "running", NULL);
3572 scf_instance_t *inst = NULL;
3588 (inst = scf_instance_create(h)) == NULL ||
3596 scf_handle_decode_fmri(h, restarter_fmri, NULL, NULL, inst, NULL,
3603 if (scf_handle_decode_fmri(h, fmri, NULL, NULL, inst, NULL, NULL,
3611 if (scf_instance_get_pg(inst, SCF_PG_GENERAL, pg) == -1) {
3615 if (scf_instance_add_pg(inst, SCF_PG_GENERAL,
3628 inst, pg, v);
3639 ret = set_restarter(restarter_fmri, strrest, h, inst, pg, v);
3647 ret = set_restarter(restarter_fmri, strrest, h, inst,
3658 ret = set_restarter(restarter_fmri, strrest, h, inst, pg, v);
3667 ret = set_restarter(restarter_fmri, strrest, h, inst, pg, v);
3673 scf_instance_destroy(inst);
3692 smf_restarter_has_potential(const char *rfmri, const char *inst,
3700 assert(rfmri != NULL || inst != NULL);
3726 prop = scf_prop_get(h, inst, SCF_PG_GENERAL,