From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH v2 05/12] manager: remove white/black list from argument
Date: Fri, 11 Oct 2019 12:29:26 -0700 [thread overview]
Message-ID: <20191011192933.13550-5-prestwoj@gmail.com> (raw)
In-Reply-To: <20191011192933.13550-1-prestwoj@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2172 bytes --]
Instead we add getters for these lists that manager_init can use.
---
src/iwd.h | 6 ++++--
src/main.c | 12 +++++++++++-
src/manager.c | 5 +++--
3 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/src/iwd.h b/src/iwd.h
index 7ae7e4b4..1fa1e25a 100644
--- a/src/iwd.h
+++ b/src/iwd.h
@@ -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);
diff --git a/src/main.c b/src/main.c
index 08bf38a3..d4915412 100644
--- a/src/main.c
+++ b/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");
diff --git a/src/manager.c b/src/manager.c
index 1a04b071..e731cf9d 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -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;
--
2.17.1
next prev parent reply other threads:[~2019-10-11 19:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-11 19:29 [PATCH v2 01/12] main: move module init into nl80211_appeared James Prestwood
2019-10-11 19:29 ` [PATCH v2 02/12] netdev: utilize IWD_MODULE James Prestwood
2019-10-11 19:29 ` [PATCH v2 03/12] eapol: " James Prestwood
2019-10-11 19:29 ` [PATCH v2 04/12] anqp: " James Prestwood
2019-10-11 19:29 ` James Prestwood [this message]
2019-10-11 19:29 ` [PATCH v2 06/12] manager: " James Prestwood
2019-10-11 19:29 ` [PATCH v2 07/12] wiphy: remove white/blacklist from wiphy_init James Prestwood
2019-10-11 19:29 ` [PATCH v2 08/12] wiphy: utilize IWD_MODULE James Prestwood
2019-10-11 19:29 ` [PATCH v2 09/12] eap: remove mtu argument from eap_init James Prestwood
2019-10-11 19:29 ` [PATCH v2 10/12] wired: update with new eap_init James Prestwood
2019-10-11 19:29 ` [PATCH v2 11/12] unit: update wsc/eapol " James Prestwood
2019-10-11 19:29 ` [PATCH v2 12/12] eap: utilize IWD_MODULE James Prestwood
2019-10-11 20:49 ` [PATCH v2 01/12] main: move module init into nl80211_appeared Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191011192933.13550-5-prestwoj@gmail.com \
--to=prestwoj@gmail.com \
--cc=iwd@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox