lkml.org 
[lkml]   [2012]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -mm v2] coredump: extend core dump note section to contain file names of mapped files
On 09/18, Oleg Nesterov wrote:
>
> On 09/18, Roland McGrath wrote:
> >
> > It's doubtful that rolling your own single loop actually performs better
> > than just calling strlen and memcpy.

Ah, I misread your message, sorry...

> This is needed to advance 'name' if d_path() fails with !ENAMETOOLONG.
> Probably needs a comment.
>
> Or perhaps 'filename = ""' case can handle this case itself. In this
> case we do not even need strlen(), remaining = name - filename.

Yes, but you strlen + memcpy as you suggested will work too.

Oleg.



\
 
 \ /
  Last update: 2012-09-18 20:21    [W:0.141 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site