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