Lines Matching defs:inst

63 	scf_instance_destroy(simple_h->inst);
478 get_inst_enabled(const scf_instance_t *inst, const char *pgname)
487 if ((h = scf_instance_handle(inst)) == NULL)
495 if (scf_instance_get_pg(inst, pgname, gpg) ||
516 set_inst_enabled(const scf_instance_t *inst, uint8_t desired,
529 if ((h = scf_instance_handle(inst)) == NULL)
540 if (scf_instance_get_pg(inst, SCF_PG_GENERAL, gpg) == -1) {
544 if (scf_instance_add_pg(inst, SCF_PG_GENERAL,
554 if (scf_instance_get_pg(inst, pgname, gpg) == -1) {
558 if (scf_instance_add_pg(inst, pgname,
649 delete_inst_enabled(const scf_instance_t *inst, const char *pgname)
658 if ((h = scf_instance_handle(inst)) == NULL)
666 if (scf_instance_get_pg(inst, pgname, gpg) != 0)
702 * SCF_ERROR_HANDLE_DESTROYED - inst's handle has been destroyed
703 * SCF_ERROR_NOT_BOUND - inst's handle is not bound
705 * SCF_ERROR_NOT_SET - inst is not set
706 * SCF_ERROR_DELETED - inst was deleted
712 set_inst_action_inst(scf_instance_t *inst, const char *action)
724 if ((h = scf_instance_handle(inst)) == NULL ||
733 if (scf_instance_get_pg(inst, SCF_PG_RESTARTER_ACTIONS, pg) == -1) {
752 if (scf_instance_add_pg(inst, SCF_PG_RESTARTER_ACTIONS,
920 scf_instance_t *inst;
927 inst = scf_instance_create(h);
929 if (inst != NULL) {
930 if (scf_handle_decode_fmri(h, fmri, NULL, NULL, inst, NULL,
932 ret = set_inst_action_inst(inst, action);
947 scf_instance_destroy(inst);
962 get_inst_state(scf_instance_t *inst, scf_handle_t *h)
977 if (scf_instance_get_pg(inst, SCF_PG_RESTARTER, pg) == -1 ||
1018 set_inst_enabled_atboot(scf_instance_t *inst, uint8_t desired)
1024 if ((persistent = get_inst_enabled(inst, SCF_PG_GENERAL)) < 0) {
1029 if ((enabled = get_inst_enabled(inst, SCF_PG_GENERAL_OVR)) < 0) {
1035 if (set_inst_enabled(inst, persistent,
1041 if (set_inst_enabled(inst, desired, SCF_PG_GENERAL,
1045 ret = delete_inst_enabled(inst, SCF_PG_GENERAL_OVR);
1058 scf_instance_t *inst;
1069 if ((inst = scf_instance_create(h)) == NULL) {
1074 if (scf_handle_decode_fmri(h, fmri, NULL, NULL, inst, NULL, NULL,
1082 ret = set_inst_enabled_atboot(inst, desired);
1084 if (set_inst_enabled(inst, desired, flags & SMF_TEMPORARY ?
1096 ret = delete_inst_enabled(inst, SCF_PG_GENERAL_OVR);
1100 scf_instance_destroy(inst);
1142 if (scf_instance_get_pg(simple_h->inst, pg_name, ret_pg) == -1) {
1162 _smf_refresh_instance_i(scf_instance_t *inst)
1164 return (set_inst_action_inst(inst, SCF_PROPERTY_REFRESH));
1334 ret->inst = scf_instance_create(ret->h);
1339 if ((ret->h == NULL) || (ret->inst == NULL) ||
1344 if (scf_handle_decode_fmri(ret->h, fmri, NULL, NULL, ret->inst,
1349 if ((scf_instance_get_snapshot(ret->inst, "running", ret->snap))
1354 if (scf_instance_get_pg_composed(ret->inst, ret->snap, pg_name,
1570 scf_instance_t *inst = NULL;
1582 ((inst = scf_instance_create(h)) == NULL) ||
1603 scf_iter_next_instance(inst_iter, inst)) > 0) {
1611 if ((inst_state = get_inst_state(inst, h)) == -1) {
1620 if (inst_callback(h, inst, private) !=
1640 scf_instance_destroy(inst);
1787 scf_instance_t *inst = NULL;
1841 if ((inst = scf_instance_create(h)) == NULL ||
1851 if (scf_handle_decode_fmri(h, sys_fmri, NULL, svc, inst, NULL, NULL,
1970 if (scf_iter_instance_pgs_typed(pgiter, inst, SCF_GROUP_APPLICATION)
2103 scf_instance_destroy(inst);
2125 scf_instance_destroy(inst);
2761 scf_instance_t *inst = scf_instance_create(h);
2782 if (h == NULL || s == NULL || inst == NULL || pg == NULL || p == NULL ||
2793 if (scf_handle_decode_fmri(h, fmri, NULL, s, inst, NULL, NULL, 0)
2797 if (scf_instance_to_fmri(inst, NULL, 0) == -1) {
2803 if ((instance ? scf_instance_get_pg(inst, pgname, pg) :
2896 scf_instance_destroy(inst);
2912 * ECANCELED - inst was deleted
2919 scf_instance_delete_prop(scf_instance_t *inst, const char *pgname,
2928 h = scf_instance_handle(inst);
2934 if (scf_instance_get_pg(inst, pgname, pg) != 0) {