Commit Graph

16 Commits

Author SHA1 Message Date
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