Message ID | 20200306075934.3104-2-lucas.demarchi@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] depmod: do not output .bin to stdout | expand |
On Thu, Mar 05, 2020 at 11:59:34PM -0800, Lucas De Marchi wrote: > For all the other indexes what we do is to add a .bin to the original > filename to denote it's the indexed version of that file. It was > kernel's decision to name it modules.builtin.modinfo, so respect that. > > Fix: b866b2165ae6 ("Lookup aliases in the modules.builtin.modinfo") > --- > tools/depmod.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tools/depmod.c b/tools/depmod.c > index 875e314..fe1c54d 100644 > --- a/tools/depmod.c > +++ b/tools/depmod.c > @@ -2402,7 +2402,7 @@ static int output_devname(struct depmod *depmod, FILE *out) > return 0; > } > > -static int output_builtin_alias_bin(struct depmod *depmod, FILE *out) > +static int output_builtin_modinfo_bin(struct depmod *depmod, FILE *out) > { > int ret = 0, count = 0; > struct index_node *idx; > @@ -2482,7 +2482,7 @@ static int depmod_output(struct depmod *depmod, FILE *out) > { "modules.symbols", output_symbols }, > { "modules.symbols.bin", output_symbols_bin }, > { "modules.builtin.bin", output_builtin_bin }, > - { "modules.builtin.alias.bin", output_builtin_alias_bin }, > + { "modules.builtin.modinfo.bin", output_builtin_modinfo_bin }, This file does not contain all whole modinfo. Now the function name and index name will be confusing. But it's up to you. > { "modules.devname", output_devname }, > { } > }; > -- > 2.25.1 >
On Fri, Mar 6, 2020 at 1:58 AM Alexey Gladkov <gladkov.alexey@gmail.com> wrote: > > On Thu, Mar 05, 2020 at 11:59:34PM -0800, Lucas De Marchi wrote: > > For all the other indexes what we do is to add a .bin to the original > > filename to denote it's the indexed version of that file. It was > > kernel's decision to name it modules.builtin.modinfo, so respect that. > > > > Fix: b866b2165ae6 ("Lookup aliases in the modules.builtin.modinfo") > > --- > > tools/depmod.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/tools/depmod.c b/tools/depmod.c > > index 875e314..fe1c54d 100644 > > --- a/tools/depmod.c > > +++ b/tools/depmod.c > > @@ -2402,7 +2402,7 @@ static int output_devname(struct depmod *depmod, FILE *out) > > return 0; > > } > > > > -static int output_builtin_alias_bin(struct depmod *depmod, FILE *out) > > +static int output_builtin_modinfo_bin(struct depmod *depmod, FILE *out) > > { > > int ret = 0, count = 0; > > struct index_node *idx; > > @@ -2482,7 +2482,7 @@ static int depmod_output(struct depmod *depmod, FILE *out) > > { "modules.symbols", output_symbols }, > > { "modules.symbols.bin", output_symbols_bin }, > > { "modules.builtin.bin", output_builtin_bin }, > > - { "modules.builtin.alias.bin", output_builtin_alias_bin }, > > + { "modules.builtin.modinfo.bin", output_builtin_modinfo_bin }, > > This file does not contain all whole modinfo. Now the function name and > index name will be confusing. But it's up to you. Indeed. I'd also have to fix the libkmod counterpart, otherwise it would look for the wrong file. This index contains only the alias -> module, like our modules.alias file. I think it would be better to leave it with this name. It would probably be good to output modules.builtin.alias though to make it similar to the modules.alias/modules.alias.bin case. Another option is to just add those aliases to modules.alias and lookup modules.builtin to decide if that's builtin, but I think I prefer to keep them separate. thanks Lucas De Marchi > > > { "modules.devname", output_devname }, > > { } > > }; > > -- > > 2.25.1 > > > > -- > Rgrds, legion >
diff --git a/tools/depmod.c b/tools/depmod.c index 875e314..fe1c54d 100644 --- a/tools/depmod.c +++ b/tools/depmod.c @@ -2402,7 +2402,7 @@ static int output_devname(struct depmod *depmod, FILE *out) return 0; } -static int output_builtin_alias_bin(struct depmod *depmod, FILE *out) +static int output_builtin_modinfo_bin(struct depmod *depmod, FILE *out) { int ret = 0, count = 0; struct index_node *idx; @@ -2482,7 +2482,7 @@ static int depmod_output(struct depmod *depmod, FILE *out) { "modules.symbols", output_symbols }, { "modules.symbols.bin", output_symbols_bin }, { "modules.builtin.bin", output_builtin_bin }, - { "modules.builtin.alias.bin", output_builtin_alias_bin }, + { "modules.builtin.modinfo.bin", output_builtin_modinfo_bin }, { "modules.devname", output_devname }, { } };