Commit 7924799e authored by Masahiro Yamada's avatar Masahiro Yamada

modpost: rename ext_sym_list to dump_list

The -i option is used to include Modules.symver as well as files from
$(KBUILD_EXTRA_SYMBOLS).

Make the struct and variable names more generic.
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent ce2ddd6d
...@@ -2535,8 +2535,8 @@ static void write_namespace_deps_files(const char *fname) ...@@ -2535,8 +2535,8 @@ static void write_namespace_deps_files(const char *fname)
free(ns_deps_buf.p); free(ns_deps_buf.p);
} }
struct ext_sym_list { struct dump_list {
struct ext_sym_list *next; struct dump_list *next;
const char *file; const char *file;
}; };
...@@ -2549,16 +2549,17 @@ int main(int argc, char **argv) ...@@ -2549,16 +2549,17 @@ int main(int argc, char **argv)
int opt; int opt;
int err; int err;
int n; int n;
struct ext_sym_list *extsym_start = NULL; struct dump_list *dump_read_start = NULL;
struct ext_sym_list **extsym_iter = &extsym_start; struct dump_list **dump_read_iter = &dump_read_start;
while ((opt = getopt(argc, argv, "i:mnsT:o:awENd:")) != -1) { while ((opt = getopt(argc, argv, "i:mnsT:o:awENd:")) != -1) {
switch (opt) { switch (opt) {
case 'i': case 'i':
external_module = 1; external_module = 1;
*extsym_iter = NOFAIL(calloc(1, sizeof(**extsym_iter))); *dump_read_iter =
(*extsym_iter)->file = optarg; NOFAIL(calloc(1, sizeof(**dump_read_iter)));
extsym_iter = &(*extsym_iter)->next; (*dump_read_iter)->file = optarg;
dump_read_iter = &(*dump_read_iter)->next;
break; break;
case 'm': case 'm':
modversions = 1; modversions = 1;
...@@ -2595,13 +2596,13 @@ int main(int argc, char **argv) ...@@ -2595,13 +2596,13 @@ int main(int argc, char **argv)
} }
} }
while (extsym_start) { while (dump_read_start) {
struct ext_sym_list *tmp; struct dump_list *tmp;
read_dump(extsym_start->file); read_dump(dump_read_start->file);
tmp = extsym_start->next; tmp = dump_read_start->next;
free(extsym_start); free(dump_read_start);
extsym_start = tmp; dump_read_start = tmp;
} }
while (optind < argc) while (optind < argc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment