| 218 | } |
| 219 | |
| 220 | static int |
| 221 | sbuf_tty_drain(void *a, const char *d, int len) |
| 222 | { |
| 223 | struct tty *tp; |
| 224 | int rc; |
| 225 | |
| 226 | tp = a; |
| 227 | |
| 228 | if (kdb_active) { |
| 229 | cnputsn(d, len); |
| 230 | return (len); |
| 231 | } |
| 232 | if (tp != NULL && !KERNEL_PANICKED()) { |
| 233 | rc = tty_putstrn(tp, d, len); |
| 234 | if (rc != 0) |
| 235 | return (-ENXIO); |
| 236 | return (len); |
| 237 | } |
| 238 | return (-ENXIO); |
| 239 | } |
| 240 | |
| 241 | #ifdef STACK |
| 242 | static int tty_info_kstacks = STACK_SBUF_FMT_COMPACT; |
nothing calls this directly
no test coverage detected