summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehw/tdehardwaredevices.cpp
Commit message (Collapse)AuthorAgeFilesLines
* tdehwlib: Add event device classification according to the provided switches.Slávek Banko2020-02-231-3/+9
| | | | | | | | This will resolve event device detection on special hardware, for example, the LID switch on Pinebook Pro. Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit f68fadda81d0e107d904a08db30bd8cccbbd1a21)
* tdehwlib: Unify units of battery values.Slávek Banko2020-02-161-8/+42
| | | | | | | | | | | The values from energy_* and power_now are converted from mWh and mW to Ah and A, so that the units are equal to values from charge_* and current_now. This resolves issue #68. Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit c088fbf55bde4faa68a6d51ba44085bd97c1e4e2)
* Removed explicit usage of the 'register' keyword.Michele Calgaro2020-01-301-1/+1
| | | | | Signed-off-by: Michele Calgaro <[email protected]> (cherry picked from commit aa98dbfe80580169f3df12489a77e8b904a1d9b9)
* tdehwlib: Adjusted parsing of battery informationSlávek Banko2020-01-231-8/+24
| | | | | | | | | | | | + Added reading of estimated time to fully charged battery (time_to_full_now) The remaining time is calculated if the value is not provided in the battery information. If the battery does not provide charging current information, the estimated time to charge the battery cannot be calculated. Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit ecd1e4bd401a00be11f4d8bbaff01718f29f9118)
* tdehwlib: Fix parsing of CPU cores frequency informationSlávek Banko2020-01-091-77/+71
| | | | | | | | | | | | | | | | | + The current frequency is parsed from the scaling_cur_freq file If the current frequency is not found in /proc/cpuinfo, the attempt to read value from cpuinfo_cur_freq failed because only root can read this file. + The have_frequency flag is not set when parsing current frequency from sysfs Setting the have_frequency flag after parsing current frequency for the first core caused the current frequency not to be parsed for other cores. + Frequency characteristics are parsed for all cores The assumption that the frequency characteristics for all cores will be the same as the first core is no longer reliable. There are heterogeneous architectures - for example ARM big.LITTLE. Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit ba82cdf5be78b46889dc0d1e3906e353489925ad)
* tdehw: Fix wrong merge location in prior commit.Slávek Banko2020-01-081-3/+3
| | | | | Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 8856d5dde1a086f94b6875fd96fa6d3e479de170)
* tdehwlib: Adjusted parsing of battery informationSlávek Banko2020-01-081-9/+28
| | | | | | | | | | | | | | | | | | | | | | | + Added initialization of all values Some batteries do not provide all values and, without initialization, values may contain dubious data. + Added reading of current battery capacity value in percent (capacity) Some batteries may provide the current capacity value in percent instead of the current energy value. + Added check whether the battery provides current energy value (charge_now or energy_now) The current energy is calculated if the value is not provided in the battery information. + Added reading of estimated time to empty battery (time_to_empty_now) The remaining time is calculated if the value is not provided in the battery information. If the battery does not provide charging current information, the estimated time to charge the battery cannot be calculated. Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 86c1d896c748bf5117ccfe28b20e48a7e2a70c8d)
* tdehwlib: Classify the charger as an AC adapter, not as a battery.Slávek Banko2020-01-081-0/+1
| | | | | Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 3b0f07f2cdf3c5228b6d38b33fb5f2bc8fa0542d)
* tdehw: improved code for mount table.Michele Calgaro2019-07-051-19/+17
| | | | | Signed-off-by: Michele Calgaro <[email protected]> (cherry picked from commit 09835dceb73b0e814fb7b2e915b8055d67fa83c9)
* tdehwlib: Fix the flag setting whether the storage device contains the file ↵Slávek Banko2019-02-271-1/+1
| | | | | | | | | system. This resolves bug 2232, bug 2607 and bug 2946. Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit dfe3c9649f649f2dbd7eac60e3847d4e978e24f4)
* Fix crash in tdehwlib if /sys/devices/system/cpu/cpu* is not accessibleSlávek Banko2017-09-231-3/+5
| | | | | Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 051acc7df5ff02d7bb1ad92b9be95efdc553d6c0)
* tdehwlib: Add a rule for classifying parport deviceSlávek Banko2017-06-171-1/+2
| | | | | Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit eb6f8213d42aac2911c7b8880628c786b0223935)
* tdehwlib: Add a rule for classifying remote control devicesSlávek Banko2017-06-171-0/+4
| | | | | Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit cc4f1996df344ff06b34931a362037af25a66ef9)
* tdehwlib: Allow to gather connection information on virtual net devicesSlávek Banko2017-06-171-1/+2
| | | | | Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit d1280c31d9394e157c10d1d9a493763f03c3d285)
* tdehwlib: Allow to classify virtual devices by subsystemSlávek Banko2017-06-171-3/+3
| | | | | Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit a73511a98d46bd9cceff8da7819b8ab523b9ad6c)
* Fix memory leak after processing udev_monitorSlávek Banko2017-03-251-0/+3
| | | | | Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit d2b61ae9dac0e38c8f2853a41a3fb194fd794cf7)
* Fix memory leak after processing udev_deviceSlávek Banko2017-03-251-0/+2
| | | | | Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 1a5bc0e4ffef4e8baef9f3554ba3184fbc674211)
* Probe partitions to get filesystem typeTimothy Pearson2016-09-081-4/+2
| | | | | | This fixes problems with LUKS partitions not being detected (cherry picked from commit 30c008d5512bf83039d2e24d2e737303f68a42af)
* Properly classify Lenovo USB camera platform subdevicesTimothy Pearson2016-09-081-0/+5
| | | | (cherry picked from commit b18bff9ad82dd217efa1adefb3ab8308b0344c49)
* Fix crash in tdehwlib on partitions without parent diskr14.0.3Slávek Banko2016-02-111-6/+9
| | | | | | | This applies for example to the software RAID defined in the BIOS Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 36481f68c1cbb7c55a7325d709311e20b9c2ce54)
* Fix mountable flag for disk partitionsSlávek Banko2016-02-041-1/+5
| | | | | Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit ff469a69ff7951e429b5ce48187906aac5ad89f9)
* Add a rule for classifying ATA Compact Flash AdapterSlávek Banko2016-02-041-1/+2
| | | | | Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 613eadbbc35a25f19c205c32eeeb0b890d468aa6)
* Set partition disk type and status based on the parent deviceSlávek Banko2016-02-041-1/+15
| | | | | Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 51046798068760d062a1924fff4a99c7b8a60b71)
* Set hotpluggable flag for flash disks instead of removableSlávek Banko2016-02-041-1/+1
| | | | | Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit f8fbb3bd78ac30e41c81261b4a71c61dcead811f)
* Force removable flag for flask disks in tdehwlibSlávek Banko2016-01-311-0/+10
| | | | | | | This resolves Bug 2473 Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit dc350e6c6406a78621763c2d4fcbea8deca01c7c)
* Fix crash in tdehwlib if not exists /sys/devices/system/cpuSlávek Banko2016-01-271-13/+15
| | | | | | | This resolves Bug 2584 Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit f4fb3a8e71882fec8beffccf0ba3c5eb54310c89)
* Fix ZIP drive classification in tdehwlibSlávek Banko2016-01-271-8/+9
| | | | | Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 6dfc04c51a9c2086e2f6a4be75ec847e8ef9f6fb)
* Classify flash drives as HDD in tdehwlibSlávek Banko2016-01-271-1/+6
| | | | | | | This relates to Bug 2473 Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 6a2a9de49cc8987d0f43bc1076db81771fe2f50e)
* Prefer encoded disk labels in tdehwlibSlávek Banko2016-01-231-1/+7
| | | | | | | because it contains unadjusted disk labels Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 893ac9fad0249a9ed959e2e8e28952415291b3a2)
* Add floppy into disk type clasification in tdehwlibSlávek Banko2016-01-231-0/+5
| | | | | | | This resolves Bug 2567 Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit ba2a3bc188922722090b4afd1623451886b1520c)
* Fix disk type clasification in tdehwlibSlávek Banko2016-01-231-12/+6
| | | | | | | This resolves Bug 2473 Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 68102d50e99fe35442f78be21cf8b720481e7e0b)
* Fix calculation of remaining charging time in TDE hardware librarySlávek Banko2015-12-041-2/+7
| | | | | Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 075cf11458a98245a47505b944c5606c1b86afb2)
* Fix hardware class file matching algorithmTimothy Pearson2015-10-021-15/+49
| | | | | | Fix overly broad floppy device matching rules This resolves Bug 2534 (cherry picked from commit fd0de2b581ab3f3bab7bc540d8348f994464723f)
* Classify memstick_host devicesTimothy Pearson2015-04-071-1/+2
| | | | (cherry picked from commit 669345d6b80ea91a19a93400798629c94055216e)
* Bring keyboard icon into XDG complianceTimothy Pearson2015-03-261-1/+1
| | | | (cherry picked from commit 3e23bfa58d9488d44099dffd4b05bc456ae28022)
* Bring printer1 icon into XDG complianceTimothy Pearson2015-03-261-1/+1
| | | | (cherry picked from commit 61f6eb5a1e6d7094d993d6e26f4c02c94b3fa1c3)
* Bring mouse icon into XDG complianceTimothy Pearson2015-03-261-1/+1
| | | | (cherry picked from commit 891dbd6b985ac3279cc03af699ced0f6d8672911)
* Rename most device icons to comply with XDG standardsTimothy Pearson2015-03-041-1/+1
| | | | (cherry picked from commit 86686421b5b46ca556cf11f71cc5a0098bbe4970)
* Fix detection of laptop AC adaptersTimothy Pearson2014-12-051-2/+3
|
* Do not flag disk devices/partitions as mountable if a partition table is ↵Timothy Pearson2014-12-051-38/+42
| | | | | | present under the given device/partition This relates to Bug 2232
* Add Hidden storage device attributeTimothy Pearson2014-11-271-0/+4
| | | | This relates to Bug 2211
* Fix hardware control center crashes on device hot removeTimothy Pearson2014-11-261-2/+9
| | | | Fix incorrect decoding of hex escaped device names
* Bring package_development, package_games, package_graphics, package_network, ↵Timothy Pearson2014-10-141-9/+9
| | | | package_multimedia, package_wordprocessing, edu_science, package_utilities, input_devices_settings, kcmsystem, personal, and looknfeel icons into XDG compliance
* Bring camera icons into XDG complianceTimothy Pearson2014-10-111-1/+1
|
* Fix potential crash if CPU #0 is not availableTimothy Pearson2014-10-021-3/+3
|
* Add mimeTypePtrFast method to KFileItemTimothy Pearson2014-10-021-0/+1
| | | | | | This relates to Bug 699 Clean up a couple of minor build warnings Classify usbmisc devices
* Classify regulator devicesTimothy Pearson2014-09-231-0/+3
|
* Update hardware device classification mapTimothy Pearson2014-09-201-0/+15
| | | | Fix potential infinite loop in TDEStyle
* Add a few unclassified devices to the TDE HW manager databaseTimothy Pearson2014-07-091-2/+8
|
* Optimize watching switches on input event devicesSlávek Banko2014-05-161-188/+4
| | | | This relates to Bugs 1992 and 2052