diff options
author | Yaroslav Isakov <yaroslav.isakov@gmail.com> | 2016-02-22 17:17:57 +0300 |
---|---|---|
committer | Nivedita Swaminathan <nivedita.swaminathan@intel.com> | 2016-03-24 12:26:09 -0700 |
commit | 44d78f9cc58c010b64c78d129fb8f1926f5d46bd (patch) | |
tree | c61c77a39b8b3a49cc19fb852d484e518b5c65d5 | |
parent | b13583520f2996aaa198321d157105fdad94bd88 (diff) | |
download | powertop-2.0-44d78f9cc58c010b64c78d129fb8f1926f5d46bd.tar.gz |
Fixed bug when all PCI devices usage is shown as 00%
-rw-r--r-- | src/devices/runtime_pm.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/devices/runtime_pm.cpp b/src/devices/runtime_pm.cpp index ccfd945..26f9d32 100644 --- a/src/devices/runtime_pm.cpp +++ b/src/devices/runtime_pm.cpp @@ -194,6 +194,7 @@ static void do_bus(const char *bus) if (entry->d_name[0] == '.') continue; + snprintf(filename, sizeof(filename), "/sys/bus/%s/devices/%s", bus, entry->d_name); dev = new class runtime_pmdevice(entry->d_name, filename); if (strcmp(bus, "i2c") == 0) { |