sf...@users.sourceforge.net wrote:
> Joe Krahn:
>> When you do fstat() on a symlink, st_size is supposed to return the 
>> length of the stored symlink-target string, rather than the file data 
>> size. So, if you want to read the symlink string to store it in the 
> 
> No, that is wrong.
> fstat(2) for symlink doesn't return the length of the stored
> symlink-target string.
> Will you try this simple C program under an empty dir on ext2?
> It will show you the size of /etc/hosts (after some error messagees).
> 
...
Argh! My mistake! I really meant lstat(), not fstat(). Sorry.

However, I think that aufs actually got into a corrupted state where it 
returned st_size=0 for both symlinks and regular files. So, lstat(), 
fstat() and stat() all return zero. When this happens, "du" will return 
zero for a whole directory tree, but will give reasonable estimates with 
the "--apparent-size" flag.

The next time it happens, I will try to get more details.

Thanks,
Joe Krahn

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com

Reply via email to