mirror of https://github.com/dynup/kpatch
create-diff-object: rename 'name' variable to 'objname'
'name' isn't very descriptive, rename it to 'objname' to avoid confusion
This commit is contained in:
parent
52e2ad66ca
commit
b6a15f3dd6
|
@ -2295,7 +2295,7 @@ int main(int argc, char *argv[])
|
||||||
struct lookup_table *lookup;
|
struct lookup_table *lookup;
|
||||||
struct section *sec, *symtab;
|
struct section *sec, *symtab;
|
||||||
struct symbol *sym;
|
struct symbol *sym;
|
||||||
char *hint = NULL, *name, *pos;
|
char *hint = NULL, *objname, *pos;
|
||||||
|
|
||||||
arguments.debug = 0;
|
arguments.debug = 0;
|
||||||
argp_parse (&argp, argc, argv, 0, NULL, &arguments);
|
argp_parse (&argp, argc, argv, 0, NULL, &arguments);
|
||||||
|
@ -2381,15 +2381,15 @@ int main(int argc, char *argv[])
|
||||||
lookup = lookup_open(arguments.args[2]);
|
lookup = lookup_open(arguments.args[2]);
|
||||||
|
|
||||||
/* extract module name (destructive to arguments.modulefile) */
|
/* extract module name (destructive to arguments.modulefile) */
|
||||||
name = basename(arguments.args[2]);
|
objname = basename(arguments.args[2]);
|
||||||
if (!strncmp(name, "vmlinux-", 8))
|
if (!strncmp(objname, "vmlinux-", 8))
|
||||||
name = "vmlinux";
|
objname = "vmlinux";
|
||||||
else {
|
else {
|
||||||
pos = strchr(name,'.');
|
pos = strchr(objname,'.');
|
||||||
if (pos) {
|
if (pos) {
|
||||||
/* kernel module */
|
/* kernel module */
|
||||||
*pos = '\0';
|
*pos = '\0';
|
||||||
pos = name;
|
pos = objname;
|
||||||
while ((pos = strchr(pos, '-')))
|
while ((pos = strchr(pos, '-')))
|
||||||
*pos++ = '_';
|
*pos++ = '_';
|
||||||
}
|
}
|
||||||
|
@ -2397,9 +2397,9 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
/* create strings, patches, and dynrelas sections */
|
/* create strings, patches, and dynrelas sections */
|
||||||
kpatch_create_strings_elements(kelf_out);
|
kpatch_create_strings_elements(kelf_out);
|
||||||
kpatch_create_patches_sections(kelf_out, lookup, hint, name);
|
kpatch_create_patches_sections(kelf_out, lookup, hint, objname);
|
||||||
kpatch_create_dynamic_rela_sections(kelf_out, lookup, hint, name);
|
kpatch_create_dynamic_rela_sections(kelf_out, lookup, hint, objname);
|
||||||
kpatch_create_hooks_objname_rela(kelf_out, name);
|
kpatch_create_hooks_objname_rela(kelf_out, objname);
|
||||||
kpatch_build_strings_section_data(kelf_out);
|
kpatch_build_strings_section_data(kelf_out);
|
||||||
|
|
||||||
kpatch_create_mcount_sections(kelf_out);
|
kpatch_create_mcount_sections(kelf_out);
|
||||||
|
|
Loading…
Reference in New Issue