]> git.ipfire.org Git - thirdparty/systemd.git/commit
udevadm-control: parse all args in advance
authorDavid Tardon <dtardon@redhat.com>
Fri, 3 Nov 2023 12:12:42 +0000 (13:12 +0100)
committerDavid Tardon <dtardon@redhat.com>
Fri, 3 Nov 2023 17:44:26 +0000 (18:44 +0100)
commite4080a6d975bf595c64de4c6f59a3ea7e7d8f68b
tree118c0402eb7985df168ee7a3bfbb5305d7962273
parent69d17e23db6d0d11758ee6a2f410c5fc837879a7
udevadm-control: parse all args in advance

This is mostly just refactoring to make the code more manageable and
extendable. It doesn't introduce any semantic changes, but it
"optimizes" the communication with udevd a bit:
* If an option is used multiple times, only one command will be sent. If
  the option takes a value, the value of the final appearance of the
  option is used. The only exception is --property, which is additive by
  nature.
* Options --start-exec-queue and --stop-exec-queue are handled together.
  Only one of START_QUEUE/STOP_QUEUE commands will be sent to udevd even
  if both options appear on the command line.
src/udev/udevadm-control.c