svn commit: r339468 - in head/sys: kern sys

Ed Schouten ed at nuxi.nl
Sat Oct 20 18:53:59 UTC 2018


Hi there,

Op za 20 okt. 2018 om 20:31 schreef Conrad Meyer <cem at freebsd.org>:
> +static int
> +sbuf_tty_drain(void *a, const char *d, int len)
> +{
> +       struct tty *tp;
> +       int rc;
> +
> +       tp = a;
> +
> +       if (kdb_active) {
> +               cnputsn(d, len);
> +               return (len);
> +       }
> +       if (tp != NULL && panicstr == NULL) {
> +               rc = tty_putstrn(tp, d, len);
> +               if (rc != 0)
> +                       return (-ENXIO);
> +               return (len);
> +       }
> +       return (-ENXIO);
> +}

Disclaimer: Long time since I did a lot with the TTY code.

Can kdb_active, tp == NULL and panicstr != NULL even occur in this
case? tty_info() can only get called in non-degenerate cases, right?

-- 
Ed Schouten <ed at nuxi.nl>


More information about the svn-src-head mailing list