diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2024-11-20 08:56:50 +0900 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2024-11-28 08:46:02 +0900 |
commit | 9d98038d438d8515473a75a29bc524e9a4a5882a (patch) | |
tree | f605bde4f4fff6ed1ea65b01abd91d45371de517 /scripts/mod/modpost.h | |
parent | abd20428c3f2f8b97a2a0414343faf0ff246a018 (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.h | 2 |
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; |