Mario Limonciello
55de39c077
trivial: reformat the whole tree to match new format
2021-08-24 11:18:40 -05:00
Daniel Campello
2ece14d9e3
Fix battery threshold handling when AC is *not* required
2021-07-27 17:23:15 -06:00
Daniel Campello
924aa5a44b
upower: Move battery_threshold setting to fu-engine
...
Change-Id: I63b4735bbaaf6f2cbdfb3f73b70b1fd4b3087a70
2021-07-21 21:53:57 +01:00
Mario Limonciello
6f83190392
trivial: drop support for upower.conf ( Fixes : #3384 )
...
All overrides should be performed using `power.quirk`
2021-06-18 09:12:57 +01:00
Mario Limonciello
73cdf067ed
trivial: fixup includes for a variety of plugins
2021-06-14 10:12:45 +01:00
Richard Hughes
3ba0b29ba3
trivial: Fix critical warning when running fwupd as non-root
2021-05-18 11:06:51 +01:00
Richard Hughes
355fd54e15
upower: Fix critical warning introduced recently
2021-05-11 20:10:58 +01:00
Richard Hughes
e8f95bc26d
Do not prevent firmware updates on desktop hardware
...
Fixes https://github.com/fwupd/fwupd/issues/3236
2021-05-10 14:36:51 +01:00
Richard Hughes
4d76d18d35
Set the system battery state and level on the FuContext shared state
...
This allows plugins to set the battery power state of the *machine* which means
we can automatically inhibit devices with FWUPD_DEVICE_FLAG_REQUIRE_AC set.
It also allows to set the BatteryThreshold to 25% for Lenovo hardware, and we
can override other vendors with further quirks as required.
Fixes https://github.com/fwupd/fwupd/issues/3084
2021-04-07 08:05:15 +01:00
Richard Hughes
62a8b0c288
Add fu_device_set_battery_threshold() ( #3086 )
...
This allows a device to set a custom 'check battery level is X%' value from
either the plugin or from a quirk.
2021-03-31 16:43:36 +01:00
Mario Limonciello
75835b4a0b
Use FWUPD_COMPILATION define to indicate an in tree build
...
When this is done, include:
* Including the hash
* Including anything that is not ABI stable in plugins yet
Suggested-by: Simon McVittie <smcv@debian.org>
2021-01-22 14:01:25 -06:00
Richard Hughes
6450d0deb4
Add FwupdInstallFlags of _IGNORE_CHECKSUM, _IGNORE_VID_PID and _IGNORE_POWER
...
The FWUPD_INSTALL_FLAG_FORCE flag has really unclear semantics, and ignoring a
file CRC, checksum or model ID should only be done when using fwupdtool actually
debugging a plugin or firmware parser.
Use the existing --force flag when we want a "gentle nudge" like reuploading
previously processed reports.
2020-10-07 13:15:09 +01:00
Richard Hughes
e5a4d52ea1
trivial: Spelling fixes from codespell
2020-06-18 20:49:12 +01:00
Mario Limonciello
7a3985f2de
upower: Move battery threshold declaration into a configuration file
2020-02-13 09:52:20 -08:00
Mario Limonciello
e396f62d74
upower: Decrease minimum battery requirement to 10%
...
Dell's behavioral spec for this aligns the threshold for this at 10%
rather than 30%.
2020-02-13 09:52:20 -08:00
Richard Hughes
b1fd77780f
trivial: Fix a tiny memory leak introduced with the UPower fix
2020-01-16 15:29:08 +00:00
Richard Hughes
6b8c261225
Disable the battery percentage checks if UPower is unavailable
...
Based on a patch by Crag Wang <Crag.Wang@dell.com>, many thanks.
2020-01-15 15:54:00 +00:00
Mario Limonciello
6abe21efbd
trivial: stop including fu-hash.h as part of fu-plugin-vfuncs.h
...
Explicitly include it in all "in-tree" plugins.
If headers are exported out of tree we will likely explicitly not
export this header.
2019-11-25 09:29:46 +00:00
Richard Hughes
4266ac4765
Add a specific error code for the low battery case
...
Users are getting confused when they're being told that AC power is required
when they are already on AC power... but the battery is too low to perform the
update.
2019-07-11 09:31:34 -07:00
Mario Limonciello
303c4f0f90
trivial: upower: correct a logic error from ed021ab
...
When unable to read battery value this should return FALSE to indicate
AC power.
2019-01-31 14:56:08 -06: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
Mario Limonciello
ed021ab448
upower: Add support for checking battery percentage
...
On any devices that normally would require checking for AC also
check that at least one battery on the system has at least 30% to
perform an update.
Fixes : #925
2019-01-15 10:43:18 -06:00
Richard Hughes
4adf3bb52c
trivial: Remove duplicate header includes
2018-09-04 08:22:39 -05:00
Mario Limonciello
e3f581297f
upower: Allow forcing installation even if no AC power is applied
2018-08-21 13:49:38 -05: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
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
Mario Limonciello
51308e648a
Adjust all licensing to LGPL 2.1+ ( Closes : #526 )
2018-05-29 09:03:13 +01:00
Mario Limonciello
c29b398ad0
trivial: fix various spelling errors
2017-07-17 13:07:05 -05:00
Richard Hughes
59a9344c1e
Move the UPower functionality to a plugin
2016-12-12 16:28:16 +00:00