summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJin Qian2017-01-11 19:19:21 -0600
committerJin Qian2017-01-13 13:02:23 -0600
commit535ddbe2c930501501d0b39f59c6fd6421021896 (patch)
tree9873d8d51dfe109f2b545080aa03cc69c38bbfcf /storaged
parent5c8bdf42e72a7e8f2e199b4423c9dba4ec08576c (diff)
downloadplatform-system-core-535ddbe2c930501501d0b39f59c6fd6421021896.tar.gz
platform-system-core-535ddbe2c930501501d0b39f59c6fd6421021896.tar.xz
platform-system-core-535ddbe2c930501501d0b39f59c6fd6421021896.zip
storaged: replace kmsg with LOG macros
Also convert android_log_event to C++ style calls. Change-Id: I7d62c81789fe7925fe9cae3e2a798b6af8c8be9d
Diffstat (limited to 'storaged')
-rw-r--r--storaged/include/storaged.h18
-rw-r--r--storaged/main.cpp25
-rw-r--r--storaged/storaged.rc1
-rw-r--r--storaged/storaged_utils.cpp152
4 files changed, 45 insertions, 151 deletions
diff --git a/storaged/include/storaged.h b/storaged/include/storaged.h
index eb827cf9d..957070c9b 100644
--- a/storaged/include/storaged.h
+++ b/storaged/include/storaged.h
@@ -17,13 +17,10 @@
17#ifndef _STORAGED_H_ 17#ifndef _STORAGED_H_
18#define _STORAGED_H_ 18#define _STORAGED_H_
19 19
20#define DEBUG
21
22#include <queue> 20#include <queue>
23#include <semaphore.h> 21#include <semaphore.h>
24#include <stdint.h> 22#include <stdint.h>
25#include <string> 23#include <string>
26#include <syslog.h>
27#include <unordered_map> 24#include <unordered_map>
28#include <vector> 25#include <vector>
29 26
@@ -39,21 +36,6 @@ friend class test_case_name##_##test_name##_Test
39#define debuginfo(...) 36#define debuginfo(...)
40#endif 37#endif
41 38
42#define KMSG_PRIORITY(PRI) \
43 '<', \
44 '0' + LOG_MAKEPRI(LOG_DAEMON, LOG_PRI(PRI)) / 10, \
45 '0' + LOG_MAKEPRI(LOG_DAEMON, LOG_PRI(PRI)) % 10, \
46 '>'
47
48static char kmsg_error_prefix[] = { KMSG_PRIORITY(LOG_ERR),
49 's', 't', 'o', 'r', 'a', 'g', 'e', 'd', ':', '\0' };
50
51static char kmsg_info_prefix[] = { KMSG_PRIORITY(LOG_INFO),
52 's', 't', 'o', 'r', 'a', 'g', 'e', 'd', ':', '\0' };
53
54static char kmsg_warning_prefix[] = { KMSG_PRIORITY(LOG_WARNING),
55 's', 't', 'o', 'r', 'a', 'g', 'e', 'd', ':', '\0' };
56
57// number of attributes diskstats has 39// number of attributes diskstats has
58#define DISK_STATS_SIZE ( 11 ) 40#define DISK_STATS_SIZE ( 11 )
59// maximum size limit of a stats file 41// maximum size limit of a stats file
diff --git a/storaged/main.cpp b/storaged/main.cpp
index 31ada686a..0cb0f5f70 100644
--- a/storaged/main.cpp
+++ b/storaged/main.cpp
@@ -29,12 +29,12 @@
29#include <vector> 29#include <vector>
30 30
31#include <android-base/macros.h> 31#include <android-base/macros.h>
32#include <android-base/logging.h>
32#include <android-base/stringprintf.h> 33#include <android-base/stringprintf.h>
33#include <binder/ProcessState.h> 34#include <binder/ProcessState.h>
34#include <binder/IServiceManager.h> 35#include <binder/IServiceManager.h>
35#include <binder/IPCThreadState.h> 36#include <binder/IPCThreadState.h>
36#include <cutils/android_get_control_file.h> 37#include <cutils/android_get_control_file.h>
37#include <cutils/klog.h>
38#include <cutils/sched_policy.h> 38#include <cutils/sched_policy.h>
39#include <private/android_filesystem_config.h> 39#include <private/android_filesystem_config.h>
40 40
@@ -90,15 +90,10 @@ static int drop_privs() {
90} 90}
91 91
92// Function of storaged's main thread 92// Function of storaged's main thread
93extern int fd_dmesg;
94void* storaged_main(void* s) { 93void* storaged_main(void* s) {
95 storaged_t* storaged = (storaged_t*)s; 94 storaged_t* storaged = (storaged_t*)s;
96 95
97 if (fd_dmesg >= 0) { 96 LOG_TO(SYSTEM, INFO) << "storaged: Start";
98 static const char start_message[] = {KMSG_PRIORITY(LOG_INFO),
99 's', 't', 'o', 'r', 'a', 'g', 'e', 'd', ':', ' ', 'S', 't', 'a', 'r', 't', '\n'};
100 write(fd_dmesg, start_message, sizeof(start_message));
101 }
102 97
103 for (;;) { 98 for (;;) {
104 storaged->event(); 99 storaged->event();
@@ -121,7 +116,6 @@ static void help_message(void) {
121#define DAY_TO_SEC ( 3600 * 24 ) 116#define DAY_TO_SEC ( 3600 * 24 )
122 117
123int main(int argc, char** argv) { 118int main(int argc, char** argv) {
124 klog_set_level(KLOG_LEVEL);
125 int flag_main_service = 0; 119 int flag_main_service = 0;
126 int flag_dump_task = 0; 120 int flag_dump_task = 0;
127 int flag_config = 0; 121 int flag_config = 0;
@@ -221,11 +215,6 @@ int main(int argc, char** argv) {
221 } 215 }
222 216
223 if (flag_main_service) { // start main thread 217 if (flag_main_service) { // start main thread
224 static const char dev_kmsg[] = "/dev/kmsg";
225 fd_dmesg = android_get_control_file(dev_kmsg);
226 if (fd_dmesg < 0)
227 fd_dmesg = TEMP_FAILURE_RETRY(open(dev_kmsg, O_WRONLY));
228
229 static const char mmc0_ext_csd[] = "/d/mmc0/mmc0:0001/ext_csd"; 218 static const char mmc0_ext_csd[] = "/d/mmc0/mmc0:0001/ext_csd";
230 fd_emmc = android_get_control_file(mmc0_ext_csd); 219 fd_emmc = android_get_control_file(mmc0_ext_csd);
231 if (fd_emmc < 0) 220 if (fd_emmc < 0)
@@ -245,12 +234,9 @@ int main(int argc, char** argv) {
245 234
246 // Start the main thread of storaged 235 // Start the main thread of storaged
247 pthread_t storaged_main_thread; 236 pthread_t storaged_main_thread;
248 if (pthread_create(&storaged_main_thread, NULL, storaged_main, &storaged)) { 237 errno = pthread_create(&storaged_main_thread, NULL, storaged_main, &storaged);
249 if (fd_dmesg >= 0) { 238 if (errno != 0) {
250 std::string error_message = android::base::StringPrintf( 239 PLOG_TO(SYSTEM, ERROR) << "Failed to create main thread";
251 "%s Failed to create main thread\n", kmsg_error_prefix);
252 write(fd_dmesg, error_message.c_str(), error_message.length());
253 }
254 return -1; 240 return -1;
255 } 241 }
256 242
@@ -259,7 +245,6 @@ int main(int argc, char** argv) {
259 IPCThreadState::self()->joinThreadPool(); 245 IPCThreadState::self()->joinThreadPool();
260 pthread_join(storaged_main_thread, NULL); 246 pthread_join(storaged_main_thread, NULL);
261 247
262 close(fd_dmesg);
263 close(fd_emmc); 248 close(fd_emmc);
264 249
265 return 0; 250 return 0;
diff --git a/storaged/storaged.rc b/storaged/storaged.rc
index f72521c8e..5fdbb8a24 100644
--- a/storaged/storaged.rc
+++ b/storaged/storaged.rc
@@ -1,5 +1,4 @@
1service storaged /system/bin/storaged 1service storaged /system/bin/storaged
2 class main 2 class main
3 file /d/mmc0/mmc0:0001/ext_csd r 3 file /d/mmc0/mmc0:0001/ext_csd r
4 file /dev/kmsg w
5 group root readproc 4 group root readproc
diff --git a/storaged/storaged_utils.cpp b/storaged/storaged_utils.cpp
index 5e0488822..e91b1bb1d 100644
--- a/storaged/storaged_utils.cpp
+++ b/storaged/storaged_utils.cpp
@@ -27,6 +27,7 @@
27#include <time.h> 27#include <time.h>
28#include <unistd.h> 28#include <unistd.h>
29 29
30#include <iomanip>
30#include <sstream> 31#include <sstream>
31#include <string> 32#include <string>
32#include <unordered_map> 33#include <unordered_map>
@@ -35,8 +36,6 @@
35#include <android-base/logging.h> 36#include <android-base/logging.h>
36#include <android-base/stringprintf.h> 37#include <android-base/stringprintf.h>
37#include <android-base/strings.h> 38#include <android-base/strings.h>
38#include <cutils/klog.h>
39#include <log/log.h>
40#include <log/log_event_list.h> 39#include <log/log_event_list.h>
41 40
42#include <storaged.h> 41#include <storaged.h>
@@ -47,8 +46,6 @@
47#define MSEC_TO_USEC ( 1000 ) 46#define MSEC_TO_USEC ( 1000 )
48#define USEC_TO_NSEC ( 1000 ) 47#define USEC_TO_NSEC ( 1000 )
49 48
50int fd_dmesg = -1;
51
52bool parse_disk_stats(const char* disk_stats_path, struct disk_stats* stats) { 49bool parse_disk_stats(const char* disk_stats_path, struct disk_stats* stats) {
53 // Get time 50 // Get time
54 struct timespec ts; 51 struct timespec ts;
@@ -56,22 +53,13 @@ bool parse_disk_stats(const char* disk_stats_path, struct disk_stats* stats) {
56 // when system is running. 53 // when system is running.
57 int ret = clock_gettime(CLOCK_MONOTONIC, &ts); 54 int ret = clock_gettime(CLOCK_MONOTONIC, &ts);
58 if (ret < 0) { 55 if (ret < 0) {
59 if (fd_dmesg >= 0) { 56 PLOG_TO(SYSTEM, ERROR) << "clock_gettime() failed";
60 std::string error_message = android::base::StringPrintf(
61 "%s clock_gettime() failed with errno %d\n",
62 kmsg_error_prefix, ret);
63 write(fd_dmesg, error_message.c_str(), error_message.length());
64 }
65 return false; 57 return false;
66 } 58 }
67 59
68 std::string buffer; 60 std::string buffer;
69 if (!android::base::ReadFileToString(disk_stats_path, &buffer)) { 61 if (!android::base::ReadFileToString(disk_stats_path, &buffer)) {
70 if (fd_dmesg >= 0) { 62 PLOG_TO(SYSTEM, ERROR) << disk_stats_path << ": ReadFileToString failed.";
71 std::string error_message = android::base::StringPrintf(
72 "%s %s: ReadFileToString failed.\n", kmsg_error_prefix, disk_stats_path);
73 write(fd_dmesg, error_message.c_str(), error_message.length());
74 }
75 return false; 63 return false;
76 } 64 }
77 65
@@ -149,13 +137,10 @@ struct disk_stats get_inc_disk_stats(struct disk_stats* prev, struct disk_stats*
149 137
150// Add src to dst 138// Add src to dst
151void add_disk_stats(struct disk_stats* src, struct disk_stats* dst) { 139void add_disk_stats(struct disk_stats* src, struct disk_stats* dst) {
152 if (dst->end_time != 0 && dst->end_time != src->start_time && fd_dmesg >= 0) { 140 if (dst->end_time != 0 && dst->end_time != src->start_time) {
153 std::string warning_message = android::base::StringPrintf( 141 LOG_TO(SYSTEM, WARNING) << "Two dis-continuous periods of diskstats"
154 "%s Two dis-continuous periods of diskstats are added. " 142 << " are added. dst end with " << dst->end_time
155 "dst end with %jd, src start with %jd\n", 143 << ", src start with " << src->start_time;
156 kmsg_warning_prefix, dst->end_time, src->start_time);
157
158 write(fd_dmesg, warning_message.c_str(), warning_message.length());
159 } 144 }
160 145
161 for (uint i = 0; i < DISK_STATS_SIZE; ++i) { 146 for (uint i = 0; i < DISK_STATS_SIZE; ++i) {
@@ -193,21 +178,13 @@ bool parse_emmc_ecsd(int ext_csd_fd, struct emmc_info* info) {
193 CHECK(lseek(ext_csd_fd, 0, SEEK_SET) == 0); 178 CHECK(lseek(ext_csd_fd, 0, SEEK_SET) == 0);
194 std::string buffer; 179 std::string buffer;
195 if (!android::base::ReadFdToString(ext_csd_fd, &buffer)) { 180 if (!android::base::ReadFdToString(ext_csd_fd, &buffer)) {
196 if (fd_dmesg >= 0) { 181 PLOG_TO(SYSTEM, ERROR) << "ReadFdToString failed.";
197 std::string error_message = android::base::StringPrintf(
198 "%s ReadFdToString failed.\n", kmsg_error_prefix);
199 write(fd_dmesg, error_message.c_str(), error_message.length());
200 }
201 return false; 182 return false;
202 } 183 }
203 184
204 if (buffer.length() < EXT_CSD_FILE_MIN_SIZE) { 185 if (buffer.length() < EXT_CSD_FILE_MIN_SIZE) {
205 if (fd_dmesg >= 0) { 186 LOG_TO(SYSTEM, ERROR) << "EMMC ext csd file has truncated content. "
206 std::string error_message = android::base::StringPrintf( 187 << "File length: " << buffer.length();
207 "%s EMMC ext csd file has truncated content. File length: %d\n",
208 kmsg_error_prefix, (int)buffer.length());
209 write(fd_dmesg, error_message.c_str(), error_message.length());
210 }
211 return false; 188 return false;
212 } 189 }
213 190
@@ -219,11 +196,7 @@ bool parse_emmc_ecsd(int ext_csd_fd, struct emmc_info* info) {
219 ss << sub; 196 ss << sub;
220 ss >> std::hex >> ext_csd_rev; 197 ss >> std::hex >> ext_csd_rev;
221 if (ext_csd_rev < 0) { 198 if (ext_csd_rev < 0) {
222 if (fd_dmesg >= 0) { 199 LOG_TO(SYSTEM, ERROR) << "Failure on parsing EXT_CSD_REV.";
223 std::string error_message = android::base::StringPrintf(
224 "%s Failure on parsing EXT_CSD_REV.\n", kmsg_error_prefix);
225 write(fd_dmesg, error_message.c_str(), error_message.length());
226 }
227 return false; 200 return false;
228 } 201 }
229 ss.clear(); 202 ss.clear();
@@ -248,11 +221,7 @@ bool parse_emmc_ecsd(int ext_csd_fd, struct emmc_info* info) {
248 ss << sub; 221 ss << sub;
249 ss >> std::hex >> info->eol; 222 ss >> std::hex >> info->eol;
250 if (info->eol < 0) { 223 if (info->eol < 0) {
251 if (fd_dmesg >= 0) { 224 LOG_TO(SYSTEM, ERROR) << "Failure on parsing EXT_PRE_EOL_INFO.";
252 std::string error_message = android::base::StringPrintf(
253 "%s Failure on parsing EXT_PRE_EOL_INFO.\n", kmsg_error_prefix);
254 write(fd_dmesg, error_message.c_str(), error_message.length());
255 }
256 return false; 225 return false;
257 } 226 }
258 ss.clear(); 227 ss.clear();
@@ -263,11 +232,7 @@ bool parse_emmc_ecsd(int ext_csd_fd, struct emmc_info* info) {
263 ss << sub; 232 ss << sub;
264 ss >> std::hex >> info->lifetime_a; 233 ss >> std::hex >> info->lifetime_a;
265 if (info->lifetime_a < 0) { 234 if (info->lifetime_a < 0) {
266 if (fd_dmesg >= 0) { 235 LOG_TO(SYSTEM, ERROR) << "Failure on parsing EXT_DEVICE_LIFE_TIME_EST_TYP_A.";
267 std::string error_message = android::base::StringPrintf(
268 "%s Failure on parsing EXT_DEVICE_LIFE_TIME_EST_TYP_A.\n", kmsg_error_prefix);
269 write(fd_dmesg, error_message.c_str(), error_message.length());
270 }
271 return false; 236 return false;
272 } 237 }
273 ss.clear(); 238 ss.clear();
@@ -277,11 +242,7 @@ bool parse_emmc_ecsd(int ext_csd_fd, struct emmc_info* info) {
277 ss << sub; 242 ss << sub;
278 ss >> std::hex >> info->lifetime_b; 243 ss >> std::hex >> info->lifetime_b;
279 if (info->lifetime_b < 0) { 244 if (info->lifetime_b < 0) {
280 if (fd_dmesg >= 0) { 245 LOG_TO(SYSTEM, ERROR) << "Failure on parsing EXT_DEVICE_LIFE_TIME_EST_TYP_B.";
281 std::string error_message = android::base::StringPrintf(
282 "%s Failure on parsing EXT_DEVICE_LIFE_TIME_EST_TYP_B.\n", kmsg_error_prefix);
283 write(fd_dmesg, error_message.c_str(), error_message.length());
284 }
285 return false; 246 return false;
286 } 247 }
287 ss.clear(); 248 ss.clear();
@@ -481,19 +442,14 @@ void log_kernel_disk_stats(struct disk_stats* stats, const char* type) {
481 memset(&zero_cmp, 0, sizeof(zero_cmp)); 442 memset(&zero_cmp, 0, sizeof(zero_cmp));
482 if (memcmp(&zero_cmp, stats, sizeof(struct disk_stats)) == 0) return; 443 if (memcmp(&zero_cmp, stats, sizeof(struct disk_stats)) == 0) return;
483 444
484 if (fd_dmesg >= 0) { 445 LOG_TO(SYSTEM, INFO) << "diskstats " << type << ": "
485 std::string info_message = android::base::StringPrintf( 446 << stats->start_time << " " << stats->end_time << " "
486 "%s diskstats %s: %ju %ju %ju %ju %ju %ju %ju %ju %ju %ju %.1f %ju %ju\n", 447 << stats->read_ios << " " << stats->read_merges << " "
487 kmsg_info_prefix, type, stats->start_time, stats->end_time, 448 << stats->read_sectors << " " << stats->read_ticks << " "
488 stats->read_ios, stats->read_merges, 449 << stats->write_ios << " " << stats->write_merges << " "
489 stats->read_sectors, stats->read_ticks, 450 << stats->write_sectors << " " << stats->write_ticks << " "
490 stats->write_ios, stats->write_merges, 451 << std::setprecision(1) << std::fixed << stats->io_avg << " "
491 stats->write_sectors, stats->write_ticks, 452 << stats->io_ticks << " " << stats->io_in_queue;
492 stats->io_avg, stats->io_ticks,
493 stats->io_in_queue);
494
495 write(fd_dmesg, info_message.c_str(), info_message.length());
496 }
497} 453}
498 454
499void log_kernel_disk_perf(struct disk_perf* perf, const char* type) { 455void log_kernel_disk_perf(struct disk_perf* perf, const char* type) {
@@ -503,16 +459,10 @@ void log_kernel_disk_perf(struct disk_perf* perf, const char* type) {
503 memset(&zero_cmp, 0, sizeof(zero_cmp)); 459 memset(&zero_cmp, 0, sizeof(zero_cmp));
504 if (memcmp(&zero_cmp, perf, sizeof(struct disk_perf)) == 0) return; 460 if (memcmp(&zero_cmp, perf, sizeof(struct disk_perf)) == 0) return;
505 461
506 if (fd_dmesg >= 0) { 462 LOG_TO(SYSTEM, INFO) << "perf(ios) " << type
507 std::string info_message = android::base::StringPrintf( 463 << " rd:" << perf->read_perf << "KB/s(" << perf->read_ios << "/s)"
508 "%s perf(ios) %s rd:%luKB/s(%lu/s) wr:%luKB/s(%lu/s) q:%lu\n", 464 << " wr:" << perf->write_perf << "KB/s(" << perf->write_ios << "/s)"
509 kmsg_info_prefix, type, 465 << " q:" << perf->queue;
510 (unsigned long)perf->read_perf, (unsigned long)perf->read_ios,
511 (unsigned long)perf->write_perf, (unsigned long)perf->write_ios,
512 (unsigned long)perf->queue);
513
514 write(fd_dmesg, info_message.c_str(), info_message.length());
515 }
516} 466}
517 467
518void log_kernel_emmc_info(struct emmc_info* info) { 468void log_kernel_emmc_info(struct emmc_info* info) {
@@ -522,13 +472,9 @@ void log_kernel_emmc_info(struct emmc_info* info) {
522 memset(&zero_cmp, 0, sizeof(zero_cmp)); 472 memset(&zero_cmp, 0, sizeof(zero_cmp));
523 if (memcmp(&zero_cmp, info, sizeof(struct emmc_info)) == 0) return; 473 if (memcmp(&zero_cmp, info, sizeof(struct emmc_info)) == 0) return;
524 474
525 if (fd_dmesg >= 0) { 475 LOG_TO(SYSTEM, INFO) << "MMC " << info->mmc_ver << " eol:" << info->eol << ", "
526 std::string info_message = android::base::StringPrintf( 476 << "lifetime typA:" << info->lifetime_a
527 "%s MMC %s eol:%d, lifetime typA:%d, typB:%d\n", 477 << ", typB:" << info->lifetime_b;
528 kmsg_info_prefix, info->mmc_ver, info->eol, info->lifetime_a, info->lifetime_b);
529
530 write(fd_dmesg, info_message.c_str(), info_message.length());
531 }
532} 478}
533 479
534void log_event_disk_stats(struct disk_stats* stats, const char* type) { 480void log_event_disk_stats(struct disk_stats* stats, const char* type) {
@@ -539,26 +485,14 @@ void log_event_disk_stats(struct disk_stats* stats, const char* type) {
539 // skip event logging diskstats when it is zero increment (all first 11 entries are zero) 485 // skip event logging diskstats when it is zero increment (all first 11 entries are zero)
540 if (memcmp(&zero_cmp, stats, sizeof(uint64_t) * DISK_STATS_SIZE) == 0) return; 486 if (memcmp(&zero_cmp, stats, sizeof(uint64_t) * DISK_STATS_SIZE) == 0) return;
541 487
542 // Construct eventlog list 488 android_log_event_list(EVENTLOGTAG_DISKSTATS)
543 android_log_context ctx = create_android_logger(EVENTLOGTAG_DISKSTATS); 489 << type << stats->start_time << stats->end_time
544 490 << stats->read_ios << stats->read_merges
545 android_log_write_string8(ctx, type); 491 << stats->read_sectors << stats->read_ticks
546 android_log_write_int64(ctx, stats->start_time); 492 << stats->write_ios << stats->write_merges
547 android_log_write_int64(ctx, stats->end_time); 493 << stats->write_sectors << stats->write_ticks
548 android_log_write_int64(ctx, stats->read_ios); 494 << (uint64_t)stats->io_avg << stats->io_ticks << stats->io_in_queue
549 android_log_write_int64(ctx, stats->read_merges); 495 << LOG_ID_EVENTS;
550 android_log_write_int64(ctx, stats->read_sectors);
551 android_log_write_int64(ctx, stats->read_ticks);
552 android_log_write_int64(ctx, stats->write_ios);
553 android_log_write_int64(ctx, stats->write_merges);
554 android_log_write_int64(ctx, stats->write_sectors);
555 android_log_write_int64(ctx, stats->write_ticks);
556 android_log_write_int64(ctx, (uint64_t)stats->io_avg);
557 android_log_write_int64(ctx, stats->io_ticks);
558 android_log_write_int64(ctx, stats->io_in_queue);
559
560 android_log_write_list(ctx, LOG_ID_EVENTS);
561 android_log_destroy(&ctx);
562} 496}
563 497
564void log_event_emmc_info(struct emmc_info* info) { 498void log_event_emmc_info(struct emmc_info* info) {
@@ -568,13 +502,7 @@ void log_event_emmc_info(struct emmc_info* info) {
568 memset(&zero_cmp, 0, sizeof(zero_cmp)); 502 memset(&zero_cmp, 0, sizeof(zero_cmp));
569 if (memcmp(&zero_cmp, info, sizeof(struct emmc_info)) == 0) return; 503 if (memcmp(&zero_cmp, info, sizeof(struct emmc_info)) == 0) return;
570 504
571 android_log_context ctx = create_android_logger(EVENTLOGTAG_EMMCINFO); 505 android_log_event_list(EVENTLOGTAG_EMMCINFO)
572 506 << info->mmc_ver << info->eol << info->lifetime_a << info->lifetime_b
573 android_log_write_string8(ctx, info->mmc_ver); 507 << LOG_ID_EVENTS;
574 android_log_write_int32(ctx, info->eol);
575 android_log_write_int32(ctx, info->lifetime_a);
576 android_log_write_int32(ctx, info->lifetime_b);
577
578 android_log_write_list(ctx, LOG_ID_EVENTS);
579 android_log_destroy(&ctx);
580} 508}