lkml.org 
[lkml]   [2004]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] Console: fall back to /dev/null when no console is availlable
    On Wed, Oct 06, 2004 at 12:58:57AM +0300, Denis Vlasenko wrote:
    > > + if (open("/dev/null", O_RDWR, 0) == 0)
    > > + printk(" Falling back to /dev/null.\n");
    > > + }
    >
    > What will happen if /dev is totally empty?

    ... Which is the most probable reason causing this trouble.
    I've long wondered why the kernel could not open the /dev/console fds itself
    since they are character devices, so handled by the kernel internally. It
    should be possible to bypass the file-system access and get the fds anyway.
    Or we might need some tricks such as populate rootfs with 'console' before
    mounting root, open it, remove the entry while keeping the fd for use after
    the real root is mounted. This way, it would not be the real /dev/console
    which would be passed to init, so it would never even have to exist.

    Comments ?

    Willy

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:06    [W:4.062 / U:0.068 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site