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

Re: ls /dev



Am Don, 27 Jul 2000 23:37:04 Tomasz Wegrzanowski Sie:
> Can it be changed ?

No, and there is no need to.

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

mc stat()s all files, which is horrible slow even on linux, when
no translators are involved.

mc does not support all the nifty Hurd file system features, so
its behaviour is not optimal here. You really want to have mc
check for a translator and optionally show either the translator 
setting,
or the usual stat() info.
 
> What about dividing stat() to stat_trivial() and stat_complete()

There is no stat_trivial. It just doesn't make sense. What information
could stat_trivial provide, except whart can be found already in dirent?

> 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).

There are no reasonable defaults, and what you propose is a jolly mess.
You need to decide if you want the stat() info or not, and if you want 
it,
you need to stat() the file, and the translator comes up, or you
can check if it is a translator, and not stat(), and just give the
passive or active translator setting (see showtrans).

> 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')

Linux proc never gives correct answers. We can't do this mistake, 
because
we rely on translators in the whole system.

But it is a good idea to make mc aware of Hurd features indeed.

You really have not swallowed the translator concept by heart. :)
Only when you realize that there can't be any difference between a
translator and a regular file in the POSIX interface, you will see
why what the Hurd does is very sensible.

For example, try:

ln -s a b
showtrans b

Thanks,
Marcus



Reply to: