Linux-kernel mailing list archive 1999-23,: Re: Devfs, was Re: Migrating to larger numbers

# Re: Devfs, was Re: Migrating to larger numbers

CaT (cat@zip.com.au)
Wed, 9 Jun 1999 14:29:12 +1000

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Richard Gooch: "Re: Devfs, was Re: Migrating to larger numbers"
- Previous message: Jamie Lokier: "Re: Devfs, was Re: Migrating to larger numbers"
- In reply to: Richard Gooch: "Re: Devfs, was Re: Migrating to larger numbers"
- Next in thread: Cyrille Chepelov: "Re: Devfs, was Re: Migrating to larger numbers"

On Wed, Jun 09, 1999 at 02:22:16PM +1000, Richard Gooch wrote:
> Jamie Lokier writes:
> > Richard Gooch wrote:
> > > if all your CD-ROMs devices are unloaded and you have module
> > > autoloading, then to find all CD-ROMs on the system, you just do:
> > > opendir ("/dev/ide/cd");
> > > loop;
> > > opendir ("/dev/sr");
> > > loop;
> > >
> > > and your directory scanning code knows that each and every entry
> > > (besides "." and "..":-) is a Genuine CD-ROM[tm] that actually exists
> > > on your system.
> >
> > Ugh, it will miss the _other_ CD-ROMs in your system.
> >
> > /dev/parport/cd
> > /dev/pcmcia/cd
> > /dev/usb/cd
> >
> > Doesn't look like the right way to me.
>
> It is the right way. The concept is still valid. Just extend my
> example code. It wasn't meant to be complete, just enough to convey
> the idea. Did I really have to spell that out?
>
> Also, I expect that a PCMCIA CD-ROM will really be an IDE CD-ROM. A
> parport CD-ROM will probably be either IDE or SCSI.

Out of curiosity, why not also have the reverse? since it's a virtual
device it can be done automatically and then if you want a cd you can
open /dev/cd/ (or something similar) and go through anything in there.
That way you don't have to guess at the possible ways of connecting a
cd to the machine when you want to find them all.

    --
    CaT (cat@zip.com.au)                    URL: http://zipper.zip.com.au/dev/null

    -
    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: Richard Gooch: "Re: Devfs, was Re: Migrating to larger numbers"
- Previous message: Jamie Lokier: "Re: Devfs, was Re: Migrating to larger numbers"
- In reply to: Richard Gooch: "Re: Devfs, was Re: Migrating to larger numbers"
- Next in thread: Cyrille Chepelov: "Re: Devfs, was Re: Migrating to larger numbers"