lkml.org 
[lkml]   [2022]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tracing: Use strim() to remove whitespace instead of doing it manually
On Fri, 21 Jan 2022 09:56:23 +0000
Yuntao Wang <ytcoode@gmail.com> wrote:

> The tracing_set_trace_write() function just removes the trailing whitespace
> from the user supplied tracer name, but the leading whitespace should also
> be removed.
>
> In addition, if the user supplied tracer name contains only a few
> whitespace characters, the first one will not be removed using the current
> method, which results it a single whitespace character left in the buf.
>
> To fix all of these issues, we use strim() to correctly remove both the
> leading and trailing whitespace.
>
> Signed-off-by: Yuntao Wang <ytcoode@gmail.com>

Added to my queue.

Thanks,

-- Steve

\
 
 \ /
  Last update: 2022-05-24 19:30    [W:0.024 / U:1.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site