Re: [PATCH] Console: fall back to /dev/null when no console is availlable

Geert Uytterhoeven
2004-10-06T14:24:18Z

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1979 bytes --]

On Wed, 6 Oct 2004, [iso-8859-1] Jörn Engel wrote:
> On Wed, 6 October 2004 15:55:52 +0200, Geert Uytterhoeven wrote:
> > > Having a non-working console, esp. for debug, is a rather odd design.
> > > My approach would be to either explicitly tell the kernel to use the
> > > other as default console via "console=/dev/ttyS0" or not have the
> > > debug thing in the kernel in the first place. Either way, no patch is
> > > needed.
> >
> > It was not `designed' to be that way. But due to how `the console' (nr. 2 from
> > above) works, registration order matters. If people make the mistake (or just
> > forget) to say `console=ttyS0', a debug console registered later causes
> > problems.
> >
> > And the reason the debug consoles (read: capturers) use register_console() is
> > to avoid code duplication.
>
> Which is fair. So we end up with two devices claiming to be a valid
> console, but one of them makes people unhappy. Are you certain that
> *everone* wants to have 'ttyS0' as default console and not 'debug'?

Ehrm, what do you mean with `default' console?

If you mean `console as defined under nr.2', yes, you want the console that
does do input.

> Taking the last one registered is basically random. If people care
> enough, they should explicitly state things on the command line.

No, it's not. It's explicitly mentioned in the docs: if you use multiple
`console=', all of them get output, but input comes from the last one.

> Taking the last with input support (or the last, if none support
> input) adds some policy. If people disagree with the kernel policy,
> they should explicitly state things...

Calling it `policy' may be a bit too strict...

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds