summaryrefslogtreecommitdiff
path: root/zephyr/shim
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@chromium.org>2022-07-08 15:16:42 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-07-15 18:48:19 +0000
commit171fe207e672191cc9dbec722999e24d81798f16 (patch)
treec169a841daaaf6dddc605a1abc42a489a32e5c3e /zephyr/shim
parent8c001c5ab9b1216bfbc2b7f50f1f6fa95a225f7a (diff)
downloadchrome-ec-171fe207e672191cc9dbec722999e24d81798f16.tar.gz
tree: Replace %pT with snprintf_timestamp
Using standard format specifiers makes it easier to switch between the "builtin" EC standard library and the C standard library provided by the toolchain (or Zephyr). BRANCH=none BUG=b:238433667, b:234181908 TEST=On icetower v0.1 with servo_micro and J-Trace attached: > reboot observe console shows timestamps Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I6660ff22ebc6ba74f1245ff83026f5919b356a02 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3756178 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'zephyr/shim')
-rw-r--r--zephyr/shim/src/console.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/zephyr/shim/src/console.c b/zephyr/shim/src/console.c
index a37b96ab58..8dafaf9803 100644
--- a/zephyr/shim/src/console.c
+++ b/zephyr/shim/src/console.c
@@ -408,8 +408,7 @@ int cprints(enum console_channel channel, const char *format, ...)
if (console_channel_is_disabled(channel))
return EC_SUCCESS;
- rv = crec_snprintf(buff, CONFIG_SHELL_PRINTF_BUFF_SIZE, "[%pT ",
- PRINTF_TIMESTAMP_NOW);
+ rv = snprintf_timestamp_now(buff, sizeof(buff));
handle_sprintf_rv(rv, &len);
va_start(args, format);