mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22: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:
parent
73d98d8875
commit
174c14aefb
@ -41,3 +41,4 @@ const char *iwd_get_iface_blacklist(void);
|
|||||||
|
|
||||||
const char *iwd_get_phy_whitelist(void);
|
const char *iwd_get_phy_whitelist(void);
|
||||||
const char *iwd_get_phy_blacklist(void);
|
const char *iwd_get_phy_blacklist(void);
|
||||||
|
bool iwd_is_developer_mode(void);
|
||||||
|
12
src/main.c
12
src/main.c
@ -54,6 +54,7 @@ static const char *nointerfaces;
|
|||||||
static const char *phys;
|
static const char *phys;
|
||||||
static const char *nophys;
|
static const char *nophys;
|
||||||
static const char *debugopt;
|
static const char *debugopt;
|
||||||
|
static bool developeropt;
|
||||||
static bool terminating;
|
static bool terminating;
|
||||||
static bool nl80211_complete;
|
static bool nl80211_complete;
|
||||||
|
|
||||||
@ -126,6 +127,11 @@ const char *iwd_get_phy_blacklist(void)
|
|||||||
return nophys;
|
return nophys;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool iwd_is_developer_mode(void)
|
||||||
|
{
|
||||||
|
return developeropt;
|
||||||
|
}
|
||||||
|
|
||||||
static void usage(void)
|
static void usage(void)
|
||||||
{
|
{
|
||||||
printf("iwd - Wireless daemon\n"
|
printf("iwd - Wireless daemon\n"
|
||||||
@ -143,6 +149,7 @@ static void usage(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const struct option main_options[] = {
|
static const struct option main_options[] = {
|
||||||
|
{ "developer", no_argument, NULL, 'E' },
|
||||||
{ "dbus-debug", no_argument, NULL, 'B' },
|
{ "dbus-debug", no_argument, NULL, 'B' },
|
||||||
{ "version", no_argument, NULL, 'v' },
|
{ "version", no_argument, NULL, 'v' },
|
||||||
{ "interfaces", required_argument, NULL, 'i' },
|
{ "interfaces", required_argument, NULL, 'i' },
|
||||||
@ -405,7 +412,7 @@ int main(int argc, char *argv[])
|
|||||||
for (;;) {
|
for (;;) {
|
||||||
int opt;
|
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);
|
main_options, NULL);
|
||||||
if (opt < 0)
|
if (opt < 0)
|
||||||
break;
|
break;
|
||||||
@ -414,6 +421,9 @@ int main(int argc, char *argv[])
|
|||||||
case 'B':
|
case 'B':
|
||||||
enable_dbus_debug = true;
|
enable_dbus_debug = true;
|
||||||
break;
|
break;
|
||||||
|
case 'E':
|
||||||
|
developeropt = true;
|
||||||
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
interfaces = optarg;
|
interfaces = optarg;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user