Re: ls /dev
On Sat, Jul 29, 2000 at 08:53:51AM +0300, Kalle Olavi Niemitalo wrote:
> Tomasz Wegrzanowski <maniek@beer.com> writes:
>
> > Users usually don't want UI app to provide them with informations,
> > that, although quite useful, would make them have to wait awfully
> > lot of time.
>
> Instead of stat_trivial(), would an asynchronous stat() do the
> job? An interactive application could stat all files in a
> directory, and deliver the data to the screen as it comes in.
> And the user wouldn't have to wait at all. For noninteractive
> things like ls, there could be a timeout.
>
> This is already doable with io_stat_request, I think.
I have hard time imagining how program can request inforamtion
in non-blocking way without very much magic.
Even harder to imagining how non-interactive program can do it.
Anyway, this magic would be even more useful to save bandwidth
(if you entered /ftp/sunsite/pub/, UI wouldn't try to get file counts
in all dirs) and CPU (mc ; cd /fortunefs/ ; cat ./short :: mc shouldn't
try stating them all just to see one-time sizes).
> > Remember that every node is translated. It might be per-file translator
> > or per-dirtree translator, but every node is translated anyway.
>
> If there's no underlying node, I wouldn't call that translation.
Translator might be already called, only provide samo files statically,
while others dynamicaly.
+++
I don't see any other way, only per-file flag. Aditional byte in
struct dirent { char d_flag; } could be good to do it.
Reply to:
- References:
- Re: ls /dev
- From: Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>
- Re: ls /dev
- From: Tomasz Wegrzanowski <maniek@beer.com>
- Re: ls /dev
- From: Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>
- Re: ls /dev
- From: Tomasz Wegrzanowski <maniek@beer.com>
- Re: ls /dev
- From: Kalle Olavi Niemitalo <tosi@stekt.oulu.fi>