3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 04:32:37 +01:00

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.
This commit is contained in:
James Prestwood 2021-05-05 11:23:53 -07:00 committed by Denis Kenzior
parent 73d98d8875
commit 174c14aefb
2 changed files with 12 additions and 1 deletions

View File

@ -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);

View File

@ -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;