Thread (3 messages) 3 messages, 3 authors, 2012-07-23

Re: st_size of a symlink

From: Richard Weinberger <richard@nod.at>
Date: 2012-07-23 22:07:52
Also in: linux-fsdevel, lkml

On 23.07.2012 22:47, Jesper Juhl wrote:
quoted
Fix it _how_?
By returning the size as the number of bytes in the name the link is
currently pointing at.
This is not easy.
procfs has no clue where the link pointing at.
The information is generated while accessing the link.
tmpfs on the other hand has this information because symlinks get only 
changed through tmpfs...
quoted
  By retrying readlink() with bigger buffer.
With procfs there's just a few more ways the readlink() output can
change, that's all.
Still not a good reason to just return 0 IMHO.
IMHO the lstat() and readlink() manpages have to be more precise about 
st_size.

Thanks,
//richard
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help