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

Thayne Harbaugh
2004-10-06T21:49:53Z

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:

--- usr/initramfs_list.orig 2004-10-06 15:49:40.838941640 -0600
+++ usr/initramfs_list 2004-10-06 15:48:51.076506680 -0600
@@ -2,4 +2,5 @@

dir /dev 0755 0 0
nod /dev/console 0600 0 0 c 5 1
+nod /dev/null 0666 0 0 c 1 3
dir /root 0700 0 0

This is the old, hard-coded list built in to gen_init_cpio:

--- usr/gen_init_cpio.c.orig 2004-10-06 15:53:21.538390224 -0600
+++ usr/gen_init_cpio.c 2004-10-06 15:53:36.454122688 -0600
@@ -215,6 +215,7 @@
{
cpio_mkdir("/dev", 0755, 0, 0);
cpio_mknod("/dev/console", 0600, 0, 0, 'c', 5, 1);
+ cpio_mknod("/dev/null", 0600, 0, 0, 'c', 1, 3);
cpio_mkdir("/root", 0700, 0, 0);
cpio_trailer();