Commit Graph

25 Commits

Author SHA1 Message Date
Richard Hughes
c6c312f267 trivial: Move fu_plugin_runner_schedule_update() into the engine 2019-02-04 14:54:54 +00:00
Mario Limonciello
2ac3aca2a7 uefi: Append the header on capsules without headers from Linux
This allows using better heuristics and potentially phasing this out
in the future.
2018-12-11 12:51:57 -06:00
Mario Limonciello
dc48bec157 uefi: Move the TPM unlocking functionality from the Dell to UEFI plugin
This allows devices that have been registered to be correctly unlocked.
2018-10-10 14:30:49 +01:00
Mario Limonciello
e58ad0bd77 trivial: dell: Assert true in self tests 2018-09-21 07:35:08 +01:00
Mario Limonciello
20447a00ae dell: Stop showing errors when no dock plugged in
Since it matches the Realtek dongle, shouldn't show this error:

failed to add USB device 0bda:8153: no dock detected

All the time when that dongle is plugged in
2018-09-11 18:59:05 +01:00
Richard Hughes
4adf3bb52c trivial: Remove duplicate header includes 2018-09-04 08:22:39 -05:00
Mario Limonciello
cc722dbb2c dell: Adjust for changes in daemon around USB removal
1) Switch to daemon provided vfuncs for USB
2) Set quirks so that the plugin only runs when Realtek NIC shows up
3) Rely on the daemon to process all removals by parent tree
2018-09-04 10:00:52 +01: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
f83adbab56 dell: Fix a tiny memory leak in the self test wrapper 2018-06-28 19:08:39 +01:00
Richard Hughes
1ccf35a9e4 dell: Register devices with the uefi plugin rather than using libfwup directly
The device registration allows us to create a 'virtual' device that can accept
capsule updates that is not found in the ESRT.
2018-06-28 15:51:11 +01:00
Richard Hughes
e48351e260 Set the alternate device ID, not the object itself
If the daemon either de-duplicates or replaces the object passed emitted from
device-added then the object set as the alternate may not be the same instance
as the daemon version. This causes weird things to happen.

To make this less fragile, specify the *ID* of the object that should be the
alternate device, which allows the daemon to do clever things, and then assign
the object from the ID as the last step.

Although fixing no bug, this makes implementing future functionality easier.
2018-06-22 13:28:27 +01:00
Richard Hughes
1107fa4c9a dell: Do not rely of the order the devices are added in the self tests
Get the TPM v2.0 and v1.2 devices explictly rather than assuming the non-alt
device is always added first. This has the side effect of making the tests
easier to read and means we can check the dock components more carefully.
2018-06-22 13:28:27 +01:00
Mario Limonciello
51308e648a Adjust all licensing to LGPL 2.1+ (Closes: #526) 2018-05-29 09:03:13 +01:00
Mario Limonciello
736be7440f dell: block owned TPM updates (#339)
Also make it clearer what the logic is checking.
2017-12-13 12:13:33 -06:00
Richard Hughes
23135eb1c9 trivial: Remove the now-unused fu_plugin_set_status() 2017-12-04 17:00:22 +00:00
Richard Hughes
e655008a73 trivial: Fix starting conditions in the self tests
Found using Coverity.
2017-08-30 15:06:06 +01:00
Mario Limonciello
f1cc61d2f0 trivial: dell: TPM switching blacklist->whitelist
It's been decided that TPM mode switching won't be supported
on any other new platforms.  Instead of blacklisting the outliers
whitelist the (smaller) list of platforms that do support the
feature.
2017-08-29 16:37:14 -05:00
Richard Hughes
91628ff8b6 dell: Use fu_device_has_flag() in the self tests 2017-08-26 18:09:21 +01:00
Richard Hughes
a785a1c2f6 Remove the confusing ALLOW_OFFLINE and ALLOW_ONLINE flags
Over the months the original meaning of ALLOW_OFFLINE and ALLOW_ONLINE have be
lost, and there is now a confusing mixture of uses in the source tree. With this
commit we make it clear the UPDATABLE flag is used to specify when the device is
updatable (e.g. from the desktop live session, or from the systemd offline
updates mode, or both) and the NEEDS_REBOOT flag lets us know when the update
is actually going to be done.

For instance, a UEFI UpdateCapsule can be *scheduled* from either the desktop
or from the update mode (but the latter would be a bit weird), but does require
a reboot. Some devices might only be updatable outside the live session, for
instance a hard drive update or a GPU update -- there's just too much going on
with a live session and we want to tightly control what's running during the
firmware flash.

This also means we don't have to "retry" the update when scheduling an update
that really can be scheduled whenever, but just requires a reboot to apply.
2017-08-26 18:09:21 +01:00
Richard Hughes
f592b06722 dell: Fix the last of the memory leaks in the self tests
Fixes: https://github.com/hughsie/fwupd/issues/158
2017-07-24 10:55:03 +01:00
Mario Limonciello
11ca8122c3 Revert "trivial: fix some more memory leaks in dell plugin (#158)"
This reverts commit 49aba8cd87.

That was prematurely committed, my apologies.
2017-07-18 16:00:03 -05:00
Mario Limonciello
49aba8cd87 trivial: fix some more memory leaks in dell plugin (#158) 2017-07-18 15:53:38 -05:00
Richard Hughes
d3f4b5a428 trivial: Define the build dir outside the source file 2017-04-12 14:26:14 +01:00
Mario Limonciello
bae3a02348 trivial: dell: move some dock lookup code into -common
This allows other plugins to compile in -common to be able look
up some dock related items.
2017-01-30 20:17:48 -06:00
Richard Hughes
cff38bcb3a Convert the providers to plugins to simplify code and for future features
This is a large commit that removes all the providers and turns them into
plugins. I think having both providers _and_ plugins was super confusing.

Plugins are loaded at runtime so you could in theory develop a new plugin
without putting it in the fwupd source tree, although there are no installed
headers or PC files as I'm not sure it's a good idea at this stage.

This commit moves all the per-provider docs, tests, notes, debug dumps and test
data to plugin-specific directories -- these also allows the plugin author to
"own" more of the source tree so we don't enforce fu- prefixes and the style
guide everywhere.

This allows us to run the same action on all the plugins in the future, so we
could have a prepare(FuPlugin, FuDevice) and cleanup(FuPlugin, FuDevice) run
on *all* plugins, so doing an update using one plugin would allow us to work
around hardware quirks in other plugins.

If I've broken your out-of-tree provider it's trivial to port to the new API
with sed and a fixed up build file. If you need help please let me know.
2016-12-12 12:31:23 +00:00