[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ls /dev



On Thu, Jul 27, 2000 at 04:06:10PM +0200, Marcus Brinkmann wrote:
> On Thu, Jul 27, 2000 at 03:34:17PM +0200, Juli-Manel Merino Vidal wrote:
> > Hi all,
> > 
> > when doing an 'ls /dev', hurd starts automatically each transator of
> > each device file. Why?
> > This produces a delay before the directory contents is shown.
> 
> Because your ls is really an alias, and you are using
> the -F or -l option, or some other option which calls
> stat() on each file in the dir.
> 
> stat() requires a lot of information from the inode (file size,
> ownership, permissions, etc) beside the file name. Those informations
> are provided by the translator, not by the underlying node directly.
> 
> So, all translators have to start up. You asked them to do :)
> 
> Marcus

Can it be changed ?
I find it very anoying that when I go to /mnt from mc,
Hurd tries to mount all my disks, CD and floppy.

What about dividing stat() to stat_trivial() and stat_complete()
or use some stat() flags (how to pass them ?) or (most complete solution)
use per-file (inode ?) flag that states that file can't be fully statable,
and not fully stat() it on common stat() request (so we have reasonable default),
and make some stat_force() (so we have way to override it).

It would be much better that both Linux way (give out only trivial data,
check 'ls -l proc' to see) and current Hurd way (mount everything,
check 'ls -l /mnt')



Reply to: