mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-03 19:02:34 +01:00
main: Add --dbus-debug command line parameter
This commit is contained in:
parent
4dc24025a4
commit
333b28bf3a
@ -52,12 +52,14 @@ static void usage(void)
|
|||||||
"Usage:\n");
|
"Usage:\n");
|
||||||
printf("\tiwd [options]\n");
|
printf("\tiwd [options]\n");
|
||||||
printf("Options:\n"
|
printf("Options:\n"
|
||||||
|
"\t-B, --dbus-debug Enable DBus debugging\n"
|
||||||
"\t-K, --kdbus Setup Kernel D-Bus\n"
|
"\t-K, --kdbus Setup Kernel D-Bus\n"
|
||||||
"\t-h, --help Show help options\n");
|
"\t-h, --help Show help options\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct option main_options[] = {
|
static const struct option main_options[] = {
|
||||||
{ "kdbus", no_argument, NULL, 'K' },
|
{ "kdbus", no_argument, NULL, 'K' },
|
||||||
|
{ "dbus-debug", no_argument, NULL, 'B' },
|
||||||
{ "version", no_argument, NULL, 'v' },
|
{ "version", no_argument, NULL, 'v' },
|
||||||
{ "help", no_argument, NULL, 'h' },
|
{ "help", no_argument, NULL, 'h' },
|
||||||
{ }
|
{ }
|
||||||
@ -66,6 +68,7 @@ static const struct option main_options[] = {
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
bool enable_kdbus = false;
|
bool enable_kdbus = false;
|
||||||
|
bool enable_dbus_debug = false;
|
||||||
struct l_signal *signal;
|
struct l_signal *signal;
|
||||||
sigset_t mask;
|
sigset_t mask;
|
||||||
int exit_status;
|
int exit_status;
|
||||||
@ -81,6 +84,9 @@ int main(int argc, char *argv[])
|
|||||||
case 'K':
|
case 'K':
|
||||||
enable_kdbus = true;
|
enable_kdbus = true;
|
||||||
break;
|
break;
|
||||||
|
case 'B':
|
||||||
|
enable_dbus_debug = true;
|
||||||
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
printf("%s\n", VERSION);
|
printf("%s\n", VERSION);
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
@ -135,7 +141,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dbus_init()) {
|
if (!dbus_init(enable_dbus_debug)) {
|
||||||
exit_status = EXIT_FAILURE;
|
exit_status = EXIT_FAILURE;
|
||||||
goto destroy;
|
goto destroy;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user