summaryrefslogtreecommitdiff
path: root/scripts/mod/modpost.h
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2024-11-20 08:56:50 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2024-11-28 08:46:02 +0900
commit9d98038d438d8515473a75a29bc524e9a4a5882a (patch)
treef605bde4f4fff6ed1ea65b01abd91d45371de517 /scripts/mod/modpost.h
parentabd20428c3f2f8b97a2a0414343faf0ff246a018 (diff)
modpost: move strstarts() to modpost.h
This macro is useful in file2alias.c as well. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/mod/modpost.h')
-rw-r--r--scripts/mod/modpost.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h
index 52efe0026b34..49848fcbe2a1 100644
--- a/scripts/mod/modpost.h
+++ b/scripts/mod/modpost.h
@@ -67,6 +67,8 @@
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
+#define strstarts(str, prefix) (strncmp(str, prefix, strlen(prefix)) == 0)
+
struct buffer {
char *p;
int pos;