Re: [PATCH] Clean up old names in tty code to current names

Jon Smirl
2006-07-10T15:55:08Z

On 7/10/06, Antonino A. Daplas <adaplas@gmail.com> wrote:
> Alan Cox wrote:
> > Ar Llu, 2006-07-10 am 10:57 -0400, ysgrifennodd Jon Smirl:
> >>> A few apps do rely on /proc/tty/drivers for the major-minor
> >>> to device name mapping. /dev/vc/0 does not exist (unless
> >>> created manually) without devfs.
> >> This is why I questioned if /proc/tty was really in use, it contains
> >> an entry that is obviously wrong for my system.
> >
> > Which tools already know about.
>
> True. I see this code snippet many times:

BSD has /dev/vc/0 right? I suspect that code is there to support BSD
and make the app portable.

As far as I know the only time Linux has ever had /dev/vc/0 was during
the brief excursion into devfs land. At that time /proc/tty/drivers
was modified to support devfs. But now devfs has been removed and the
device has reverted back to tty0. But /proc/tty/drivers wasn't
adjusted for devfs removal.

> fd = open("/dev/vc/0", FLAGS);
> if (fd == -1)
> fd = open("/dev/tty0", FLAGS);
>
> > What is so hard to understand about the
> > idea that pointless random changes break stuff and don't fix things.
>
> But since we're killing devfs, changing /dev/vc/0 to /dev/tty0 will be one
> of the nails in devfs' coffin :-)
>
> Tony
>

--
Jon Smirl
jonsmirl@gmail.com