What is the expected value of st_nlink - should it include the number of
dirs in sub-dirs as well.
That doesn't sound right to me.

Once a directory is enumerated, the number of sub-dirs is known and
contained in a linked list.
Iterating that list to count the sub-dirs should be trivial.

I also noticed a FILLER("."), and FILLER(".."), but couldn't decide if
perhaps these should be treated differently than they are now.
After all . is supposed to be a link to CWD and .. is supposed to link to
the parent.





|---------+------------------------------------------->
|         |           Christian Magnusson             |
|         |           <[EMAIL PROTECTED]|
|         |           m>                              |
|         |           Sent by:                        |
|         |           [EMAIL PROTECTED]|
|         |           ceforge.net                     |
|         |                                           |
|         |                                           |
|         |           16/04/2005 02:10                |
|         |           Please respond to               |
|         |           owfs-developers                 |
|         |                                           |
|---------+------------------------------------------->
  
>-------------------------------------------------------------------------------------------------------------|
  |                                                                             
                                |
  |       To:       owfs-developers <owfs-developers@lists.sourceforge.net>     
                                |
  |       cc:                                                                   
                                |
  |       Subject:  RE: [Owfs-developers] OWFS and FUSE Debugging with UML      
(UserMode   Linux)              |
  
>-------------------------------------------------------------------------------------------------------------|





I have made some more tests with calculating the st_nlink in FS_fstat().
If you define CALC_NLINK in ow_fstat.c it will look somewhat better,
but it's harder to calculate number of dirs in all devices, and in
sub-directories.

Root directory with entries are almost working.

Device 02.* has two subdirectories (pages/ settings/) and therefor
st_nlink is 4.
Device 10.* only contain files, and st_nlink is 2.
Separate calculation has to be made for all other special directories
such as alarm, system, etc...  Haven't looked at that yet.

BTW: Found a bug where pnnext.si.sg wasn't set to pn->si.sg in all
FS_*_seek() functions. That made the second adapter loose the
temperature-scale and cache settings from the calling owfs.

What do you think about it... Should we try to complete the
st_nlink calculation for all directories? I've checked in the changes
so you can look at it.


/Christian


[EMAIL PROTECTED] mag]# ls -al /var/1wire/
total 4
drwxr-xr-x  17 root root    1 Apr 16 02:56 ./
drwxr-xr-x  23 root root 4096 Mar 23 16:12 ../
drwxr-xr-x   4 root root    1 Apr 16 03:00 02.F0A8C2000000/
drwxr-xr-x   2 root root    1 Apr 16 03:00 10.061847000800/
drwxr-xr-x   2 root root    1 Apr 16 03:00 10.1A9246000800/
drwxr-xr-x   2 root root    1 Apr 16 03:00 10.233B40000800/
drwxr-xr-x   2 root root    1 Apr 16 03:00 10.2BD346000800/
drwxr-xr-x   2 root root    1 Apr 16 03:00 10.4D8746000800/
drwxr-xr-x   2 root root    1 Apr 16 03:00 10.5D1947000800/
drwxr-xr-x   2 root root    1 Apr 16 03:00 10.6D0150000800/
drwxr-xr-x   2 root root    1 Apr 16 03:00 10.A22840000800/
drwxr-xr-x   2 root root    1 Apr 16 03:00 10.B3E166000800/
drwxr-xr-x   2 root root    1 Apr 16 03:00 10.E2C746000800/
drwxr-xr-x   2 root root    1 Apr 16 03:00 10.E54347000800/
drwxr-xr-x   3 root root    1 Apr 16 03:00 12.24F824000000/
drwxr-xr-x   3 root root    1 Apr 16 03:00 12.5E1A24000000/
drwxr-xr-x  17 root root    1 Apr 16 02:56 alarm/
drwxr-xr-x  17 root root    1 Apr 16 02:56 bus.0/
drwxr-xr-x   2 root root    1 Apr 16 03:00 FF.720200000100/
drwxr-xr-x  17 root root    1 Apr 16 02:56 settings/
drwxr-xr-x   2 root root    1 Apr 16 03:00 simultaneous/
drwxr-xr-x  17 root root    1 Apr 16 02:56 statistics/
drwxr-xr-x  17 root root    1 Apr 16 02:56 structure/
drwxr-xr-x  17 root root    1 Apr 16 02:56 system/
drwxr-xr-x  17 root root    1 Apr 16 02:56 uncached/





-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers




This communication is for informational purposes only. It is not intended
as an offer or solicitation for the purchase or sale of any financial
instrument or as an official confirmation of any transaction. All market prices,
data and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein 
do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries 
and affiliates



-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to