Date: Sat, 20 Oct 2018 20:53:31 +0200 From: Ed Schouten <ed@nuxi.nl> To: "Conrad E. Meyer" <cem@freebsd.org> Cc: src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r339468 - in head/sys: kern sys Message-ID: <CABh_MKmTKqCcPbfrA_9HY71GN0heKqSXh-s4ttXemjPK4GCb3Q@mail.gmail.com> In-Reply-To: <201810201831.w9KIVbtN043921@repo.freebsd.org> References: <201810201831.w9KIVbtN043921@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi there, Op za 20 okt. 2018 om 20:31 schreef Conrad Meyer <cem@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@nuxi.nl>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABh_MKmTKqCcPbfrA_9HY71GN0heKqSXh-s4ttXemjPK4GCb3Q>