commit 174c14aefb5108dc53ed01c40f09a13f3a4d7893
parent 73d98d88758e7be9244ee53e31785ff53947ba3f
Author: James Prestwood <prestwoj@gmail.com>
Date: Wed, 5 May 2021 11:23:53 -0700
main: add a --developer,-E option
This will enable developer features to be used. Currently the
only user of this will be StationDiagnostics.Roam() method which
should only be exposed in this mode.
Diffstat:
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/iwd.h b/src/iwd.h
@@ -41,3 +41,4 @@ const char *iwd_get_iface_blacklist(void);
const char *iwd_get_phy_whitelist(void);
const char *iwd_get_phy_blacklist(void);
+bool iwd_is_developer_mode(void);
diff --git a/src/main.c b/src/main.c
@@ -54,6 +54,7 @@ static const char *nointerfaces;
static const char *phys;
static const char *nophys;
static const char *debugopt;
+static bool developeropt;
static bool terminating;
static bool nl80211_complete;
@@ -126,6 +127,11 @@ const char *iwd_get_phy_blacklist(void)
return nophys;
}
+bool iwd_is_developer_mode(void)
+{
+ return developeropt;
+}
+
static void usage(void)
{
printf("iwd - Wireless daemon\n"
@@ -143,6 +149,7 @@ static void usage(void)
}
static const struct option main_options[] = {
+ { "developer", no_argument, NULL, 'E' },
{ "dbus-debug", no_argument, NULL, 'B' },
{ "version", no_argument, NULL, 'v' },
{ "interfaces", required_argument, NULL, 'i' },
@@ -405,7 +412,7 @@ int main(int argc, char *argv[])
for (;;) {
int opt;
- opt = getopt_long(argc, argv, "Bi:I:p:P:d::vh",
+ opt = getopt_long(argc, argv, "EBi:I:p:P:d::vh",
main_options, NULL);
if (opt < 0)
break;
@@ -414,6 +421,9 @@ int main(int argc, char *argv[])
case 'B':
enable_dbus_debug = true;
break;
+ case 'E':
+ developeropt = true;
+ break;
case 'i':
interfaces = optarg;
break;