mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-08 13:48:01 +02:00
Merge branch 'master' into 'master'
dbus-daemon: Avoid known options being interpreted as optional arguments Closes #467 See merge request dbus/dbus!421
This commit is contained in:
commit
3444466f9f
1 changed files with 20 additions and 20 deletions
40
bus/main.c
40
bus/main.c
|
|
@ -584,16 +584,6 @@ main (int argc, char **argv)
|
|||
if (!_dbus_string_append (&addr_fd, desc))
|
||||
exit (1);
|
||||
|
||||
print_address = TRUE;
|
||||
}
|
||||
else if (prev_arg &&
|
||||
strcmp (prev_arg, "--print-address") == 0)
|
||||
{
|
||||
check_two_addr_descriptors (&addr_fd, "print-address");
|
||||
|
||||
if (!_dbus_string_append (&addr_fd, arg))
|
||||
exit (1);
|
||||
|
||||
print_address = TRUE;
|
||||
}
|
||||
else if (strcmp (arg, "--print-address") == 0)
|
||||
|
|
@ -612,16 +602,6 @@ main (int argc, char **argv)
|
|||
if (!_dbus_string_append (&pid_fd, desc))
|
||||
exit (1);
|
||||
|
||||
print_pid = TRUE;
|
||||
}
|
||||
else if (prev_arg &&
|
||||
strcmp (prev_arg, "--print-pid") == 0)
|
||||
{
|
||||
check_two_pid_descriptors (&pid_fd, "print-pid");
|
||||
|
||||
if (!_dbus_string_append (&pid_fd, arg))
|
||||
exit (1);
|
||||
|
||||
print_pid = TRUE;
|
||||
}
|
||||
else if (strcmp (arg, "--print-pid") == 0)
|
||||
|
|
@ -642,6 +622,26 @@ main (int argc, char **argv)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
else if (prev_arg &&
|
||||
strcmp (prev_arg, "--print-address") == 0)
|
||||
{
|
||||
check_two_addr_descriptors (&addr_fd, "print-address");
|
||||
|
||||
if (!_dbus_string_append (&addr_fd, arg))
|
||||
exit (1);
|
||||
|
||||
print_address = TRUE;
|
||||
}
|
||||
else if (prev_arg &&
|
||||
strcmp (prev_arg, "--print-pid") == 0)
|
||||
{
|
||||
check_two_pid_descriptors (&pid_fd, "print-pid");
|
||||
|
||||
if (!_dbus_string_append (&pid_fd, arg))
|
||||
exit (1);
|
||||
|
||||
print_pid = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
usage ();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue