Hi Ed,

On Sat, Oct 20, 2018 at 11:54 AM Ed Schouten <e...@nuxi.nl> wrote:
> Op za 20 okt. 2018 om 20:31 schreef Conrad Meyer <c...@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?

I think you are correct, but I did not want to investigate to confirm.
This was just the direct, conservative conversion of ttyprintf ->
putchar.  The checks can *probably* be removed.

Best regards,
Conrad
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to