mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22:37 +01:00
manager: remove white/black list from argument
Instead we add getters for these lists that manager_init can use.
This commit is contained in:
parent
2ab8d4bbed
commit
87c42bccf1
@ -30,10 +30,12 @@ struct l_genl *iwd_get_genl(void);
|
||||
|
||||
void netdev_shutdown(void);
|
||||
|
||||
bool manager_init(struct l_genl_family *in,
|
||||
const char *if_whitelist, const char *if_blacklist);
|
||||
bool manager_init(struct l_genl_family *in);
|
||||
void manager_exit(void);
|
||||
|
||||
const char *iwd_get_iface_whitelist(void);
|
||||
const char *iwd_get_iface_blacklist(void);
|
||||
|
||||
struct iwd_module_desc {
|
||||
const char *name;
|
||||
int (*init)(void);
|
||||
|
12
src/main.c
12
src/main.c
@ -102,6 +102,16 @@ struct l_genl *iwd_get_genl(void)
|
||||
return genl;
|
||||
}
|
||||
|
||||
const char *iwd_get_iface_whitelist(void)
|
||||
{
|
||||
return interfaces;
|
||||
}
|
||||
|
||||
const char *iwd_get_iface_blacklist(void)
|
||||
{
|
||||
return nointerfaces;
|
||||
}
|
||||
|
||||
static void usage(void)
|
||||
{
|
||||
printf("iwd - Wireless daemon\n"
|
||||
@ -154,7 +164,7 @@ static void nl80211_appeared(const struct l_genl_family_info *info,
|
||||
|
||||
plugin_init(plugins, noplugins);
|
||||
|
||||
manager_init(nl80211, interfaces, nointerfaces);
|
||||
manager_init(nl80211);
|
||||
|
||||
if (!wiphy_init(nl80211, phys, nophys))
|
||||
l_error("Unable to init wiphy functionality");
|
||||
|
@ -584,14 +584,15 @@ static void manager_config_notify(struct l_genl_msg *msg, void *user_data)
|
||||
}
|
||||
}
|
||||
|
||||
bool manager_init(struct l_genl_family *in,
|
||||
const char *if_whitelist, const char *if_blacklist)
|
||||
bool manager_init(struct l_genl_family *in)
|
||||
{
|
||||
const struct l_settings *config = iwd_get_config();
|
||||
struct l_genl_msg *msg;
|
||||
unsigned int wiphy_dump;
|
||||
unsigned int interface_dump;
|
||||
const char *randomize_str;
|
||||
const char *if_whitelist = iwd_get_iface_whitelist();
|
||||
const char *if_blacklist = iwd_get_iface_blacklist();
|
||||
|
||||
nl80211 = in;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user