From 49fbec6d9aee62462a4acf3ba47788ca1e35be37 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 23 Jul 2014 14:43:44 -0700 Subject: [PATCH] HACK: remove %m support from printf. The change that added this support causes a cpu hard lock on one device. This code clearly isn't at fault, but disabling it to unblock until we can find a real fix. Bug: 16484311 Change-Id: I33834dc49d959ae403b10d2c7cad12ae2950f772 --- libc/bionic/libc_logging.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libc/bionic/libc_logging.cpp b/libc/bionic/libc_logging.cpp index cdbf7236c..1fb8a84ab 100644 --- a/libc/bionic/libc_logging.cpp +++ b/libc/bionic/libc_logging.cpp @@ -230,7 +230,9 @@ static void SendRepeat(Out& o, char ch, int count) { /* Perform formatted output to an output target 'o' */ template static void out_vformat(Out& o, const char* format, va_list args) { +#if 0 int caller_errno = errno; +#endif int nn = 0; for (;;) { @@ -379,9 +381,11 @@ static void out_vformat(Out& o, const char* format, va_list args) { } else if (c == '%') { buffer[0] = '%'; buffer[1] = '\0'; +#if 0 } else if (c == 'm') { // syslog-like %m for strerror(errno). str = strerror(caller_errno); +#endif } else { __assert(__FILE__, __LINE__, "conversion specifier unsupported"); }