Re: Flexible Console open (really little patch)

Dave Cinege (dcinege@psychosis.com)
Thu, 20 Aug 1998 22:22:07 -0400


Richard Gooch wrote:
>
> Dave Cinege writes:
> > Richard Gooch wrote:
> > > >
> > > > I don't think so. It solves a problem at a very easy way and does not
> > > > hurt anyone. We support a few paths for the init program - why don't
> > > > be flexible with the path of /dev/console? (Specialy if there is a good
> > > > reason for: it's possible that /dev will be mounted later from a boot
> > > > script.)
> >
> > How about a console= line passed by the boot loader?
> >
> > > As Matti has pointed out, you can have /dev/console sitting on your
> > > root device for use before devfs is mounted.
> >
> > Not if /dev does not exist, the exact problem I ran into with LRP,
> > which creates /dev/ from /linuxrc.
>
> Well, your initrd boot scripts could just create /dev/console for
> you.

They do. The problem was /dev/tty1 did not exists to allow /linuxrc
to execute. The solution, though ugly, was to keep a special file on the root,
and have do_linuxrc look for this instead of something in dev.

> However, there is a better solution to this: replace the call to
> open(2) in init/main.c with code that allocates a file and calls
> chrdev_open() directly. That way, even if /dev/console doesn't exist
> on a non-devfs system, there are no problems.

I wanted to do something like that at the time. Couldn't get it working
right.

-- 
http://www.psychosis.com/emc/		Elite MicroComputers   732-541-4214
http://www.linuxrouter.org/             Linux Router Project

I am a regex s/retard/student/. Pray. There is hope.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html