Lines Matching defs:wip
699 * the appropriate filename using wip->fmri and stores that in the
711 * during the generation of the wip->fmri based filename
778 ctids_by_restarter(scf_walkinfo_t *wip, uint64_t *cp, int print_flag,
795 rest_ret = common_by_restarter(wip->inst, wip->fmri, restarter_specp);
826 wip->fmri);
1008 sprint_ctid(char **buf, scf_walkinfo_t *wip)
1018 * Only check for non-legacy services (wip->pg == 0).
1020 if (wip->pg != NULL) {
1021 r = pg_get_single_val(wip->pg, scf_property_contract,
1024 r = ctids_by_restarter(wip, &c, 0, MULTI_OK, &restarter_spec,
1028 r = get_restarter_count_prop(wip->inst,
1050 sortkey_ctid(char *buf, int reverse, scf_walkinfo_t *wip)
1058 * Only check for non-legacy services (wip->pg == 0).
1060 if (wip->pg != NULL) {
1061 r = pg_get_single_val(wip->pg, scf_property_contract,
1064 r = ctids_by_restarter(wip, &c, 0, MULTI_OK, &restarter_spec,
1068 r = get_restarter_count_prop(wip->inst,
1093 sprint_desc(char **buf, scf_walkinfo_t *wip)
1104 if (wip->pg != NULL) {
1106 } else if (inst_get_single_val(wip->inst, SCF_PG_TM_COMMON_NAME, locale,
1109 inst_get_single_val(wip->inst, SCF_PG_TM_COMMON_NAME, "C",
1137 sortkey_desc(char *buf, int reverse, scf_walkinfo_t *wip)
1185 sortkey_states(const char *pname, char *buf, int reverse, scf_walkinfo_t *wip)
1193 if (wip->pg == NULL) {
1194 get_restarter_string_prop(wip->inst, pname, state_name,
1219 sprint_state(char **buf, scf_walkinfo_t *wip)
1225 if (wip->pg == NULL) {
1226 get_restarter_string_prop(wip->inst, scf_property_state,
1235 if (!opt_nstate_shown && transitioning(wip->inst)) {
1253 sortkey_state(char *buf, int reverse, scf_walkinfo_t *wip)
1255 sortkey_states(scf_property_state, buf, reverse, wip);
1259 sprint_nstate(char **buf, scf_walkinfo_t *wip)
1266 if (wip->pg == NULL) {
1267 get_restarter_string_prop(wip->inst, scf_property_next_state,
1292 sortkey_nstate(char *buf, int reverse, scf_walkinfo_t *wip)
1294 sortkey_states(scf_property_next_state, buf, reverse, wip);
1298 sprint_s(char **buf, scf_walkinfo_t *wip)
1305 if (wip->pg == NULL) {
1306 get_restarter_string_prop(wip->inst, scf_property_state,
1310 if (!opt_nstate_shown && transitioning(wip->inst))
1327 sprint_n(char **buf, scf_walkinfo_t *wip)
1334 if (wip->pg == NULL) {
1335 get_restarter_string_prop(wip->inst, scf_property_next_state,
1353 sprint_sn(char **buf, scf_walkinfo_t *wip)
1361 if (wip->pg == NULL) {
1362 get_restarter_string_prop(wip->inst, scf_property_state,
1364 get_restarter_string_prop(wip->inst, scf_property_next_state,
1387 sortkey_sn(char *buf, int reverse, scf_walkinfo_t *wip)
1389 sortkey_state(buf, reverse, wip);
1390 sortkey_nstate(buf + 1, reverse, wip);
1415 sprint_sta(char **buf, scf_walkinfo_t *wip)
1422 if (wip->pg == NULL)
1423 get_restarter_string_prop(wip->inst, scf_property_state,
1430 if (wip->pg == NULL && !opt_nstate_shown && transitioning(wip->inst))
1440 sprint_nsta(char **buf, scf_walkinfo_t *wip)
1446 if (wip->pg == NULL)
1447 get_restarter_string_prop(wip->inst, scf_property_next_state,
1466 sprint_fmri(char **buf, scf_walkinfo_t *wip)
1472 if (wip->pg == NULL) {
1473 if (scf_instance_to_fmri(wip->inst, fmri_buf,
1478 if (pg_get_single_val(wip->pg, SCF_LEGACY_PROPERTY_NAME,
1500 sortkey_fmri(char *buf, int reverse, scf_walkinfo_t *wip)
1504 sprint_fmri(&tmp, wip);
1514 sprint_scope(char **buf, scf_walkinfo_t *wip)
1520 assert(wip->scope != NULL);
1522 if (scf_scope_get_name(wip->scope, scope_buf, max_scf_name_length) < 0)
1534 sortkey_scope(char *buf, int reverse, scf_walkinfo_t *wip)
1538 sprint_scope(&tmp, wip);
1546 sprint_service(char **buf, scf_walkinfo_t *wip)
1552 if (wip->pg == NULL) {
1553 if (scf_service_get_name(wip->svc, svc_buf,
1557 if (pg_get_single_val(wip->pg, "name", SCF_TYPE_ASTRING,
1578 sortkey_service(char *buf, int reverse, scf_walkinfo_t *wip)
1582 sprint_service(&tmp, wip);
1591 sprint_instance(char **buf, scf_walkinfo_t *wip)
1597 if (wip->pg == NULL) {
1598 if (scf_instance_get_name(wip->inst, tmp,
1615 sortkey_instance(char *buf, int reverse, scf_walkinfo_t *wip)
1619 sprint_instance(&tmp, wip);
1638 sprint_stime(char **buf, scf_walkinfo_t *wip)
1648 if (wip->pg == NULL) {
1649 r = get_restarter_time_prop(wip->inst,
1652 r = pg_get_single_val(wip->pg, SCF_PROPERTY_STATE_TIMESTAMP,
1695 sortkey_stime(char *buf, int reverse, scf_walkinfo_t *wip)
1700 if (wip->pg == NULL)
1701 r = get_restarter_time_prop(wip->inst,
1704 r = pg_get_single_val(wip->pg, SCF_PROPERTY_STATE_TIMESTAMP,
1731 sprint_zone(char **buf, scf_walkinfo_t *wip)
1760 sortkey_zone(char *buf, int reverse, scf_walkinfo_t *wip)
1764 sprint_zone(&tmp, wip);
2037 detailed_list_processes(scf_walkinfo_t *wip)
2044 if (get_restarter_count_prop(wip->inst, scf_property_contract, &c,
2048 if (instance_processes(wip->inst, wip->fmri, &pids, &n) != 0)
2209 print_application_properties(scf_walkinfo_t *wip, scf_snapshot_t *snap)
2236 if (scf_iter_instance_pgs_typed_composed(pg_iter, wip->inst, snap,
2256 if (scf_tmpl_get_by_pg_name(wip->fmri, snap_name, pg_name_buf,
2417 print_detailed(void *unused, scf_walkinfo_t *wip)
2437 assert(wip->pg == NULL);
2450 if (scf_instance_to_fmri(wip->inst, buf, max_scf_fmri_length + 1) != -1)
2456 if (inst_get_single_val(wip->inst, SCF_PG_TM_COMMON_NAME, locale,
2461 else if (inst_get_single_val(wip->inst, SCF_PG_TM_COMMON_NAME, "C",
2476 perm = instance_enabled(wip->inst, B_FALSE);
2477 temp = instance_enabled(wip->inst, B_TRUE);
2497 if (scf_instance_get_pg(wip->inst, SCF_PG_RESTARTER, rpg) != 0) {
2543 if (inst_get_single_val(wip->inst, SCF_PG_GENERAL,
2557 restarter_ret = ctids_by_restarter(wip, &c, 1, 0,
2562 wip->fmri);
2619 snap = get_running_snapshot(wip->inst);
2621 if (scf_iter_instance_pgs_typed_composed(pg_iter, wip->inst, snap,
2633 detailed_list_processes(wip);
2637 print_application_properties(wip, snap);
2646 print_log(void *unused, scf_walkinfo_t *wip)
2654 if (scf_instance_get_pg(wip->inst, SCF_PG_RESTARTER, rpg) != 0) {
2885 print_notify(void *unused, scf_walkinfo_t *wip)
2887 if (strcmp(SCF_INSTANCE_GLOBAL, wip->fmri) == 0 ||
2888 strcmp(SCF_NOTIFY_PARAMS_INST, wip->fmri) == 0)
2891 print_notify_fmri(wip->fmri);
2901 add_processes(scf_walkinfo_t *wip, char *line, scf_propertygroup_t *lpg)
2907 if (instance_processes(wip->inst, wip->fmri, &pids, &n) != 0)
2970 list_instance(void *unused, scf_walkinfo_t *wip)
2987 if (wip->pg != NULL)
2992 if (inst_get_single_val(wip->inst, SCF_PG_GENERAL,
3017 if (wip->pg == NULL && ht_buckets != NULL && ht_add(wip->fmri)) {
3026 columns[opt_columns[i]].sprint(&lp->str, wip);
3036 lp->str = add_processes(wip, lp->str, wip->pg);
3044 columns[j].get_sortkey(cp, opt_sort[i] & ~0xff, wip);
3057 list_if_enabled(void *unused, scf_walkinfo_t *wip)
3059 if (wip->pg != NULL ||
3060 instance_enabled(wip->inst, B_FALSE) == 1 ||
3061 instance_enabled(wip->inst, B_TRUE) == 1)
3062 return (list_instance(unused, wip));
3075 list_svc_or_inst_fmri(void *complain, scf_walkinfo_t *wip)
3082 fmri = safe_strdup(wip->fmri);
3088 wip->fmri);
3103 "service or instance.\n"), wip->fmri);
3109 if (scf_handle_decode_fmri(h, wip->fmri, wip->scope, wip->svc,
3110 wip->inst, NULL, NULL, 0) != SCF_SUCCESS) {
3117 wip->fmri);
3121 return (list_instance(NULL, wip));
3125 if (scf_handle_decode_fmri(h, wip->fmri, wip->scope, wip->svc, NULL,
3132 wip->fmri);
3143 if (scf_iter_service_instances(iter, wip->svc) != SCF_SUCCESS)
3152 save = wip->fmri;
3153 wip->fmri = fmri;
3154 while ((ret = scf_iter_next_instance(iter, wip->inst)) == 1) {
3155 if (scf_instance_to_fmri(wip->inst, fmri,
3158 (void) list_instance(NULL, wip);
3161 wip->fmri = save;
3178 walk_dependencies(scf_walkinfo_t *wip, scf_walk_callback callback, void *data)
3185 assert(wip->inst != NULL);
3191 snap = get_running_snapshot(wip->inst);
3193 if (scf_iter_instance_pgs_typed_composed(iter, wip->inst, snap,
3247 wip->fmri = dep;
3248 if (callback(data, wip) != 0)
3264 list_dependencies(void *data, scf_walkinfo_t *wip)
3266 walk_dependencies(wip, list_svc_or_inst_fmri, data);
3284 check_against_provider(void *arg, scf_walkinfo_t *wip)
3290 cfmri = safe_strdup(wip->fmri);
3319 list_if_dependent(void *unused, scf_walkinfo_t *wip)
3324 (void) walk_dependencies(wip, check_against_provider, &match);
3327 return (list_instance(unused, wip));
3334 list_dependents(void *unused, scf_walkinfo_t *wip)
3339 if (scf_scope_get_name(wip->scope, provider_scope,
3341 scf_service_get_name(wip->svc, provider_svc,
3346 if (wip->inst == NULL)
3348 else if (scf_instance_get_name(wip->inst, provider_inst,