summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'liblog/logger_write.c')
-rw-r--r--liblog/logger_write.c50
1 files changed, 40 insertions, 10 deletions
diff --git a/liblog/logger_write.c b/liblog/logger_write.c
index d322c0f0d..84feb206b 100644
--- a/liblog/logger_write.c
+++ b/liblog/logger_write.c
@@ -410,16 +410,46 @@ LIBLOG_ABI_PUBLIC int __android_log_buf_write(int bufID, int prio,
410 if (!tag) tag = ""; 410 if (!tag) tag = "";
411 411
412 /* XXX: This needs to go! */ 412 /* XXX: This needs to go! */
413 if ((bufID != LOG_ID_RADIO) && 413 if (bufID != LOG_ID_RADIO) {
414 (!strcmp(tag, "HTC_RIL") || 414 switch (tag[0]) {
415 !strncmp(tag, "RIL", 3) || /* Any log tag with "RIL" as the prefix */ 415 case 'H':
416 !strncmp(tag, "IMS", 3) || /* Any log tag with "IMS" as the prefix */ 416 if (strcmp(tag + 1, "HTC_RIL" + 1)) break;
417 !strcmp(tag, "AT") || !strcmp(tag, "GSM") || !strcmp(tag, "STK") || 417 goto inform;
418 !strcmp(tag, "CDMA") || !strcmp(tag, "PHONE") || !strcmp(tag, "SMS"))) { 418 case 'R':
419 bufID = LOG_ID_RADIO; 419 /* Any log tag with "RIL" as the prefix */
420 /* Inform third party apps/ril/radio.. to use Rlog or RLOG */ 420 if (strncmp(tag + 1, "RIL" + 1, strlen("RIL") - 1)) break;
421 snprintf(tmp_tag, sizeof(tmp_tag), "use-Rlog/RLOG-%s", tag); 421 goto inform;
422 tag = tmp_tag; 422 case 'Q':
423 /* Any log tag with "QC_RIL" as the prefix */
424 if (strncmp(tag + 1, "QC_RIL" + 1, strlen("QC_RIL") - 1)) break;
425 goto inform;
426 case 'I':
427 /* Any log tag with "IMS" as the prefix */
428 if (strncmp(tag + 1, "IMS" + 1, strlen("IMS") - 1)) break;
429 goto inform;
430 case 'A':
431 if (strcmp(tag + 1, "AT" + 1)) break;
432 goto inform;
433 case 'G':
434 if (strcmp(tag + 1, "GSM" + 1)) break;
435 goto inform;
436 case 'S':
437 if (strcmp(tag + 1, "STK" + 1) && strcmp(tag + 1, "SMS" + 1)) break;
438 goto inform;
439 case 'C':
440 if (strcmp(tag + 1, "CDMA" + 1)) break;
441 goto inform;
442 case 'P':
443 if (strcmp(tag + 1, "PHONE" + 1)) break;
444 /* FALLTHRU */
445 inform:
446 bufID = LOG_ID_RADIO;
447 snprintf(tmp_tag, sizeof(tmp_tag), "use-Rlog/RLOG-%s", tag);
448 tag = tmp_tag;
449 /* FALLTHRU */
450 default:
451 break;
452 }
423 } 453 }
424 454
425#if __BIONIC__ 455#if __BIONIC__