Richard Hughes
5060246526
trivial: Move the USB quirks from FuPlugin to FuUsbDevice
...
Also rename some general USB quirks that are not specific to any one plugin.
2017-12-11 10:47:18 +00:00
Richard Hughes
a29711c4a1
Move the FuQuirks reference down from DfuDevice to FuDevice
2017-12-11 10:47:18 +00:00
Richard Hughes
7de50dbe92
trivial: Only reuse the added device if it has recently been removed
2017-12-11 09:44:36 +00:00
Richard Hughes
66268d0b31
unifying: Fix the string output format to match FuDevice
2017-12-10 14:50:58 +00:00
Richard Hughes
9b7bd190ed
trivial: Don't show (null) in the debug logs
2017-12-10 14:50:54 +00:00
Richard Hughes
ae252cd83c
trivial: Add some common functionality from reading and writing to a buffer
2017-12-08 20:07:09 +00:00
Richard Hughes
725c19fa88
Add a quirk for setting the USB device vendor
2017-12-08 19:36:09 +00:00
Richard Hughes
168b9faa80
Make LuDevice derive from FuDevice
...
This removes a lot of duplicated code.
2017-12-08 09:36:57 +00:00
Richard Hughes
024cc230ed
Add fu_device_set_progress_full()
...
This allows the plugin to use the raw byte values as a progress counter without
first converting to a percentage.
2017-12-08 09:36:57 +00:00
Richard Hughes
fa34bcffa3
trivial: Add a to_string() vfunc for any objects subclassing FuDevice
2017-12-08 09:36:57 +00:00
Richard Hughes
55f8f236a9
trivial: Allow setting the platform-id from the object constructor
2017-12-08 09:36:57 +00:00
Richard Hughes
99f33c7414
Move some common code down into LuDeviceBootloader
...
This is common API shared by the nordic and texas bootloaders.
2017-12-05 16:11:50 +00:00
Richard Hughes
7be4f138f3
trivial: Remove an unused Unifying vfunc
2017-12-05 14:36:48 +00:00
Richard Hughes
e755d6bb05
Add a more general quirk for adding GUIDs to devices
...
This replaces fwupd-dfu-alternate-vidpid which was only useful in the DFU plugin
and somewhat poorly defined.
2017-12-04 17:00:22 +00:00
Richard Hughes
524343ac63
trivial: Remove DfuMode
...
We can get all this information just from looking at the device state.
2017-12-04 17:00:22 +00:00
Richard Hughes
23135eb1c9
trivial: Remove the now-unused fu_plugin_set_status()
2017-12-04 17:00:22 +00:00
Richard Hughes
a2fff1f44e
dfu: Remove DfuContext
...
Use the power of FuUsbDevice in DfuDevice to remove a lot of complicated code.
2017-12-04 17:00:22 +00:00
Richard Hughes
831bea1024
trivial: Manually call the initial DFU refresh to simplify the DfuDevice code
2017-12-04 17:00:22 +00:00
Richard Hughes
92ced1cfbf
trivial: Move the detach and attach to the DFU client tool
...
This isn't used by the daemon and makes the DfuDevice client simpler.
2017-12-04 17:00:22 +00:00
Richard Hughes
01d152e2ef
trivial: Make DfuDevice derive from GUsbDevice
2017-12-04 17:00:22 +00:00
Richard Hughes
1a16cc5e41
trivial: Remove the use of GCancellable in the dfu plugin
...
We're not using this, and we can simplify the code considerably now that the
library is not installed for external users.
2017-12-04 17:00:22 +00:00
Richard Hughes
ec2df91c15
Support AppStream metadata with relative <location> URLs
...
If a remote like LVFS outputs <location>foo.cab</location> without a prepended
hostname and path then we should use the metadata URI hostname and path instead.
This allows us to trivially mirror a firmware repository, although clients using
older versions of libfwupd will not work without this patch. We should encourage
people to use `FirmwareBaseURI` for a long time yet.
2017-12-04 15:46:54 +00:00
Richard Hughes
20323d63ec
Always use the descriptor-provided version and GUID
...
If a device has gone to the trouble of adding the extra interface data then we
should prefer it over the auto-generated values.
2017-12-01 10:49:39 +00:00
Mario Limonciello
eb737f15f5
fix CI builds with -Werror
...
Switching to build in -werror in 4016c839a8
was not working properly. Adjust the CI builds to use --werror instead.
Also while doing this, enable -werror in clang builds.
2017-11-30 16:42:26 -06:00
Mario Limonciello
ba46ee5d61
meson.build: Add -Wincompatible-pointer-types-discards-qualifiers warnings
2017-11-30 16:42:26 -06:00
Richard Hughes
4a833f2dd2
trivial: Create the right kind of device in the steelseries plugin
2017-11-30 21:26:39 +00:00
Richard Hughes
460f0b123c
trivial: Allow calling ->probe if the GUsbDevice changes
2017-11-30 20:56:33 +00:00
Richard Hughes
4a036018f7
Set the progress and state on the FuDevice, not the FuPlugin
...
This makes more sense; we're updating the device, not the plugin itself.
This also means we don't need to funnel everything through callbacks like
GFileProgressCallback and we can also update the state without adding an
explicit callback to each derived device type.
2017-11-30 20:51:52 +00:00
Richard Hughes
e3bc2bcf88
steelseries: Use the new ->probe vfunc
...
Also, fix a silly typo found using Coverity.
2017-11-30 16:50:54 +00:00
Richard Hughes
909d556c03
Get the serial number from USB devices
...
This is currently unused.
2017-11-30 14:16:34 +00:00
Richard Hughes
c7ad7fb746
trivial: Add fu_usb_device_is_open() for future use
2017-11-30 14:16:34 +00:00
Richard Hughes
bde01d5240
nitrokey: Use the new ->probe vfunc
2017-11-30 14:16:34 +00:00
Richard Hughes
9c1cc979ff
ebitdo: Use the new ->probe vfunc
2017-11-30 14:16:34 +00:00
Richard Hughes
af5743101f
colorhug: Use the new ->probe vfunc
2017-11-30 14:16:34 +00:00
Richard Hughes
c3476d56de
Add a method to probe a FuUsbDevice before it is opened
...
This allows us to further clean up device creation.
2017-11-30 14:16:34 +00:00
Richard Hughes
450f952763
trivial: Do not emit a warning when setting a FuUsbDevice:dev to NULL
2017-11-30 14:16:34 +00:00
Richard Hughes
e2e40501ea
trivial: fu_usb_device_set_dev(NULL) should imply a close()
2017-11-30 14:16:34 +00:00
Richard Hughes
18fcbdac53
trivial: Do not allow calling klass->close multiple times on the same device
2017-11-30 14:16:34 +00:00
Philip Withnall
4fbba6f7c0
src: Add some gpointer casts to eliminate compiler warnings
...
These introduce no functional changes, but do shut up
-Wincompatible-pointer-types-discards-qualifiers warnings.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-11-30 13:44:41 +00:00
Philip Withnall
8e2ca90509
udev: Fix a double-free bug
...
That GUdev function returns a const gchar*, not an allocated pointer, so
don’t try to autofree it. This would have caused a crash (I only
observed it as a compiler warning with
-Wincompatible-pointer-types-discards-qualifiers).
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-11-30 13:44:41 +00:00
Philip Withnall
a68a050f39
plugins: Remove various unused variables
...
Fix some compiler warnings to reduce the build noise.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-11-30 13:44:41 +00:00
Richard Hughes
2e9df07dc5
trivial: Remove the DFU-specific hardware tests
...
We have end-to-end installed tests using the daemon now.
2017-11-29 16:00:25 +00:00
Richard Hughes
df149ac006
Remove the superfluous check for a duplicate FuDevice addition
2017-11-29 15:56:29 +00:00
Richard Hughes
94e94eb976
Never overwrite GUsbDevice properties
...
Getting the string indexes from the hardware is not cheap, and also triggers a
warning from the fwupd daemon.
2017-11-29 15:52:12 +00:00
Richard Hughes
634e9228f8
Always show coldplugged USB devices
...
When adding GUsbDevice we didn't account for coldplugging devices using the
GUsbContext enumeration.
2017-11-29 15:50:08 +00:00
Mario Limonciello
47ff62b986
ubuntu: depend on appstream-glib 0.7.4 too
2017-11-28 15:20:32 -06:00
Mario Limonciello
7823ca8241
Bump minimum appstream-glib version to 0.7.4
2017-11-28 14:17:25 -06:00
Richard Hughes
f983b1089f
trivial: post release version bump
2017-11-28 14:59:03 +00:00
Richard Hughes
890660c94a
Release fwupd 1.0.2
2017-11-28 14:31:18 +00:00
Richard Hughes
f3d46c6b03
trivial: Include the remote name if it failed to be updated
2017-11-28 14:14:39 +00:00