diff --git a/pahole.c b/pahole.c index 0b5ff74..02454af 100644 --- a/pahole.c +++ b/pahole.c @@ -1322,7 +1322,8 @@ static error_t pahole__options_parser(int key, char *arg, case ARGP_btf_base: base_btf_file = arg; break; case ARGP_kabi_prefix: - kabi_prefix = arg; break; + conf_load.kabi_prefix = arg; + conf_load.kabi_prefix_len = strlen(arg); break; case ARGP_numeric_version: print_numeric_version = true; break; case ARGP_btf_gen_floats: diff --git a/strings.c b/strings.c index 1e7e4b5..8c2f900 100644 --- a/strings.c +++ b/strings.c @@ -17,8 +17,6 @@ #include "dutil.h" -const char *kabi_prefix; - struct strings *strings__new(void) { struct strings *strs = malloc(sizeof(*strs)); @@ -50,10 +48,7 @@ strings_t strings__add(struct strings *strs, const char *str) if (str == NULL) return 0; - if (kabi_prefix && strncmp(str, kabi_prefix, strlen(kabi_prefix)) == 0) - index = btf__add_str(strs->btf, kabi_prefix); - else - index = btf__add_str(strs->btf, str); + index = btf__add_str(strs->btf, str); if (index < 0) return 0;