Pixelstats: add block layer stats length

The block layer stats format is changing
time by time. This can pass the correct
length by project.

Bug: 219860725
Test: reboot and check log
Change-Id: Icf63dd5e80a820212beebe414a6ddc3a7f42dfa4
This commit is contained in:
Ocean Chen 2022-06-09 02:52:08 +08:00
parent 6037da67d0
commit f32db03343

View file

@ -28,6 +28,7 @@
using android::hardware::google::pixel::SysfsCollector; using android::hardware::google::pixel::SysfsCollector;
using android::hardware::google::pixel::UeventListener; using android::hardware::google::pixel::UeventListener;
#define BLOCK_STATS_LENGTH 17
#define UFSHC_PATH(filename) "/dev/sys/block/bootdevice/" #filename #define UFSHC_PATH(filename) "/dev/sys/block/bootdevice/" #filename
#define UFS_ERR_PATH(err_type) UFSHC_PATH(err_stats/) #err_type #define UFS_ERR_PATH(err_type) UFSHC_PATH(err_stats/) #err_type
const struct SysfsCollector::SysfsPaths sysfs_paths = { const struct SysfsCollector::SysfsPaths sysfs_paths = {
@ -55,6 +56,7 @@ const struct SysfsCollector::SysfsPaths sysfs_paths = {
UFS_ERR_PATH(fatal_err_count), UFS_ERR_PATH(fatal_err_count),
UFS_ERR_PATH(auto_hibern8_err_count) UFS_ERR_PATH(auto_hibern8_err_count)
}, },
.BlockStatsLength = BLOCK_STATS_LENGTH,
}; };
const struct UeventListener::UeventPaths ueventPaths = { const struct UeventListener::UeventPaths ueventPaths = {