diff options
author | Alexey Gladkov <gladkov.alexey@gmail.com> | 2019-11-08 18:25:20 +0100 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2019-12-18 16:56:10 -0800 |
commit | 60084cf1cb24dc3a257976c0d539a4c3ffda5db5 (patch) | |
tree | f04c1e2f38d3ea63d08c2c3d7335b674c40a827a /libkmod/libkmod-internal.h | |
parent | 8aa52bf238daa007712fd828e8ae05cc26178566 (diff) | |
download | kmod-60084cf1cb24dc3a257976c0d539a4c3ffda5db5.tar.gz kmod-60084cf1cb24dc3a257976c0d539a4c3ffda5db5.tar.bz2 kmod-60084cf1cb24dc3a257976c0d539a4c3ffda5db5.zip |
libkmod: Add parser for modules.builtin.modinfo
The kernel since version v5.2-rc1 exports information about built-in
modules in the modules.builtin.modinfo. Information is stored in
the same format as in the separate modules (null-terminated string
array). The module name is a prefix for each line.
$ tr '\0' '\n' < modules.builtin.modinfo
ext4.softdep=pre: crc32c
ext4.license=GPL
ext4.description=Fourth Extended Filesystem
ext4.author=Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others
ext4.alias=fs-ext4
ext4.alias=ext3
ext4.alias=fs-ext3
ext4.alias=ext2
ext4.alias=fs-ext2
md_mod.alias=block-major-9-*
md_mod.alias=md
md_mod.description=MD RAID framework
md_mod.license=GPL
md_mod.parmtype=create_on_open:bool
md_mod.parmtype=start_dirty_degraded:int
...
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
Diffstat (limited to 'libkmod/libkmod-internal.h')
-rw-r--r-- | libkmod/libkmod-internal.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libkmod/libkmod-internal.h b/libkmod/libkmod-internal.h index a65ddd1..df01df1 100644 --- a/libkmod/libkmod-internal.h +++ b/libkmod/libkmod-internal.h @@ -193,3 +193,11 @@ struct kmod_signature_info { }; bool kmod_module_signature_info(const struct kmod_file *file, struct kmod_signature_info *sig_info) _must_check_ __attribute__((nonnull(1, 2))); void kmod_module_signature_info_free(struct kmod_signature_info *sig_info) __attribute__((nonnull)); + +/* libkmod-builtin.c */ +struct kmod_builtin_iter; +struct kmod_builtin_iter *kmod_builtin_iter_new(struct kmod_ctx *ctx) __attribute__((nonnull(1))); +void kmod_builtin_iter_free(struct kmod_builtin_iter *iter) __attribute__((nonnull(1))); +bool kmod_builtin_iter_next(struct kmod_builtin_iter *iter) __attribute__((nonnull(1))); +bool kmod_builtin_iter_get_modname(struct kmod_builtin_iter *iter, char modname[static PATH_MAX]) __attribute__((nonnull(1, 2))); +ssize_t kmod_builtin_get_modinfo(struct kmod_ctx *ctx, const char *modname, char ***modinfo) __attribute__((nonnull(1, 2, 3))); |