Merged fu_util_update_all() and fu_util_update_by_id() to simplify the
maintaince work and streamline the flow for consistent behavior across
a normal update for all updatable devices and a small set of chosen
devices.
This commit also added support for specifying mutliple DEVICE-IDs or
GUIDs in a single run, previously error message 'Invalid Argument' is
seen and soon aborted.
This is the ID assigned to STMicroelectronics... more specifically for
a mini LED display. It also seems to be used by other vendors who also
did not change the default from the devkit, e.g. the Vaydeer Multimedia
Console.
Fixes https://github.com/fwupd/fwupd/issues/4180
The logic was built on the presumption of Ubuntu core which doesn't
have /etc/os-release. Since other distributions do have /etc/os-release
adjust the logic to instead build the path explicitly.
When fastboot is used, the modem is rediscovered through udev
after upgrading. However, the modem-manager plugin did not mark
the modem as unhibited with ModemManager. This resulted into
ModemManager not exposing the modem without restarting ModemManager or
rebooting the device.
Mark the modem as uninhibited and do not take ownership over the
plugin data as this caused segfaults.
At the moment a lot of the failures are only visible when running the
daemon in verbose mode, and the inhibit functionalit provides us a way
to unset FWUPD_DEVICE_FLAG_UPDATABLE from multiple places, as well as
setting the update error for the user to see why.
This should make it so that the message doesn't pop up for someone
who has used udev rules that match permissions to do
```
fwupdtool install-blob --plugins=dfu foo.bin
```
Unless there really was a failure
The only place we were using the instance ID -> GUID conversion was in
the self tests, and assuming the group is always a GUID removes a lot
of checks from a very hot path at startup.
Although they do a lot of the same things, trying to deal with both
kinds of device in the same GObject type was making it very hard to
understand and maintain.
Split out two GObjects that both derive from FuThunderboltDevice.
This leads to reports of:
systemd-modules-load[1710]: Failed to insert 'ipmi_si': No such device
systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE
Decrease the GUsb polling interval when any of the devices is in
`WAIT_FOR_REPLUG` on when running on Windows. Any device that can
re-enumerate much faster than the default 1000ms may be missed and the
detach may fail.
Linux doesn't have this problem as it has `LIBUSB_CAP_HAS_HOTPLUG`.
Now all plugins define custom GTypes in the _init() vfunc, and so
there's no need to actually probe devices to just get access to those.
This means you can get results from `fwupdtool get-firmware-types`
about two orders of magnitude quicker.
We need to load the quirks (respecting NO_CACHE), then load the SMBIOS,
and only then match the hwids using the quick database.
This means we don't get a console warning when using fwupdtool commands
as a non-root user.
This allows us to replace the 'dfu-tool replace' with a much more
controlled 'fwupdtool firmware-patch' command that patches at a set of
specific offsets.
Drop in the new functionality into the existing firmware ->write()
vfuncs so that the image headers, footers and/or checksums are correct.
It's a common action for plugins to call FuUsbDevice->open() then claim
interfaces, and then release them just before FuUsbDevice->close().
It's also something a lot of plugins get wrong, so provide common code
to handle it correctly in one place.