Mail Archives: djgpp-workers/2000/12/27/02:55:21
On Wed, 27 Dec 2000, Tim Van Holder wrote:
> > The above just passes the name of the file, not the directory where it
> > ``lives''.
> Hmm. I thought that an fsext_open hook got the name as passed to open().
It does.
Did you plan to have fsext_open hook be the place where these fake
entries are registered?
> If not, how would the /dev/zero support know it's being asked for
> /dev/zero and not d:/my/favorite/numbers/zero?
The case of "d:/my/favorite/numbers/zero" is easy, but what about
"d:/dev/zero"?
> Without fsext_entry, I'd need to rely solely on num_read, leading to:
>
> num_read < need_fake_dot_dotdot ?
> => return fake . or ..
> otherwise ?
> => idx = num_read - need_fake_dot_dotdot
> for (i = 0; i < idx; ++i)
> if (fsext_entries[i] == NULL)
> break;
> }
Why isn't fsext_entries[num_read - need_fake_dot_dotdot] good enough?
Since num_read never gets past the NULL entry in fsext_entries[], you
don't need the above loop and other complications.
- Raw text -