Lines Matching defs:wip

659  * the appropriate filename using wip->fmri and stores that in the
671 * during the generation of the wip->fmri based filename
738 ctids_by_restarter(scf_walkinfo_t *wip, uint64_t *cp, int print_flag,
755 rest_ret = common_by_restarter(wip->inst, wip->fmri, restarter_specp);
786 wip->fmri);
967 sprint_ctid(char **buf, scf_walkinfo_t *wip)
977 * Only check for non-legacy services (wip->pg == 0).
979 if (wip->pg != NULL) {
980 r = pg_get_single_val(wip->pg, scf_property_contract,
983 r = ctids_by_restarter(wip, &c, 0, MULTI_OK, &restarter_spec,
987 r = get_restarter_count_prop(wip->inst,
1009 sortkey_ctid(char *buf, int reverse, scf_walkinfo_t *wip)
1017 * Only check for non-legacy services (wip->pg == 0).
1019 if (wip->pg != NULL) {
1020 r = pg_get_single_val(wip->pg, scf_property_contract,
1023 r = ctids_by_restarter(wip, &c, 0, MULTI_OK, &restarter_spec,
1027 r = get_restarter_count_prop(wip->inst,
1052 sprint_desc(char **buf, scf_walkinfo_t *wip)
1063 if (wip->pg != NULL) {
1065 } else if (inst_get_single_val(wip->inst, SCF_PG_TM_COMMON_NAME, locale,
1068 inst_get_single_val(wip->inst, SCF_PG_TM_COMMON_NAME, "C",
1096 sortkey_desc(char *buf, int reverse, scf_walkinfo_t *wip)
1144 sortkey_states(const char *pname, char *buf, int reverse, scf_walkinfo_t *wip)
1152 if (wip->pg == NULL) {
1153 get_restarter_string_prop(wip->inst, pname, state_name,
1178 sprint_state(char **buf, scf_walkinfo_t *wip)
1184 if (wip->pg == NULL) {
1185 get_restarter_string_prop(wip->inst, scf_property_state,
1194 if (!opt_nstate_shown && transitioning(wip->inst)) {
1212 sortkey_state(char *buf, int reverse, scf_walkinfo_t *wip)
1214 sortkey_states(scf_property_state, buf, reverse, wip);
1218 sprint_nstate(char **buf, scf_walkinfo_t *wip)
1225 if (wip->pg == NULL) {
1226 get_restarter_string_prop(wip->inst, scf_property_next_state,
1251 sortkey_nstate(char *buf, int reverse, scf_walkinfo_t *wip)
1253 sortkey_states(scf_property_next_state, buf, reverse, wip);
1257 sprint_s(char **buf, scf_walkinfo_t *wip)
1264 if (wip->pg == NULL) {
1265 get_restarter_string_prop(wip->inst, scf_property_state,
1269 if (!opt_nstate_shown && transitioning(wip->inst))
1286 sprint_n(char **buf, scf_walkinfo_t *wip)
1293 if (wip->pg == NULL) {
1294 get_restarter_string_prop(wip->inst, scf_property_next_state,
1312 sprint_sn(char **buf, scf_walkinfo_t *wip)
1320 if (wip->pg == NULL) {
1321 get_restarter_string_prop(wip->inst, scf_property_state,
1323 get_restarter_string_prop(wip->inst, scf_property_next_state,
1346 sortkey_sn(char *buf, int reverse, scf_walkinfo_t *wip)
1348 sortkey_state(buf, reverse, wip);
1349 sortkey_nstate(buf + 1, reverse, wip);
1374 sprint_sta(char **buf, scf_walkinfo_t *wip)
1381 if (wip->pg == NULL)
1382 get_restarter_string_prop(wip->inst, scf_property_state,
1389 if (wip->pg == NULL && !opt_nstate_shown && transitioning(wip->inst))
1399 sprint_nsta(char **buf, scf_walkinfo_t *wip)
1405 if (wip->pg == NULL)
1406 get_restarter_string_prop(wip->inst, scf_property_next_state,
1425 sprint_fmri(char **buf, scf_walkinfo_t *wip)
1431 if (wip->pg == NULL) {
1432 if (scf_instance_to_fmri(wip->inst, fmri_buf,
1437 if (pg_get_single_val(wip->pg, SCF_LEGACY_PROPERTY_NAME,
1459 sortkey_fmri(char *buf, int reverse, scf_walkinfo_t *wip)
1463 sprint_fmri(&tmp, wip);
1473 sprint_scope(char **buf, scf_walkinfo_t *wip)
1479 assert(wip->scope != NULL);
1481 if (scf_scope_get_name(wip->scope, scope_buf, max_scf_name_length) < 0)
1493 sortkey_scope(char *buf, int reverse, scf_walkinfo_t *wip)
1497 sprint_scope(&tmp, wip);
1505 sprint_service(char **buf, scf_walkinfo_t *wip)
1511 if (wip->pg == NULL) {
1512 if (scf_service_get_name(wip->svc, svc_buf,
1516 if (pg_get_single_val(wip->pg, "name", SCF_TYPE_ASTRING,
1537 sortkey_service(char *buf, int reverse, scf_walkinfo_t *wip)
1541 sprint_service(&tmp, wip);
1550 sprint_instance(char **buf, scf_walkinfo_t *wip)
1556 if (wip->pg == NULL) {
1557 if (scf_instance_get_name(wip->inst, tmp,
1574 sortkey_instance(char *buf, int reverse, scf_walkinfo_t *wip)
1578 sprint_instance(&tmp, wip);
1597 sprint_stime(char **buf, scf_walkinfo_t *wip)
1607 if (wip->pg == NULL) {
1608 r = get_restarter_time_prop(wip->inst,
1611 r = pg_get_single_val(wip->pg, SCF_PROPERTY_STATE_TIMESTAMP,
1654 sortkey_stime(char *buf, int reverse, scf_walkinfo_t *wip)
1659 if (wip->pg == NULL)
1660 r = get_restarter_time_prop(wip->inst,
1663 r = pg_get_single_val(wip->pg, SCF_PROPERTY_STATE_TIMESTAMP,
1945 detailed_list_processes(scf_walkinfo_t *wip)
1952 if (get_restarter_count_prop(wip->inst, scf_property_contract, &c,
1956 if (instance_processes(wip->inst, wip->fmri, &pids, &n) != 0)
2117 print_application_properties(scf_walkinfo_t *wip, scf_snapshot_t *snap)
2144 if (scf_iter_instance_pgs_typed_composed(pg_iter, wip->inst, snap,
2164 if (scf_tmpl_get_by_pg_name(wip->fmri, snap_name, pg_name_buf,
2325 print_detailed(void *unused, scf_walkinfo_t *wip)
2345 assert(wip->pg == NULL);
2358 if (scf_instance_to_fmri(wip->inst, buf, max_scf_fmri_length + 1) != -1)
2364 if (inst_get_single_val(wip->inst, SCF_PG_TM_COMMON_NAME, locale,
2369 else if (inst_get_single_val(wip->inst, SCF_PG_TM_COMMON_NAME, "C",
2381 perm = instance_enabled(wip->inst, B_FALSE);
2382 temp = instance_enabled(wip->inst, B_TRUE);
2402 if (scf_instance_get_pg(wip->inst, SCF_PG_RESTARTER, rpg) != 0) {
2448 if (inst_get_single_val(wip->inst, SCF_PG_GENERAL,
2462 restarter_ret = ctids_by_restarter(wip, &c, 1, 0,
2467 wip->fmri);
2524 snap = get_running_snapshot(wip->inst);
2526 if (scf_iter_instance_pgs_typed_composed(pg_iter, wip->inst, snap,
2538 detailed_list_processes(wip);
2542 print_application_properties(wip, snap);
2762 print_notify(void *unused, scf_walkinfo_t *wip)
2764 if (strcmp(SCF_INSTANCE_GLOBAL, wip->fmri) == 0 ||
2765 strcmp(SCF_NOTIFY_PARAMS_INST, wip->fmri) == 0)
2768 print_notify_fmri(wip->fmri);
2778 add_processes(scf_walkinfo_t *wip, char *line, scf_propertygroup_t *lpg)
2784 if (instance_processes(wip->inst, wip->fmri, &pids, &n) != 0)
2847 list_instance(void *unused, scf_walkinfo_t *wip)
2864 if (wip->pg != NULL)
2869 if (inst_get_single_val(wip->inst, SCF_PG_GENERAL,
2894 if (wip->pg == NULL && ht_buckets != NULL && ht_add(wip->fmri)) {
2903 columns[opt_columns[i]].sprint(&lp->str, wip);
2913 lp->str = add_processes(wip, lp->str, wip->pg);
2921 columns[j].get_sortkey(cp, opt_sort[i] & ~0xff, wip);
2934 list_if_enabled(void *unused, scf_walkinfo_t *wip)
2936 if (wip->pg != NULL ||
2937 instance_enabled(wip->inst, B_FALSE) == 1 ||
2938 instance_enabled(wip->inst, B_TRUE) == 1)
2939 return (list_instance(unused, wip));
2952 list_svc_or_inst_fmri(void *complain, scf_walkinfo_t *wip)
2959 fmri = safe_strdup(wip->fmri);
2965 wip->fmri);
2980 "service or instance.\n"), wip->fmri);
2986 if (scf_handle_decode_fmri(h, wip->fmri, wip->scope, wip->svc,
2987 wip->inst, NULL, NULL, 0) != SCF_SUCCESS) {
2994 wip->fmri);
2998 return (list_instance(NULL, wip));
3002 if (scf_handle_decode_fmri(h, wip->fmri, wip->scope, wip->svc, NULL,
3009 wip->fmri);
3020 if (scf_iter_service_instances(iter, wip->svc) != SCF_SUCCESS)
3029 save = wip->fmri;
3030 wip->fmri = fmri;
3031 while ((ret = scf_iter_next_instance(iter, wip->inst)) == 1) {
3032 if (scf_instance_to_fmri(wip->inst, fmri,
3035 (void) list_instance(NULL, wip);
3038 wip->fmri = save;
3055 walk_dependencies(scf_walkinfo_t *wip, scf_walk_callback callback, void *data)
3062 assert(wip->inst != NULL);
3068 snap = get_running_snapshot(wip->inst);
3070 if (scf_iter_instance_pgs_typed_composed(iter, wip->inst, snap,
3124 wip->fmri = dep;
3125 if (callback(data, wip) != 0)
3141 list_dependencies(void *data, scf_walkinfo_t *wip)
3143 walk_dependencies(wip, list_svc_or_inst_fmri, data);
3161 check_against_provider(void *arg, scf_walkinfo_t *wip)
3167 cfmri = safe_strdup(wip->fmri);
3196 list_if_dependent(void *unused, scf_walkinfo_t *wip)
3201 (void) walk_dependencies(wip, check_against_provider, &match);
3204 return (list_instance(unused, wip));
3211 list_dependents(void *unused, scf_walkinfo_t *wip)
3216 if (scf_scope_get_name(wip->scope, provider_scope,
3218 scf_service_get_name(wip->svc, provider_svc,
3223 if (wip->inst == NULL)
3225 else if (scf_instance_get_name(wip->inst, provider_inst,