Messages in this thread | | | Date | Tue, 18 Sep 2012 19:36:05 +0200 | From | Oleg Nesterov <> | Subject | Re: [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.
| |