lkml.org 
[lkml]   [2020]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] objtool: Rename elf_read() to elf_open_read()

* Peter Zijlstra <peterz@infradead.org> wrote:

> On Wed, Apr 22, 2020 at 12:32:04PM +0200, Ingo Molnar wrote:
> > 'struct elf *' handling is an open/close paradigm, make sure the naming
> > matches that:
> >
> > elf_open_read()
> > elf_write()
> > elf_close()
>
>
> > diff --git a/tools/objtool/check.c b/tools/objtool/check.c
> > index f2a84271e807..12e2aea42bb2 100644
> > --- a/tools/objtool/check.c
> > +++ b/tools/objtool/check.c
> > @@ -2614,7 +2614,7 @@ int check(const char *_objname, bool orc)
> >
> > objname = _objname;
> >
> > - file.elf = elf_read(objname, orc ? O_RDWR : O_RDONLY);
> > + file.elf = elf_open_read(objname, orc ? O_RDWR : O_RDONLY);
>
> Note that I have a patch pending that makes that unconditionally O_RDWR,
> which sort of seems to suggest elf_open() might be the better name.

Ok, done!

Thanks,

Ingo

\
 
 \ /
  Last update: 2020-04-22 16:23    [W:0.062 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site