Linux-kernel mailing list archive 2000-29,: Re: devfs question

# Re: devfs question

Forever shall I be. (zinx@linuxfreak.com)
Wed, 19 Jul 2000 11:17:40 -0500 (CDT)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Andrew McNabb: "Resetting the Tx ring pointer"
- Previous message: Frank Jacobberger: "linux-2.4.0-test2 - Timeout pc_keyb.c file"

Khimenko Victor wrote:

>
>
> On Tue, 18 Jul 2000, Richard Gooch wrote:
>
> > Andrew Pimlott writes:
> > > On Tue, Jul 18, 2000 at 06:20:07PM -0400, Richard Gooch wrote:
> > > > Andrew Pimlott writes:
> > > > > Perhaps best to look for a purely numerical last component, and in
> > > > > that case take the last two components.
> > > >
> > > > That would break the old names. "/dev/tty1" would not match to "tty1".
> > >
> > > I'm sorry, I meant fall back to the old logic if the last component
> > > of the path is not purely numerical.
> >
> > You mean if all characters after the last '/' are numeric, match on
> > the last two path components?
> > Yeah, I guess that would work. It seems a little hacky, but then again
> > so are the other solutions.
> >
> In fact I think it's pretty good solution :-) You need ability to
> distingush /dev/pts/0 , /dev/vc/0 and [perhaps] /devfs/x/y/z/0 or
> /usb/A/B/C/0 while retaining compatibility with old scheme (where
> /dev/tty1 is just tty1 ). It works:
>
> /dev/tty1 => tty1
> /dev/pts/0 => pts/0
> /dev/vc/0 => vc/0
> /devfs/x/y/z/0 => /devfs/x/y/z/0
> /usb/A/B/C/0 => /usb/A/B/C/0
>
> All is pretty clear: if your device is in /dev then strip /dev and use
> path relative to /dev, if not - use full name. To me it looks better then
> any other scheme (it's possible to make a clash if you'll create
> /dev/devfs/x/y/z/0 AND you'll use /dev//devfs/x/y/z/0 in inittab; in this
> situation answer is simple: DON'T DO IT! And if you are using full
> canonical pathnames clash is not possible anymore with ANY structure of
> device names).
>

Maybe I'm not seeing something here, but wouldn't it be better to just not
chomp the path at all? i.e.

/dev/tty1 -> /dev/tty1
/dev/vc/0 -> /dev/vc/0

and perhaps just compare the last characters of the names listed in
securetty, for compatibility..

    --
    Zinx Verituse <zinx@linuxfreak.com>
    gpg (id 921B1558) (fp 5746 73A1 2184 A27A 9EC0  EDCC E132 BCEF 921B 1558)

    -
    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.tux.org/lkml/

- Next message: Andrew McNabb: "Resetting the Tx ring pointer"
- Previous message: Frank Jacobberger: "linux-2.4.0-test2 - Timeout pc_keyb.c file"