Hi!
> >> +
> >> + if (err != 0) {
> >> + free(buf);
> >> + tst_brkm(TCONF, cleanup_fn, "Failed to find module '%s'",
> >> + mod_name);
> >> + }
> >> +
> >> + if (mod_path != NULL)
> >> + *mod_path = buf;
> >> + else
> >> + free(buf);
> >> +}
> > So you expect that the '.ko' suffix is part of the module name. It
> > should be written in the comment in the header. Because at least I
> > expect the module name to be the name that is returned by lsmod.
> I will change module name to module's file name in the comments, is it OK?
Ok.
> >> +void tst_module_unload(void (cleanup_fn)(void), const char *mod_name)
> >> +{
> >> + char *mod_path = NULL;
> >> + tst_module_exists(cleanup_fn, mod_name,&mod_path);
> >> + char *const argv[] = { "rmmod", mod_path, NULL };
> > Hmm, man rmmod suggest that it takes module name (not module path) as
> > parameter i.e. the string without the path and the '.ko' suffix. Does it
> > work with module path too?
> >
> It works fine with path too, also without/with suffix .ko
Ok, then we can avoid the tst_module_exists() call and call rmmod with
just mod_name.
--
Cyril Hrubis
[email protected]
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list