Commit Graph

25 Commits

Author SHA1 Message Date
Richard Hughes
faa7871b08 Remove duplicate ->probe() calls to speed up startup by 150ms
Now incorporate is fixed to copy across the properties we need in the
superclass, we don't need to do the subclass ->probe().

Note, we still need to do the subclassed ->probe() when using
FU_UDEV_DEVICE_FLAG_VENDOR_FROM_PARENT or when looking at properties
on the parent device.

This also removes the spurious 'already set GType to FuVliUsbhubDevice,
ignoring FuVliUsbhubDevice' messages when running the daemon.
2022-06-14 21:01:57 +01:00
Richard Hughes
4b1313b406 Split out the GByte helpers to a new source file 2022-06-14 14:36:52 -05:00
Richard Hughes
9d33c29e92 Split out the string helpers to a new source file 2022-06-14 14:36:52 -05:00
Richard Hughes
e6b487e762 Add FuProgress to ->startup() and ->coldplug()
This allows us to profile the daemon startup so we can find any plugins
taking an inordinate amount of time to start.
2022-06-04 20:21:50 +01:00
Richard Hughes
dc91d59f8e Remove the recently added fu_progress_add_step_full()
Just break API instead.
2022-06-03 13:47:11 -05:00
Richard Hughes
0cbcac93cd Rename fu_udev_device_ioctl_full() as we broke ABI 2022-06-03 13:47:11 -05:00
Richard Hughes
029d2895bd Rename fu_udev_device_pread_full() as we broke ABI 2022-06-03 13:47:11 -05:00
Mario Limonciello
48544bd2ac trivial: skip mtd tests if not working off mtdram test device
(LP: #1973598)
2022-05-16 11:22:30 -05:00
Richard Hughes
7ec0f11e69 mtd: Use the correct uSWID child for multiple coSWID children 2022-04-18 17:48:52 +01:00
Richard Hughes
0b7af7d54b trivial: Ignore the return value of setenv() in most cases
This makes Coverity happy.
2022-04-13 15:08:12 +01:00
Richard Hughes
7dc34ff02e Mark more devices as CAN_VERIFY_IMAGE
This allows us to filter the devices when showing what we can dump.
2022-04-01 21:46:04 -05:00
Richard Hughes
2bee2164af trivial: Fix the mtd test when the prefix is read only 2022-03-22 14:36:48 +00:00
Richard Hughes
8ef261af32 mtd: Add some self tests using mtdram 2022-03-18 12:55:44 +00:00
Richard Hughes
df66a1d73e mtd: Ignore devices that report EPERM on open 2022-03-18 12:55:44 +00:00
Richard Hughes
7d9dff4789 mtd: Support dumping the image to a firmware blob 2022-03-18 12:55:44 +00:00
Richard Hughes
095cbad100 mtd: Fix writing mtd images larger than 10kb 2022-03-18 12:55:44 +00:00
Richard Hughes
a6aef01e49 mtd: Do not try to probe recovery read-only partitions
Ignore devices without a 'flags' file.
2022-03-11 16:51:45 +00:00
Richard Hughes
a239dc8ab8 mtd: Allow the metadata to set the signed payload flag 2022-03-11 16:51:45 +00:00
Richard Hughes
c4ca026294 Allow devices to build instance IDs more easily
Provide a device instance builder that allows plugins to easily
create multiple instance IDs based on parent attributes.

Also fix a lot of the instance ID orders, so that we add more generic
IDs first, and more specific IDs after.
2022-03-03 09:13:29 +00:00
Mario Limonciello
661990ed98 Convert build system to use meson tristate features
tristate features will automatically disable if dependencies marked
as required are missing.

Packagers can manually override using `auto_features`.

Link: https://mesonbuild.com/Build-options.html#features
2022-02-28 08:34:48 -06:00
Richard Hughes
cda5879974 mtd: Parse the firmware version using the defined GType 2022-02-18 10:38:17 +00:00
Richard Hughes
f8d1a1606e mtd: Add two more instance IDs to the MTD devices 2022-02-18 10:38:17 +00:00
Richard Hughes
308e03a6f4 Sanitize the instance ID parts more carefully
The only users of `SERIO\FWID` and `I2C\NAME` are already 'safe' and
the device GUIDs should all be unchanged.

There are no current users of the `MTD\NAME` instance IDs, and these
are the ones that may be more unpredictable and in need of sanity.
2022-02-18 08:23:39 +00:00
Richard Hughes
e87fc05ab9 Speed up the daemon startup by ~2% by doing dlsym much less
We were calling g_module_symbol() 2703 times, which is actually more
expensive than you'd think.

It also means the plugins are actually what we tell people they are:
A set of vfuncs that get run. The reality before that they were dlsym'd
functions that get called at pretty random times.
2021-11-09 12:02:07 +00:00
Richard Hughes
36d7077f65 Add a new plugin to handle MTD devices 2021-11-05 20:01:51 +00:00