From e00e5527877578448fd74701994bb96c7e00fd63 Mon Sep 17 00:00:00 2001 From: David Chao Date: Wed, 30 Jun 2021 17:57:05 +0800 Subject: [PATCH] dumpstate: dump state2power table Dump state2power table in cooling_device Bug: 189488358 Test: local test and state2power table can be dumped. Change-Id: Ifb9a8e41158c5452b2f6e856d30ac97011460298 Signed-off-by: David Chao --- dumpstate/DumpstateDevice.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp index 8a2f7233..68474e99 100644 --- a/dumpstate/DumpstateDevice.cpp +++ b/dumpstate/DumpstateDevice.cpp @@ -470,6 +470,10 @@ void DumpstateDevice::dumpThermalSection(int fd) { "for f in /sys/class/thermal/cooling* ; do " "type=`cat $f/type` ; temp=`cat $f/cur_state` ; echo \"$type: $temp\" ; " "done"}); + RunCommandToFd(fd, "Cooling Device State2Power Table", {"/vendor/bin/sh", "-c", + "for f in /sys/class/thermal/cooling* ; do " + "type=`cat $f/type` ; state2power_table=`cat $f/state2power_table` ; echo \"$type: $state2power_table\" ; " + "done"}); } // Dump items related to touch