diff options
author | Ting Shen <phoenixshen@google.com> | 2022-07-25 17:32:21 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-07-27 05:21:22 +0000 |
commit | cb8923837510499ed3b74c2a4c5db2d898ada338 (patch) | |
tree | 0cf08178eadcddca9b77ac4e1178d16fbcee6c72 /zephyr/shim | |
parent | 336dc9336176438743e4bd4dce95f70e7142e25b (diff) | |
download | chrome-ec-cb8923837510499ed3b74c2a4c5db2d898ada338.tar.gz |
zephyr: fix cprints format
The bracket and whitespace around cprints timestamp disappeared after
CL:3756178, add these characters back.
BUG=b:238433667
TEST=console output looks good on krabby
BRANCH=none
Signed-off-by: Ting Shen <phoenixshen@google.com>
Change-Id: Ib31858f3e3a9605862968edd43cb502928191c74
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3784551
Reviewed-by: Eric Yilun Lin <yllin@google.com>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'zephyr/shim')
-rw-r--r-- | zephyr/shim/src/console.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/zephyr/shim/src/console.c b/zephyr/shim/src/console.c index e9b0c72790..edd729efb7 100644 --- a/zephyr/shim/src/console.c +++ b/zephyr/shim/src/console.c @@ -414,7 +414,14 @@ int cprints(enum console_channel channel, const char *format, ...) if (console_channel_is_disabled(channel)) return EC_SUCCESS; - rv = snprintf_timestamp_now(buff, sizeof(buff)); + buff[0] = '['; + len = 1; + + rv = snprintf_timestamp_now(buff + len, sizeof(buff) - len); + handle_sprintf_rv(rv, &len); + + rv = crec_snprintf(buff + len, CONFIG_SHELL_PRINTF_BUFF_SIZE - len, + " "); handle_sprintf_rv(rv, &len); va_start(args, format); |