From 8197093497a65829f4da90b3fda0e281da7b27eb Mon Sep 17 00:00:00 2001 From: Jin Qian Date: Fri, 17 Mar 2017 16:36:59 -0700 Subject: storaged: read emmc health data from sysfs Sysfs data is straightforward so we don't need parsing anymore. Also removed periodical check since data is set only once during driver initialization. Checking at every device boot or storaged restart should be sufficient to monitor long term status change. Test: adb logcat -d -b events | grep storaged_emmc_info Bug: 36228467 Merged-In: I2a181f52c9f19de1e679a3a905aaebafe4d08227 Change-Id: Ic05e353f0af9363f3bcbe793ba0c351082e446ca --- storaged/main.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'storaged/main.cpp') diff --git a/storaged/main.cpp b/storaged/main.cpp index e25298b12..2f2273dc1 100644 --- a/storaged/main.cpp +++ b/storaged/main.cpp @@ -43,7 +43,6 @@ #include storaged_t storaged; -emmc_info_t emmc_info; // Function of storaged's main thread void* storaged_main(void* s) { @@ -114,10 +113,7 @@ int main(int argc, char** argv) { } if (flag_main_service) { // start main thread - if (emmc_info.init()) { - storaged.set_storage_info(&emmc_info); - } - + report_storage_health(); // Start the main thread of storaged pthread_t storaged_main_thread; errno = pthread_create(&storaged_main_thread, NULL, storaged_main, &storaged); -- cgit v1.2.3