summaryrefslogtreecommitdiff
path: root/scripts/mod/modpost.h
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2025-02-08 02:50:13 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2025-03-15 21:16:21 +0900
commit59d60d26a58be75e9e3b813104c2dfd3b58eb662 (patch)
treead8fb7559b010a61633bc0fd0e72e5792707277b /scripts/mod/modpost.h
parentab5bc764bdc270d1c55aaf9d238e0986ff301355 (diff)
modpost: introduce get_basename() helper
The logic to retrieve the basename appears multiple times. Factor out the common pattern into a helper function. I copied kbasename() from include/linux/string.h and renamed it to get_basename(). Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Diffstat (limited to 'scripts/mod/modpost.h')
-rw-r--r--scripts/mod/modpost.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h
index 59366f456b76..9133e4c3803f 100644
--- a/scripts/mod/modpost.h
+++ b/scripts/mod/modpost.h
@@ -216,6 +216,7 @@ void get_src_version(const char *modname, char sum[], unsigned sumlen);
/* from modpost.c */
extern bool target_is_big_endian;
extern bool host_is_big_endian;
+const char *get_basename(const char *path);
char *read_text_file(const char *filename);
char *get_line(char **stringp);
void *sym_get_data(const struct elf_info *info, const Elf_Sym *sym);