Lines Matching defs:kc

65 static int kstat_network_port_state(kstat_ctl_t *kc, char *, int);
66 static int kstat_network_port_cond(kstat_ctl_t *kc, char *, int);
68 static int serial_port_cond(kstat_ctl_t *kc, char *, int);
70 static int parallel_port_cond(kstat_ctl_t *kc, char *, int);
94 kstat_ctl_t *kc = NULL;
100 if ((kc = kstat_open()) == NULL) {
103 rc = port_state[port_type](kc, driver_name, driver_instance);
104 kstat_close(kc);
119 kstat_ctl_t *kc = NULL;
124 if ((kc = kstat_open()) == NULL) {
127 rc = port_cond[port_type](kc, driver_name, driver_instance);
128 kstat_close(kc);
136 kstat_name_lookup(kstat_ctl_t *kc, char *ks_module, int ks_instance, char *name)
140 assert(kc);
144 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) {
148 kstat_read(kc, ksp, NULL) != -1 &&
151 ksp = kstat_lookup(kc, ks_module, ks_instance,
155 if (kstat_read(kc, ksp, NULL) == -1)
168 kstat_network_port_state(kstat_ctl_t *kc, char *ks_module, int ks_instance)
172 if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance,
203 kstat_network_port_cond(kstat_ctl_t *kc, char *ks_module, int ks_instance)
209 if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance,
223 if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance,
237 if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance,
251 if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance,
261 if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance,
275 if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance,
285 if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance,
298 if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance,
311 if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance,
333 serial_port_state(kstat_ctl_t *kc, char *driver, int instance)
382 serial_port_cond(kstat_ctl_t *kc, char *driver, int instance)
384 switch (serial_port_state(kc, driver, instance)) {
397 parallel_port_state(kstat_ctl_t *kc, char *ks_module, int ks_instance)
406 if ((ksp = kstat_lookup(kc, ks_module, ks_instance, ks_name)) == NULL) {
409 if (kstat_read(kc, ksp, NULL) == -1) {
425 parallel_port_cond(kstat_ctl_t *kc, char *ks_module, int ks_instance)
427 return (parallel_port_state(kc, ks_module, ks_instance));