diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/console_output.c | 2 | ||||
-rw-r--r-- | common/printf.c | 13 |
2 files changed, 5 insertions, 10 deletions
diff --git a/common/console_output.c b/common/console_output.c index aa7a558bf7..33b1466181 100644 --- a/common/console_output.c +++ b/common/console_output.c @@ -72,6 +72,7 @@ bool console_channel_is_disabled(enum console_channel channel) } #endif /* CONFIG_CONSOLE_CHANNEL */ +#ifndef CONFIG_ZEPHYR /*****************************************************************************/ /* Channel-based console output */ @@ -135,6 +136,7 @@ int cprints(enum console_channel channel, const char *format, ...) r = cputs(channel, "]\n"); return r ? r : rv; } +#endif /* CONFIG_ZEPHYR */ void cflush(void) { diff --git a/common/printf.c b/common/printf.c index 14226800b6..be06d34dd8 100644 --- a/common/printf.c +++ b/common/printf.c @@ -463,12 +463,6 @@ int vfnprintf(int (*addchar)(void *context, int c), void *context, return EC_SUCCESS; } -/* - * These symbols are already defined by the Zephyr OS kernel, and we - * don't want to use the EC implementation. - */ -#ifndef CONFIG_ZEPHYR - /* Context for snprintf() */ struct snprintf_context { char *str; @@ -494,19 +488,19 @@ static int snprintf_addchar(void *context, int c) return 0; } -int snprintf(char *str, size_t size, const char *format, ...) +int crec_snprintf(char *str, size_t size, const char *format, ...) { va_list args; int rv; va_start(args, format); - rv = vsnprintf(str, size, format, args); + rv = crec_vsnprintf(str, size, format, args); va_end(args); return rv; } -int vsnprintf(char *str, size_t size, const char *format, va_list args) +int crec_vsnprintf(char *str, size_t size, const char *format, va_list args) { struct snprintf_context ctx; int rv; @@ -525,4 +519,3 @@ int vsnprintf(char *str, size_t size, const char *format, va_list args) return (rv == EC_SUCCESS) ? (ctx.str - str) : -rv; } -#endif /* !CONFIG_ZEPHYR */ |