lkml.org 
[lkml]   [2009]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [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);


\
 
 \ /
  Last update: 2009-02-26 13:59    [W:0.042 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site