Messages in this thread Patch in this message | | | Date | Thu, 26 Feb 2009 13:57:28 +0100 | From | Peter Oberparleiter <> | Subject | Re: [PATCH 3/4] gcov: add gcov profiling infrastructure |
| |
Li Wei wrote: > On Thu, 2009-02-26 at 11:00 +0100, Peter Oberparleiter wrote: >> Since a few RCs have been released since the last gcov-kernel patch >> post, I'll do a full re-post with a fix similar to the one you suggested >> included. > > Thanks! It would be great if ".."s in object pathnames could also be > supported in the forth coming re-post.
Sounds reasonable. I'll add a slightly modified patch:
--- kernel/gcov/fs.c | 8 ++++++++ 1 file changed, 8 insertions(+)
Index: linux-2.6.29-rc6/kernel/gcov/fs.c =================================================================== --- linux-2.6.29-rc6.orig/kernel/gcov/fs.c +++ linux-2.6.29-rc6/kernel/gcov/fs.c @@ -502,6 +502,14 @@ static void add_node(struct gcov_info *i if (curr == next) continue; *next = 0; + if (strcmp(curr, ".") == 0) + continue; + if (strcmp(curr, "..") == 0) { + parent = parent->parent; + if (!parent) + goto out_err; + continue; + } node = get_child_by_name(parent, curr); if (!node) { node = new_node(parent, NULL, curr);
| |