MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sbuf_tty_drain

Function sbuf_tty_drain

freebsd/kern/tty_info.c:220–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218}
219
220static int
221sbuf_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
242static int tty_info_kstacks = STACK_SBUF_FMT_COMPACT;

Callers

nothing calls this directly

Calls 2

cnputsnFunction · 0.85
tty_putstrnFunction · 0.85

Tested by

no test coverage detected