Pathnames followed by "..." when printed using printpathn
Philippe Ombredanne
pombredanne at nexb.com
Tue May 27 06:37:48 UTC 2014
On Tue, May 27, 2014 at 5:53 AM, Zubin Mithra <zubin.mithra at gmail.com> wrote:
> Hello everyone,
>
> Currently I'm working on a means by which I can convert relative paths to
> absolute when displayed as system call arguments. Some sample output can be
> seen here[1]. Please note that the arguments passed to "execve" and "open"
> are absolute paths.
This looks good. I see you are building some tests... Will you commit these too?
> (The current implementation is just a PoC and I haven't committed anything
> yet, I'll post a link to the commit as soon as I push it in.)
This is your own repo, you can commit often!
> `printpathn` takes in an argument `n` which is the maximum number of
> characters that should be displayed in the path(followed by "...").
>
> Should this scheme be followed when displaying absolute paths too?
>
> Perhaps we could use the "..." scheme when "-yy" is used and the full path
> whenever "-yyy" is used? Does that make sense/sound good?
I cannot fathom any use case where I would want an absolute truncated
and partially printed.
So my take would be to not both with a -yyy option, not use printpathn
and _always_ print full paths, never truncate a path with ... and to
use printpath which is the function that makes sense to me.
Looking at printpathn, I am even wondering what is the real purpose
and use of this function? ;)
This is worth for you to look into this:
- Why would we need or want such a truncation?
- Is it even used to print actual real paths?
- Could this be bug to have this function being used to print anything
but a full path?
--
Cordially
Philippe Ombredanne
More information about the Strace-devel
mailing list