Messages in this thread | | | Date | Wed, 6 Oct 2004 17:36:17 +0200 (MEST) | From | Geert Uytterhoeven <> | Subject | Re: [PATCH] Console: fall back to /dev/null when no console is availlable |
| |
On Wed, 6 Oct 2004, [iso-8859-1] Jörn Engel wrote: > On Wed, 6 October 2004 16:23:27 +0200, Geert Uytterhoeven wrote: > > Ehrm, what do you mean with `default' console? > > > > If you mean `console as defined under nr.2', > correct > > yes, you want the console that > > does do input. > > *I* don't always do. Remember how this thread got started? ;)
OK, so you want /dev/console to fall back to /dev/null, right?
> > > 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. > > Ah, true. I was barking up the "the was no 'console=' option, take > the default" tree. Just started looking at the console code a few > days ago.
Well, you're right that if the user specifies _no_ console= option at all, the `first one in the linked list' will be used, which is the last one registered. Usually (read: if enabled) tty0 registers automatically, and it's the only one.
Saying e.g. `console=ttyS0' causes the serial console to register itself (at the head of the list). Saying e.g. `console=tty0' afterwards causes the VT console to move back to the head of the list.
So _if_ there are multiple struct consoles activated, order (read: policy) does matter. But usually there's only one, and all others are explicitly to be enabled with console=.
Anyway, I should cook up a patch so the /dev/console demux walks the list if the one at the head of the list doesn't do input (read: it has no associated tty struct).
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 | |