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 [email protected] https://lists.sourceforge.net/lists/listinfo/owfs-developers
