Lines Matching refs:ent
72 #define SCF_ENTITY_SET_TO_SERVICE(ent, s) { ent.type = 1; ent.u.svc = s; }
74 #define SCF_ENTITY_SET_TO_INSTANCE(ent, i) \
75 { ent.type = ENT_INSTANCE; ent.u.inst = i; }
77 #define scf_entity_get_pg(ent, name, pg) \
78 (ent.type ? scf_service_get_pg(ent.u.svc, name, pg) : \
79 scf_instance_get_pg(ent.u.inst, name, pg))
81 #define scf_entity_to_fmri(ent, buf, buf_sz) \
82 (ent.type ? scf_service_to_fmri(ent.u.svc, buf, buf_sz) : \
83 scf_instance_to_fmri(ent.u.inst, buf, buf_sz))
85 #define SCF_ENTITY_TYPE_NAME(ent) (ent.type ? "service" : "instance")
349 scf_iter_entity_pgs(scf_iter_t *iter, scf_entityp_t ent)
353 if (ent.type) {
363 ret = scf_iter_service_pgs(iter, ent.u.svc);
366 ret = scf_iter_instance_pgs(iter, ent.u.inst);
368 ret = scf_iter_instance_pgs_composed(iter, ent.u.inst,
413 process_ent(scf_entityp_t ent)
430 if (cflag || Cflag || ent.type != ENT_INSTANCE) {
431 if (scf_iter_entity_pgs(iter, ent) == -1)
435 snap = get_snapshot(ent.u.inst, snapshot);
437 if (scf_iter_instance_pgs_composed(iter, ent.u.inst,
456 if (scf_iter_instance_pgs_composed(iter, ent.u.inst,
481 if (ent.type == ENT_INSTANCE && snapshot != NULL)
482 snap = get_snapshot(ent.u.inst, snapshot);
487 if (ent.type == ENT_INSTANCE) {
489 ret = scf_instance_get_pg(ent.u.inst,
492 ret = scf_instance_get_pg_composed(ent.u.inst,
503 ent.u.inst, NULL, spn->spn_comp1,
527 ret = scf_entity_get_pg(ent, spn->spn_comp1, pg);
538 if (scf_entity_to_fmri(ent, buf,
544 SCF_ENTITY_TYPE_NAME(ent), buf);
568 if (scf_entity_to_fmri(ent, buf,
575 spn->spn_comp2, SCF_ENTITY_TYPE_NAME(ent),
688 scf_entityp_t ent;
699 SCF_ENTITY_SET_TO_INSTANCE(ent, wip->inst);
700 process_ent(ent);
704 SCF_ENTITY_SET_TO_SERVICE(ent, wip->svc);
705 process_ent(ent);