Commit Graph

301 Commits

Author SHA1 Message Date
Richard Hughes
11f612c1d3 trivial: Ensure the parent dir exists before saving the verify silo 2019-03-18 10:08:58 +00:00
Richard Hughes
68db74b006 Correctly get the check the new version for devices that replug
There are a lot of failures in the LVFS with 'device version not updated on
success' and this is because we were looking at the original FuDevice, rather
than the FuDevice that came back after the bootloader replug phase.

Before doing the check get the new FuDevice to prevent failing the check with
a false positive.
2019-03-14 08:50:06 -05:00
Richard Hughes
f3c7d42289 Ensure the PKCS-7 client certificate exists at startup
This ensures the certificate is always present even before the user has
generated a report or manually signed test data.

Also, if the GnuTLS version is too old just log a message and continue.
2019-03-12 08:25:22 -05:00
Richard Hughes
3d60762bed Add a D-Bus method to generate a signature using the self-signed client certificate 2019-03-11 13:57:39 +00:00
Richard Hughes
f28abe7fda Allow signing and verifying data using a PKCS-7 self-signed client certificate
This is a per-client certificate and private key that can be used to sign
metadata sent to remote servers, for instance success/failure reports.
2019-03-11 13:57:39 +00:00
Richard Hughes
2eee2582fd trivial: Fix several NULL/FALSE return mistakes 2019-03-11 13:17:55 +00:00
Richard Hughes
88dc0f4bf0 Do not recreate XbSilo caches when running on a readonly filesystem
For my future self, to debug the fwupd.shutdown activation failure, you can do:

    mount /dev/sdc1 /mnt
    /usr/libexec/fwupd/fwupdtool activate --verbose &> /mnt/log.txt
    umount /dev/sdc1

...where /dev/sdc1 is an attached FAT32-formatted USB drive.
2019-03-07 08:28:36 -06:00
Richard Hughes
5e7017b409 trivial: Add FuConfigLoadFlags argument to fu_config_load()
No functionality changes, but allows us to do something new in the future.
2019-03-07 08:28:36 -06:00
Richard Hughes
c8cc77c1c2 trivial: Add FuEngineLoadFlags argument to fu_engine_load()
No functionality changes, but allows us to do something new in the future.
2019-03-07 08:28:36 -06:00
Richard Hughes
8dd4c1c4dd Allow restricting firmware updates for enterprise use 2019-03-05 19:05:07 +00:00
Richard Hughes
8e0cc802fe Show the upgrade and downgrade flags when getting releases for a device
This allows us to one day implement 'reinstall', allows us to have a more useful
`get-releases` command and also means we can add other reasons for blocking the
release in the future.
2019-03-04 15:11:36 +00:00
Richard Hughes
245885ca1f Rename FwupdRelease:trust-flags to FwupdRelease:flags
In the future we'll want to use this flag to signify if the release is an
upgrade, downgrade, below the version-lowest, or if it is locked in some way.
2019-03-04 13:55:31 +00:00
Mario Limonciello
96a0dd5606 Add a support for delayed activation
This is intended for devices that it is not safe to immediately activate
the firmware.  It may be called at a more convenient time instead.

Both fwupdmgr and fwupdtool support the feature.

- if called at runtime with fwupdmgr it uses the daemon
- during shutdown fwupdtool uses the pending.db to perform this feature.
2019-02-27 09:04:54 +00:00
Richard Hughes
592baedfff Export some of the GUID functionality 2019-02-04 15:19:57 +00:00
Richard Hughes
5297678d3c Allow a plugin to set _ANOTHER_WRITE_REQUIRED to run more than one plugin
For this to work with different plugins the device IDs must match.
2019-02-04 14:54:54 +00:00
Richard Hughes
03df0d5379 trivial: Break apart fu_engine_install_blob() into sane chunks
This fixes a number of bugs, where the plugin changing was not always detected
properly. It also means we always record a error failure if _install_blob()
returns FALSE.
2019-02-04 14:54:54 +00:00
Richard Hughes
84af6e71f4 trivial: Move all the history database writing to fu_engine_install() 2019-02-04 14:54:54 +00:00
Richard Hughes
9fd7207f55 trivial: Move the update schedule to fu_engine_install() 2019-02-04 14:54:54 +00:00
Richard Hughes
afca203839 trivial: Move the history database writing to fu_engine_install() 2019-02-04 14:54:54 +00:00
Richard Hughes
c6c312f267 trivial: Move fu_plugin_runner_schedule_update() into the engine 2019-02-04 14:54:54 +00:00
Richard Hughes
2a77afcd5c trivial: Do not propagate UNKNOWN from FuDevice->FuEngine->FuMain 2019-01-30 06:10:36 -06:00
Richard Hughes
96019e815c trivial: Allow reflashing the same device more than once without restarting
Set the device status back to the default when completed flashing so that we
don't ignore the status change for the subsequent flash.
2019-01-30 06:10:36 -06:00
Mario Limonciello
32241f4256 Add support for an UpdateMessage and display it in tools
The idea is that if the user should know something about the device update
"after" it's succesfully completed then the plugin can set `UpdateMessage`
for the device and a client can show it.

An example would be a device that doesn't reboot on its own and the user
needs to power cycle it manually.
2019-01-29 13:59:07 -06:00
Mario Limonciello
4f24d0bae3 When using directory remote type automatically generate metadata
The CAB files will be parsed upon `fwupd`/`fwupdtool` startup and
loaded into the daemon.
2019-01-29 09:21:54 -06:00
Richard Hughes
7185828163 Add support for a per-release source and details URL
The source URL allows us to comply with our various obligations when shipping
firmware built from GPL licensed sources. The details URL allows vendors to
include a link to a full HTML details page about the specific release.
2019-01-28 12:59:39 +00:00
Mario Limonciello
51ddf18faa When generating a CAB Silo use the prefix "components"
This makes fu_engine_get_details use a more standard prefix.
2019-01-28 09:52:37 +00:00
Aleksander Morgado
37b985c156 Check if plugin changed after the device attaches or detaches
If the device is rebooted into a different shape, the plugin managing
the device may also be different.

This would be the case for plugins that just subclass the update_detach()
method, and leave to other plugins the actual required update procedure.
2019-01-20 20:01:40 +00:00
Richard Hughes
f425d29a28 Show a console warning if loading an out-of-tree plugin
Fixes https://github.com/hughsie/fwupd/issues/950
2019-01-19 07:26:20 +00:00
Richard Hughes
f803964e37 Add _NEEDS_SHUTDOWN flag for devices
Some devices require the system to be powered down and back up, rather than
just being "warm" rebooted.
2019-01-17 16:35:34 +00:00
Richard Hughes
a958e1c32f trivial: Fix a potential type-check warning when setting SUPPORTED
We can't use the superclassed FuDevice as this was created as a FwupdDevice.
2019-01-17 16:35:34 +00:00
Mario Limonciello
46aaee8cec fu-tool: Add support for an 'update' command to fwupdtool
This will perform updates with all currently present metadata.

It is "intended" for usage with local metadata repositories referring
to local files.

fwupdtool however does also support fetching a file from the web
and if the metadata refers to the file on the web it should also work
for that.
2019-01-11 12:59:00 +00:00
Mario Limonciello
baa5af4504 trivial: fu-engine: Clarify the message when no releases are available 2019-01-11 12:59:00 +00:00
Richard Hughes
319dbcba5c trivial: Don't show 'Update Duration: 49710 days'
Use the correct 'value not found' constant for xb_node_get_attr_as_uint().
2018-12-18 17:59:09 +00:00
Richard Hughes
45bbfc9cae Check the device checksum as well as the content checksum during verify
Some firmware has a different on-device checksum to the hash of the firmware
file itself. This may be because:

 * The content is not a binary file, e.g. Intel HEX or SREC
 * Only part of the firmware is flashed, e.g. ignoring the bootloader section
 * The device checksum is calculated using another method entirely, e.g. PCR0

It's also made complicated as there may be more than one 'correct' device
checksum in some cases, but nothing that a union query can't solve.
2018-12-14 19:23:04 +00:00
Richard Hughes
4e886a4dfa Include the device checksum and update protocol in the historydb 2018-12-14 19:23:04 +00:00
Richard Hughes
adeb2b1b4d Add new API to get the release protocol from the metadata 2018-12-14 18:15:01 +00:00
Richard Hughes
d583bafb6f Only run attach and detach if the device is in the wrong mode 2018-12-06 08:22:00 +00:00
Richard Hughes
a07a80ff28 Fix a regression when doing GetReleases on unsupported hardware
With an indexed string we can return INVALID_ARGUMENT before the query actually
runs if nothing matches.
2018-12-03 15:02:48 +00:00
Richard Hughes
1af48b13bd Correctly parse format the version numbers correctly using old metadata
The LVFS has always sent components with the old-style '<metadata>' section
rather than the new-style '<custom>' section, and when using appstream-glib
we just accepted either element name. Although the LVFS has just been fixed to
use the new name, old metadata might be present on the system already.

When all clients have downloaded new metadata we can revert this, perhaps in a
couple of weeks time. Until then, the belt-and-braces approach is probably a
good idea.

Fixes https://github.com/hughsie/fwupd/issues/874
2018-12-03 12:14:28 +00:00
Richard Hughes
ec6190c4bf trivial: Fix regression when switching to indexed strings
When we construct a local silo we need to build the index again.

This fixes 'fwupdmgr get-details foo.cab'
2018-11-25 12:19:39 +00:00
Richard Hughes
328b00eec3 Remove DaemonVersionFormat=quad
This metadata key is now unnecessary, as firmwares are expected to set the
version format in the metadata.

If the metadata is missing, the LVFS allows a per-vendor default for non-semver
release versions which is now unconditionally set in metadata.
2018-11-21 19:06:51 +00:00
Richard Hughes
75b965d01d Shut down the daemon after 2h of inactivity
Plugins are allowed to 'opt-out' of this behaviour using _RULE_INHIBITS_IDLE.
This should be used where waking up the hardware to coldplug is expensive,
either from a power consumption point of view, or if other artifacts are going
to be seem -- for instance if the screen flickers when probing display devices.

This functionality is also inhibited when the actual upgrade is happening,
for obvious reasons.

Admins can turn off this auto-sleep behaviour by editing the daemon.conf file.

Fixes https://github.com/hughsie/fwupd/issues/417
2018-11-21 18:54:44 +00:00
Richard Hughes
634da03730 Create a silo index to speed up GUID queries
This speeds up matching for GUIDs by about 90%, taking the query from 3.17ms to
about 0.33ms on my Thinkpad. This is more important for slow ARM hardware,
where strcmp() is more expensive than on x64.
2018-11-21 18:51:07 +00:00
Richard Hughes
d76ed3de28 Fix flashing the 8bitdo SF30
We have to check for the SUPPORTED flag _after_ the FuDeviceList has added the
missing GUIDs from the device when it was in runtime mode.
2018-11-15 15:43:43 +00:00
Richard Hughes
ab1bc89ea8 trivial: Do a single query when getting a component by a set of GUIDs 2018-11-15 15:43:43 +00:00
Richard Hughes
aabdc371c1 Query the XbSilo when calling fu_plugin_check_supported()
This means we don't have to have all the thousands of GUIDs as tiny allocated
strings being passed around to all plugins in a GPtrArray.

This also reduces our heap usage by about 6%.
2018-11-14 15:32:55 +00:00
Richard Hughes
6e0c8f8742 Add per-release install duration values
These are set from the AppStream metadata and are specific to the firmware
release.

If not provided, the install duration falls back to the per-device duration
values which can be set in the quirk files.
2018-11-12 14:18:28 +00:00
Richard Hughes
d56ad5b440 trivial: Fix a possible critical warning when parsing invalid metadata 2018-11-12 14:18:28 +00:00
Richard Hughes
0393f6fa81 Be more explicit setting the update state
If the FuDevice is changed during a replug then the `UPDATE_STATE_SUCCESS` will
not be stored on the current FuDevice, which means we store an update-state of
`unknown` to the history database.

Which means we get no success or failure reports, which is bad.
2018-11-09 15:13:56 +00:00
Richard Hughes
3b743402f5 Include the os-release information in the release metadata
This means we are storing the distro that was used to perform the update,
rather than the distro that was used to do the upload.

Fixes https://github.com/hughsie/fwupd/issues/838
2018-11-09 15:13:56 +00:00
Richard Hughes
33171fd24d trivial: Store the AppStream component metadata correctly
We want the XML to look like:

  <custom>
    <value key="fwupd::RemoteId">lvfs</value>
  </custom>

not:

  <custom>
    <fwupd::RemoteId>lvfs</fwupd::RemoteId>
  </custom>

Also, fix the XPath query string to actually match the container checksum, and
actually save the custom node to the builder source.

This fixes a regression in 1.2.0 where no reports could be uploaded.
2018-11-09 15:13:56 +00:00
Richard Hughes
aaa60c60d9 trivial: Fix a typo in the verification store export 2018-11-07 11:05:50 +00:00
Richard Hughes
b095df6d4d trivial: Fix some NULL/FALSE confusion 2018-11-05 16:36:06 +00:00
Mario Limonciello
387f039bea trivial: fu-engine: Increase the priority on a device if it has children
This will cause devices with children to be displayed (and potentially
processed) before children devices.
2018-10-24 13:39:37 -05:00
Mario Limonciello
343095ddb5 trivial: fu-device-list: Return devices by priority 2018-10-24 13:39:37 -05:00
Richard Hughes
481aa2a923 Port from libappstream-glib to libxmlb
The libxmlb library is much faster to query, and does not require the daemon
to parse the XML metadata at startup. It's a zero-copy mmap design that is more
modern and less clunky.

RSS has reduced from 3Mb (peak 3.61Mb) to 1Mb (peak 1.07Mb) and the startup
time has gone from 280ms to 250ms.
2018-10-17 14:41:13 +01:00
Richard Hughes
416ade7f30 trivial: Hardcode the AppStream-glib version
This is the version we've imported from, which allows cabinet files requiring a
specific version of this library to continue working.
2018-10-11 07:54:01 +01:00
Richard Hughes
05cbb7245c Don't use AppStream-glib for version helpers
Refactor the imported version format code now we now longer need to stick to
the API mistakes of libappstream-glib.
2018-10-11 07:54:01 +01:00
Richard Hughes
d3d2c2c39f Don't use AppStream-glib for the GUID helpers
Long term we want to wean ourselves away from libappstream-glib.
2018-10-11 07:54:01 +01:00
Mario Limonciello
78599edcc9 trivial: correct a memory leak of the FuDevice when replugging 2018-10-10 11:24:27 -05:00
Richard Hughes
12c849966d Allow firmware files to depend on versions from other devices
At the moment firmware can declare that it has certain requirements, for
instance the existing firmware version, the bootloader version, or the
vendor ID of the device.

In some situations we actually want to check the firmware version of a
*different* device. Good examples here would be only allowing an EC upgrade if
a specific BIOS update has already been done, or only allowing a wireless
reciever to be updated if the attached wireless devices have been updated first.

To use this, you can do something like:

    <requires>
      <id compare="ge" version="1.1.3">org.freedesktop.fwupd</id>
      <firmware compare="ge" version="0.9.0">guid-of-other-device</firmware>
    </requires>
2018-10-02 06:53:52 -05:00
Mario Limonciello
769d768be9 trivial: fu-engine: downgrade couldn't find new device message to debug
I've found that this message comes up sometimes due to reprobing order
and it shouldn't be considered important enough to generate a warning.
2018-10-02 11:52:28 +01:00
Mario Limonciello
9cecbe1d1b fu-engine: Optionally wait for replug before updating a device
Plugins may have marked a device as needing to replug duing a
composite device preparation due to the order devices were plugged
in.
2018-09-27 09:18:31 -05:00
Richard Hughes
e671c05771 trivial: Do not use AsProfile
The profiling data is of limited use, and better data can be obtained using
kcachegrind and massif. Additionally, the profile samples were the cause of the
small RSS growth over time, when in reality the data would only be shown when
the verbose switch is used at daemon startup.
2018-09-18 06:23:25 -05:00
Mario Limonciello
fc139357e1 fu-engine: Don't show devices pending a reboot in GetUpgrades
Fixes part of http://gitlab.gnome.org/GNOME/gnome-software/issues/341
2018-09-13 10:37:29 -05:00
Richard Hughes
37d0943844 Add FuMutex helper to make various parts of the daemon thread-safe 2018-09-12 16:10:38 +01:00
Richard Hughes
5a9a6bd479 trivial: Return reference counted devices from FuDeviceList 2018-09-12 16:10:38 +01:00
Mario Limonciello
e6d2cf4dda trivial: Skip debugging messages for skipped releases
These are less interesting than which releases actually get added.
2018-09-11 18:59:05 +01:00
Richard Hughes
a1e82d3448 trivial: Add the components to the daemon store in one operation
This removes hundreds of lines of debugging spew.
2018-09-11 18:59:05 +01:00
Richard Hughes
17558acb35 trivial: Only show the number of loaded components at startup 2018-09-11 18:59:05 +01:00
Richard Hughes
b08e7bc7aa trivial: Set a log domain for each file
This allows us to do something like:

G_MESSAGES_DEBUG=FuEngine ./src/fwupd
2018-09-11 18:59:05 +01:00
Richard Hughes
7772dcfc91 trivial: Ensure the daemon sends IDLE when firmware is updated 2018-09-10 16:12:12 +01:00
Richard Hughes
ebae396d0a udev: Do not add devices after a small delay
Now devices can have multiple GUIDs and do not share platform IDs there is
really no point waiting to add the device.

This allows us to remove a whole lot of code for this now-unused functionality.
2018-09-09 16:24:30 +01:00
Mario Limonciello
b6fa47381e trivial: Refresh the list of devices sent to composite_cleanup()
If one of the devices went into replug during update the FuDevice instance will
have changed.
2018-09-07 15:16:14 +01:00
Richard Hughes
405baebbf2 trivial: Don't allow plugins to call fu_udev_device_emit_changed() 2018-09-06 16:22:46 +01:00
Richard Hughes
c125ec02ed Clarify what the platform ID actually is by renaming it
It wasn't hugely clear what the platform ID was actually meant to represent. In
some cases it was being used like a physical ID, in others it was a logical ID,
and in others it was both. In some cases it was even used as a sysfs path.

Clear up all the confusion by splitting the platform ID into two parts, an
optional *physical* ID to represent the electrical connection, and an optional
*logical* ID to disambiguate composite devices with the same physical ID.

Also create an explicit sysfs_path getter for FuUdevDevice to make this clear.

This allows WAIT_FOR_REPLUG to always work, rather than depending on the order
that the GUIDs were added, and that the kernel would always return the same
sysfs path (which it doesn't have to do, especially for hidraw devices).
2018-09-06 16:22:46 +01:00
Richard Hughes
037ce37fe6 trivial: Add some error prefixes to help debug a replug issue 2018-09-06 09:24:23 +01:00
Richard Hughes
828c039c00 trivial: Fix up some gtk-doc warnings 2018-09-04 08:22:39 -05:00
Richard Hughes
ff704414f6 Use superclassed versions of FuDevice when calling udev_added() and usb_added()
The daemon creates a baseclass of either FuUsbDevice or FuUdevDevice when the
devices are added or coldplugged to match the quirk database and to find out
what plugin to run.

This is proxied to plugins, but they are given the GUsbDevice or GUdevDevice and
the FuDevice is just thrown away. Most plugins either use a FuUsbDevice or
superclassed version like FuNvmeDevice and so we re-create the FuDevice, re-probe
the hardware, re-query the quirk database and then return this to the daemon.

In some cases, plugins actually probe the hardware three times (!) by creating
a FuUsbDevice to get the quirks, so that the plugin knows what kind of
superclass to create, which then itself probes the hardware again.

Passing the temporary FuDevice to the plugins means that the simplest ones can
just fu_plugin_device_add() the passed in object, or create a superclass and
incorporate the actual GUsbDevice and all the GUIDs.

This breaks internal plugin API but speeds up startup substantially and deletes
a lot of code.
2018-09-04 08:22:39 -05:00
Mario Limonciello
e260ead594 Notify all plugins of device removals through a new vfunc 2018-09-04 10:00:52 +01:00
Richard Hughes
3a8d532855 Allow the device list to take care of waiting for the device replug
This means that individual plugins do not have to manage thier own GUsbDevice
lifecycle and no longer have to call g_usb_context_wait_for_replug().
2018-08-31 16:41:40 +01:00
Richard Hughes
effcc7a7a7 trivial: Fix regression when enumerating udev subsystems 2018-08-31 14:34:01 +01:00
Richard Hughes
23170a8195 trivial: Set the plugin name when the GUID is added 2018-08-29 14:27:57 +01:00
Salud Lemus
980f2d9551 fu-engine: Don't fail get-details if compiled without GPG/PKCS7
Similar to commit 7d35278 regarding the install option with a daemon compiled without
GPG, but now, if you also have a daemon compiled without GPG, and if you have downloaded a
CAB file from LVFS and ran get-details, it would fail to display the contents
of the associated CAB file.

This allows it to still display the contents of the CAB file, and
a warning will be displayed in the logs.
2018-08-29 10:27:40 +01:00
Richard Hughes
6dec401a67 Store the DeviceInstanceId as a GUID in the quirk database
This allows us to match non-DeviceID GUIDs, and also GUIDs we don't know how to
generate.

To make this fully useful, search for device quirks when GUIDs are added.
2018-08-28 18:30:00 +01:00
Richard Hughes
73bf2337c1 trivial: Add fu_common_strtoull() as a shared function 2018-08-28 09:41:10 +01:00
Richard Hughes
9d6e0e743b Move the GUdevClient to the core daemon
Allowing plugins to 'register' for different udev subsystems in _init() allows
us to move the client to the engine, reducing the number of wakeups considerably
for each device event. It also will reduce the amount of boilerplate code in
each plugin that uses GUdev, much like we have done for GUsb.
2018-08-26 19:42:28 +01:00
Richard Hughes
bb764e99a0 trivial: Add fu_device_list_get_by_platform_id() 2018-08-26 19:38:58 +01:00
Mario Limonciello
e3b1a3f558 Plumb through support to set FwupdInstallFlags for update_prepare/update_cleanup
This will be used by other future commits.
2018-08-21 13:49:38 -05:00
Mario Limonciello
6463f311b8 fu-engine: emit signals when initializing
Some devices take a long time to initialize and tools like fu-tool
have no feedback during this time.

Show a status message to indicate what's going on.
2018-08-10 14:52:55 +01:00
Richard Hughes
ec85ebc760 trivial: Emit device-changed when the device status or percentage changes 2018-08-10 14:50:43 +01:00
Mario Limonciello
59cd4706f0 trivial: fu-engine: downgrade "Using Plugins %s" to debug
This isn't useful for most people and just takes up space in the logs.
When there is a problem it's typically specifically with a plugin
and at that time we ask them to run the daemon with verbose anyway.
2018-08-09 13:47:35 -05:00
Richard Hughes
02c90d8a03 Remove the unused Emacs indenting headers from all source files
Fixes https://github.com/hughsie/fwupd/issues/636
2018-08-09 12:48:04 +01:00
Richard Hughes
81c427ca6d Allow different plugins to add the same device
In this instance, we define the 'same device' to be a FuDevice that has at
least one matching GUID. We allow the plugins to define which one is 'better'
than other plugins, and use this to only have one FuDevice for the physical
device.

Alternative to https://github.com/hughsie/fwupd/pull/604
2018-08-06 21:58:28 -05:00
Richard Hughes
881f624eba trivial: Fix getting details about firmware for unknown devices
Fix a logic error when testing requirements; what was supposed to happen was
that a the firmware requirements were only processed when we had a FuDevice set
in the FuInstallTask, but instead we were falling through to the handler for
'unknown requirement type'.
2018-08-06 11:03:08 +01:00
Richard Hughes
38c7c334f4 trivial: Remove duplicate requirement checks
The fu_engine_check_requirements() tests are already called from
fu_engine_get_result_from_app() using a NULL device.
2018-08-06 10:59:13 +01:00
Mario Limonciello
4afe7fb742 fu-engine: Add a timer for device update wrapping blob installation
This makes it a lot easier to benchmark performance relative to
other implementations, systems and buses.
2018-08-06 00:34:42 -05:00
Richard Hughes
2d37c3f64b trivial: Add a virtual provide of com.redhat.fwupdate
Some firmware depends on this component, which we absorbed in the last release.

See also: https://github.com/hughsie/fwupd/issues/614
2018-08-04 19:06:03 +01:00
Richard Hughes
f307775675 Add release information for locked devices 2018-06-28 15:51:11 +01:00
Richard Hughes
87fb9ff447 Change the quirk file structure to be more efficient
This pivots the data storage so that the group is used as the preconditon
and the key name is used as the parameter to change. This allows a more natural
data flow, where a new device needs one new group and a few few keys, rather
than multiple groups, each with one key.

This also allows us to remove the key globbing when matching the version format
which is often a source of confusion.

Whilst changing all the quirk files, change the key prefixes to be more familiar
to Windows users (e.g. Hwid -> Smbios, and FuUsbDevice -> DeviceInstanceId)
who have to use the same IDs in Windows Update.

This also allows us to pre-match the desired plugin, rather than calling the
probe() function on each plugin.
2018-06-28 13:32:30 +01:00