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

From: Geert Uytterhoeven
Date: Thu Oct 07 2004 - 03:20:48 EST


On Wed, 6 Oct 2004, Thayne Harbaugh wrote:
> On Wed, 2004-10-06 at 21:23 +0200, Jörn Engel wrote:
> > On Wed, 6 October 2004 11:19:58 -0700, Greg KH wrote:
> > > On Wed, Oct 06, 2004 at 08:04:21PM +0200, J?rn Engel wrote:
> > > > On Wed, 6 October 2004 10:38:23 -0700, Greg KH wrote:
> > > > >
> > > > > Your printk() calls need the proper KERN_* level.
> > > >
> > > > As does the original one. Which one would you like for both?
> > >
> > > KERN_WARNING perhaps?
> >
> > As in the patch below?
> >
> > > > > usually do not have a /dev/null this early in the boot process). Does
> > > > > this mean we should add a /dev/null to the initramfs image, like the
> > > > > /dev/console node we currently have there?
> > > >
> > > > Yes, that would fix the case. Is this a problem?
> > >
> > > I don't have a problem with doing that.
> >
> > Then please do so. :)
>
> Take your pick:
>
> This depends on the initramfs from file patch that is in the mm tree:

[ patch deleted ]

This fixes the standard initamfs. But it still allows you to have a root file
system without /dev/console or /dev/null.

What about letting the kernel open the console without going through
/dev/console? Since the kernel knows /dev/console is the device with major 5
minor 1, why can't it just open (5, 1)? Then we don't need a /dev/console node,
and things will never break.

Same for /dev/null as a fallback.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

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