Mail Archives: djgpp/2000/12/20/04:08:15
On Tue, 19 Dec 2000, Richard Dawe wrote:
> Eli Zaretskii wrote:
> > The /dev/zero device is not part of the emulated devices. The emulated
> > devices are those which have direct DOS equivalents; /dev/zero doesn't.
> >
> > Please consider writing up a /dev/zero emulation and submitting it for
> > inclusion in a future DJGPP version.
>
> Eli, I don't know if you remember, but we discussed adding /dev/zero and
> /dev/null a while back on djgpp-workers.
Yes, I remember.
> I seem to remember it got lost in a wider discussion about extending
> the FSEXT mechanism.
It didn't get lost: I have it in my private archive of things-to-do.
However, given my current load, it's unlikely that I get to it any
time soon, since much more important (IMHO) issues are in the queue.
Volunteers are welcome.
> > > And how do I list the supported devices?
> >
> > You don't.
>
> Would it be desirable to list them?
It's desirable, yes; but the costs might be prohibitive or high enough
to warrant that we wait for a motivated volunteer.
> Should this be part of the extended FSEXT mechanism? I wonder what
> extra it would require - stat() support?
It would certainly need support in `stat', but that's not the most
problematic aspect of what Damian wanted, because `stat' already
supports all emulated devices (try "ls -l /dev/tty" and you will see),
and yet "ls /dev" still didn't work.
For "ls /dev" to work, we will need the following:
- emulate /dev as if it were an existing directory (e.g., `stat'
should return the appropriate bits for it);
- introduce support for emulated devices into opendir and readdir,
so that they return these names as if they were present in /dev;
- add to the glob function support for these devices, so that
something like "ls /dev/*" does what you'd expect.
I'm probably missing some additional aspects, since the above is a
product of a 10-second thought. I'm sure that whoever begins to work
on this will quickly find out the rest ;-)
- Raw text -