On Sun, Jan 29, 2012 at 09:26:26PM +0100, Denys Vlasenko wrote:
> On 01/28/2012 01:38 AM, Dmitry V. Levin wrote:
> > On Fri, Jan 27, 2012 at 04:27:32PM +0000, Denys Vlasenko wrote:
> > [...]
> >> commit 3449ae83c26d159dddc8573dc22b867feb0f49c6
> >> Author: Denys Vlasenko<[email protected]>
> >> Date:   Fri Jan 27 17:24:26 2012 +0100
> >>
> >>      Fix readlink result display - was printing bogus "..." semi-randomly
> >>
> >>      * file.c (decode_readlink): Use printstr() instead of printpathn().
> >
> > Another difference between printstr() and printpathn() is that printstr's
> > output is limited to the maximum string size limit specified by -s option
> > (the default is 32).  If readlink's result should be considered the same
> > way as file names, then it shouldn't be subject to this limit.
> 
> One possible way to achieve this is to add a flag variable to printpathn()
> which would prevent "..." from printing even if NUL is not found.
> 
> Do you want this fix?
> Have better idea?

The value returned by readlink(2) is arbitrary string.  It may be a file
name, and it may be not.  I'm aware of a system where symlinks are used
as a configuration storage with very fast access mechanism: only one
syscall is necessary to fetch the value of one configuration parameter.
That is, I'm inclined to treat readlink result as an arbitrary string
rather than a file name.

So, while the change in behaviour might be an unintentional one, on second
thought it seems to be desirable.


-- 
ldv

Attachment: pgpScKHn7Jxyv.pgp
Description: PGP signature

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to