Messages in this thread | | | Date | Wed, 18 Mar 2020 11:06:00 +0100 | From | Peter Zijlstra <> | Subject | Re: [PATCH v2 16/19] objtool: Implement noinstr validation |
| |
On Wed, Mar 18, 2020 at 10:03:09AM +0100, Peter Zijlstra wrote: > On Tue, Mar 17, 2020 at 04:00:08PM -0500, Josh Poimboeuf wrote: > > On Tue, Mar 17, 2020 at 06:02:50PM +0100, Peter Zijlstra wrote:
> > > @@ -46,5 +49,9 @@ int cmd_check(int argc, const char **arg > > > > > > objname = argv[0]; > > > > > > + s = strstr(objname, "vmlinux.o"); > > > + if (s && !s[9]) > > > + vmlinux = true; > > > + > > > > I think this would be slightly cleaner: > > > > if (!strcmp(basename(objname), "vmlinux.o")) > > vmlinux = true; > > Ah, indeed. I totally forgot userspace coding it seems..
Of course that doesn't compile... someone went overboard with const.
For some obscure reason, the stupid thing even thinks that:
note: expected ‘const char **’ but argument is of type ‘char **’
is a warning and then -Werror's on it. That's bloody insane.
| |