Re: [PATCHv2.5] trace: reuse kbasename() functionality
From: Andy Shevchenko
Date: Fri Oct 05 2012 - 13:02:28 EST
On Fri, Oct 5, 2012 at 7:49 PM, Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> On Wed, 2012-10-03 at 11:53 +0300, Andy Shevchenko wrote:
>> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
>> Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
>> Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
>> ---
>> kernel/trace/trace_uprobe.c | 8 ++++----
>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c
>> index 03003cd..c7ba4f6 100644
>> --- a/kernel/trace/trace_uprobe.c
>> +++ b/kernel/trace/trace_uprobe.c
>> @@ -22,6 +22,7 @@
>> #include <linux/uaccess.h>
>> #include <linux/uprobes.h>
>> #include <linux/namei.h>
>> +#include <linux/string.h>
>>
>> #include "trace_probe.h"
>>
>> @@ -263,16 +264,15 @@ static int create_trace_uprobe(int argc, char **argv)
>>
>> /* setup a probe */
>> if (!event) {
>> - char *tail = strrchr(filename, '/');
>> + char *tail;
>> char *ptr;
>>
>> - ptr = kstrdup((tail ? tail + 1 : filename), GFP_KERNEL);
>> - if (!ptr) {
>> + tail = kstrdup(kbasename(filename), GFP_KERNEL);
>
> I don't see kbasename() anywhere. Is this based off of other patches?
It's introduced by first patch in the series.
--
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/