]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
kmod_loaded: document exported function
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Thu, 8 Dec 2011 14:50:40 +0000 (12:50 -0200)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Thu, 8 Dec 2011 14:59:16 +0000 (12:59 -0200)
libkmod/libkmod-loaded.c

index 6914e57a7719ae7e08d5924dfd29bf5156ef81b7..5f9a38aff87127b5bfa29fed8aaae598b4c6caee 100644 (file)
  *
  * 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)
 {