libkmod: annotate kmod_builtin_iter API as static

It's no longer used outside the compilation unit, as of last commit.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
This commit is contained in:
Emil Velikov 2023-02-21 13:19:27 +00:00 committed by Lucas De Marchi
parent 0237665bef
commit df9d07a149
2 changed files with 4 additions and 9 deletions

View File

@ -54,7 +54,7 @@ struct kmod_builtin_iter {
char *buf;
};
struct kmod_builtin_iter *kmod_builtin_iter_new(struct kmod_ctx *ctx)
static struct kmod_builtin_iter *kmod_builtin_iter_new(struct kmod_ctx *ctx)
{
char path[PATH_MAX];
int file, sv_errno;
@ -108,7 +108,7 @@ fail:
return iter;
}
void kmod_builtin_iter_free(struct kmod_builtin_iter *iter)
static void kmod_builtin_iter_free(struct kmod_builtin_iter *iter)
{
close(iter->file);
free(iter->buf);
@ -165,7 +165,7 @@ fail:
return -1;
}
bool kmod_builtin_iter_next(struct kmod_builtin_iter *iter)
static bool kmod_builtin_iter_next(struct kmod_builtin_iter *iter)
{
char *line, *modname;
size_t linesz;
@ -216,7 +216,7 @@ bool kmod_builtin_iter_next(struct kmod_builtin_iter *iter)
return (iter->pos < iter->size);
}
bool kmod_builtin_iter_get_modname(struct kmod_builtin_iter *iter,
static bool kmod_builtin_iter_get_modname(struct kmod_builtin_iter *iter,
char modname[static PATH_MAX])
{
int sv_errno;

View File

@ -198,9 +198,4 @@ bool kmod_module_signature_info(const struct kmod_file *file, struct kmod_signat
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)));