[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.0904211016190.2199@localhost.localdomain>
Date: Tue, 21 Apr 2009 10:31:48 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: David Woodhouse <dwmw2@...radead.org>
cc: David Brownell <david-b@...bell.net>, alan@...rguk.ukuu.org.uk,
Ingo Molnar <mingo@...e.hu>,
David VomLehn <dvomlehn@...co.com>,
Arjan van de Ven <arjan@...radead.org>,
"H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux USB Mailing List <linux-usb@...r.kernel.org>,
Linux Embedded Mailing List <linux-embedded@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: Wait for console to become available, v3.2
On Tue, 21 Apr 2009, David Woodhouse wrote:
>
> We can provide un-hooked-up /dev/console though. Rather than just
> failing to open it, why can't we make __tty_open() give you a dummy tty
> driver which is basically equivalent to /dev/null? And then 'replace' it
> with the real console driver if/when that later gets registered? The
> latter will be a high-caffeine job, but surely not impossible?
This sounds like a good option.
Right now we look through all the console_drivers at open time in that
struct tty_driver *console_device(int *index)
thing, but it should be possible to just do something like
static struct tty_driver console_driver;
and then just make "console_device()" always return _that_ tty driver
instead. Then, we could make that console_device tty driver just at
run-time spread the IO to the proper device(s), rather than fix the one
particular device at "open()" time.
[ Actually, looking closer we should not use that particular name: we
already have something called a "console_driver" which is really the
"current VT" driver.
So we should call it 'system_console_device' or something, but you
get the idea. ]
Anybody want to try it? Just make it ignore any IO if there are no
registered consoles. The patch shouldn't even be all that big, I suspect.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists