module: Fix variable names
PATCH 1/2 module: Fix variable names
Apparently the intention was for the dependent module's name to appear in the variable name resulting from using IWD_MODULE_DEPENDS, so the dependencies all have unique names (apparently not critical).
--- src/module.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/module.h +1 -1
@@ -40,7 +40,7 @@ struct iwd_module_depends {#define IWD_MODULE_DEPENDS (name, dep) \ static struct iwd_module_depends \ - __iwd_module__##name_##dep \ + __iwd_module__##name##_##dep \ __attribute__((used, section("__iwd_module_dep"), \ aligned(8))) = { \ .self = #name, \
Signature · 1 line
2.20.1
PATCH 2/2 modules: Unload modules in reverse order from loading
Make sure a module A that is needed by B is not unloaded before B.
--- src/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/module.c +1 -1
@@ -173,7 +173,7 @@ void iwd_modules_exit()return ;for (i =0 ; i < n_modules; i++) { - desc = modules_sorted[i]; + desc = modules_sorted[n_modules -1 - i];if (!desc->active)continue ;
Signature · 1 line
2.20.1
Hi Andrew,
Quoted 7 lines · Andrew Zaborowski
Apparently the intention was for the dependent module's name to appear in the variable name resulting from using
IWD_MODULE_DEPENDS, so the dependencies all have unique names (apparently not critical).--- src/module.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Both applied, thanks.
Regards,
-Denis