Lines Matching refs:wip

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