diff options
author | Jin Qian <jinqian@google.com> | 2017-03-17 16:36:59 -0700 |
---|---|---|
committer | Jin Qian <jinqian@google.com> | 2017-04-03 16:48:14 +0000 |
commit | 8197093497a65829f4da90b3fda0e281da7b27eb (patch) | |
tree | a099952c1a719453f9d4ffe56ef5f2dce10b66b1 /storaged/main.cpp | |
parent | e98f1a9c5607e13da5fccafd1cd6f5414319e4ea (diff) | |
download | core-8197093497a65829f4da90b3fda0e281da7b27eb.tar.gz |
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
Diffstat (limited to 'storaged/main.cpp')
-rw-r--r-- | storaged/main.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
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_utils.h> 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); |