From 8fc83fe1de2941e1eb0cec1b3b68fbcc14f82f02 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Thu, 8 Dec 2011 12:50:40 -0200 Subject: [PATCH] kmod_loaded: document exported function --- libkmod/libkmod-loaded.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/libkmod/libkmod-loaded.c b/libkmod/libkmod-loaded.c index 6914e57..5f9a38a 100644 --- a/libkmod/libkmod-loaded.c +++ b/libkmod/libkmod-loaded.c @@ -36,6 +36,22 @@ * * Information about currently loaded modules, as reported by Linux kernel */ + +/** + * kmod_loaded_get_list: + * @ctx: kmod library context + * @list: where to save the list of loaded modules + * + * Get a list of all modules currently loaded in kernel. It uses /proc/modules + * to get a list of loaded modules and create kmod_module objects that are put + * in @list in no particular order. + * + * All the returned modules get their refcount incremented (or are created if + * they do not exist yet). After using the list, release the resources by + * calling kmod_module_unref_list(). + * + * Returns: 0 on success or < 0 on error. + */ KMOD_EXPORT int kmod_loaded_get_list(struct kmod_ctx *ctx, struct kmod_list **list) { -- 2.39.2