On Thu, Apr 25, 2013 at 2:18 AM, Yang Chengwei <chengwei.yang@xxxxxxxxx> wrote: > On Thu, Apr 25, 2013 at 01:19:16AM -0300, Lucas De Marchi wrote: >> On Wed, Apr 24, 2013 at 5:19 AM, Chengwei Yang <chengwei.yang@xxxxxxxxx> wrote: >> > There are several exported enum by libkmod without document, so this >> > patch mainly added documentation for below enums: >> > * kmod_resources_status >> > * kmod_module_insert_flags >> > * kmod_module_remove_flags >> > * kmod_module_probe_flags >> > * kmod_filter >> > * kmod_module_initstate >> > >> > Signed-off-by: Chengwei Yang <chengwei.yang@xxxxxxxxx> >> > --- >> > libkmod/docs/libkmod-sections.txt | 6 +++ >> > libkmod/libkmod-module.c | 79 ++++++++++++++++++++++++++++++++----- >> > libkmod/libkmod.c | 17 +++++--- >> > libkmod/libkmod.h | 32 ++++++++------- >> > 4 files changed, 105 insertions(+), 29 deletions(-) >> > >> > diff --git a/libkmod/docs/libkmod-sections.txt b/libkmod/docs/libkmod-sections.txt >> > index e59ab7a..d826daf 100644 >> > --- a/libkmod/docs/libkmod-sections.txt >> > +++ b/libkmod/docs/libkmod-sections.txt >> > @@ -5,6 +5,7 @@ kmod_new >> > kmod_ref >> > kmod_unref >> > >> > +kmod_resources_status >> > kmod_load_resources >> > kmod_unload_resources >> > kmod_validate_resources >> > @@ -53,13 +54,17 @@ kmod_module_ref >> > kmod_module_unref >> > kmod_module_unref_list >> > >> > +kmod_module_insert_flags >> > kmod_module_insert_module >> > +kmod_module_probe_flags >> > kmod_module_probe_insert_module >> > +kmod_module_remove_flags >> > kmod_module_remove_module >> > >> > kmod_module_get_module >> > kmod_module_get_dependencies >> > kmod_module_get_softdeps >> > +kmod_filter >> > kmod_module_apply_filter >> > kmod_module_get_filtered_blacklist >> > kmod_module_get_install_commands >> > @@ -98,6 +103,7 @@ kmod_module_info_get_value >> > <SECTION> >> > <FILE>libkmod-loaded</FILE> >> > kmod_module_new_from_loaded >> > +kmod_module_initstate >> > kmod_module_get_initstate >> > kmod_module_initstate_str >> > kmod_module_get_size >> > diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c >> > index 4754eeb..6086379 100644 >> > --- a/libkmod/libkmod-module.c >> > +++ b/libkmod/libkmod-module.c >> > @@ -581,6 +581,15 @@ KMOD_EXPORT int kmod_module_unref_list(struct kmod_list *list) >> > } >> > >> > /** >> > + * kmod_filter: >> > + * @KMOD_FILTER_BLACKLIST: filter modules in blacklist out >> > + * @KMOD_FILTER_BUILTIN: filter builtin modules out >> > + * >> > + * kmod module filter flags, used to filter modules, used by >> > + * kmod_module_apply_filter(). >> > + */ >> > + >> > +/** >> > * kmod_module_get_filtered_blacklist: >> > * @ctx: kmod library context >> > * @input: list of kmod_module to be filtered with blacklist >> > @@ -736,9 +745,18 @@ KMOD_EXPORT const char *kmod_module_get_path(const struct kmod_module *mod) >> > extern long delete_module(const char *name, unsigned int flags); >> > >> > /** >> > + * kmod_module_remove_flags: >> > + * @KMOD_REMOVE_FORCE: force remove module regardless its reference count >> >> Humn... this is ambiguous since user might think this is related to >> the kmod_module reference count, which it isn't. Please make it >> explicit like: "force module removal regardless if it's still in use >> by a kernel subsystem or other process" >> >> > + * @KMOD_REMOVE_NOWAIT: return immediately >> >> Actually we'd like to deprecate *not* using this flag so it might >> become the default in a future version. See rmmod, it's already >> warning the user that the "-w" flag is deprecated. Could you be a bit > > Yes, I noticed, I originally think there is a bug since there is no help > info for "-w, --wait". > > Do we need that? It's removed from the help on purpose, so we don't get new users of this option. See: cc833644b2193d661e4a9c06c047d1a527f3ecf4 But we need to let the option there for more some time, in case there are still users that didn't notice it the 10s delay yet. Or that didn't upgrade... I think Debian is still on kmod-9. > >> more verbose here? If this module is in use by any kernel subsystem or process, not using this flag will cause the call to block indefinitely, until the module is not in use anymore. Always use this flag, it's deprecated not using it and the default behavior might change in future to always set it. Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-modules" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html