mbed_error_vfprintf -> mbed_error_vprintf

Name vfprintf doesn't make sense - if we have mbed_error_printf, this is
vprintf.
pull/8076/head
Kevin Bracey 2018-09-11 11:18:32 +03:00
parent d05c60ee3f
commit c989845d5a
5 changed files with 17 additions and 5 deletions

View File

@ -135,7 +135,7 @@ void UARTSerial::sigio(Callback<void()> func)
}
/* Special synchronous write designed to work from critical section, such
* as in mbed_error_vfprintf.
* as in mbed_error_vprintf.
*/
ssize_t UARTSerial::write_unbuffered(const char *buf_ptr, size_t length)
{

View File

@ -50,11 +50,11 @@ void mbed_error_printf(const char *format, ...)
{
va_list arg;
va_start(arg, format);
mbed_error_vfprintf(format, arg);
mbed_error_vprintf(format, arg);
va_end(arg);
}
void mbed_error_vfprintf(const char *format, va_list arg)
void mbed_error_vprintf(const char *format, va_list arg)
{
#define ERROR_BUF_SIZE (128)
core_util_critical_section_enter();
@ -77,3 +77,8 @@ void mbed_error_vfprintf(const char *format, va_list arg)
}
core_util_critical_section_exit();
}
void mbed_error_vfprintf(const char *format, va_list arg)
{
mbed_error_vprintf(format, arg);
}

View File

@ -89,7 +89,7 @@ WEAK void error(const char *format, ...)
#ifndef NDEBUG
va_list arg;
va_start(arg, format);
mbed_error_vfprintf(format, arg);
mbed_error_vprintf(format, arg);
va_end(arg);
#endif
exit(1);

View File

@ -42,7 +42,7 @@ extern "C" {
#else //MBED_CONF_PLATFORM_MAX_ERROR_FILENAME_LEN
#if MBED_CONF_PLATFORM_MAX_ERROR_FILENAME_LEN > 64
//We have to limit this to 64 bytes since we use mbed_error_printf for error reporting
//and mbed_error_vfprintf uses 128bytes internal buffer which may not be sufficient for anything
//and mbed_error_vprintf uses 128bytes internal buffer which may not be sufficient for anything
//longer that 64 bytes with the current implementation.
#error "Unsupported error filename buffer length detected, max supported length is 64 chars. Please change MBED_CONF_PLATFORM_MAX_ERROR_FILENAME_LEN or max-error-filename-len in configuration."
#endif

View File

@ -26,6 +26,7 @@
#include <stdarg.h>
#include "mbed_toolchain.h"
#include "device.h"
/* Mbed interface mac address
@ -146,9 +147,15 @@ void mbed_error_printf(const char *format, ...);
* @param arg Variable arguments list
*
*/
void mbed_error_vprintf(const char *format, va_list arg);
/** @deprecated Renamed to mbed_error_vprintf to match functionality */
MBED_DEPRECATED_SINCE("mbed-os-5.11",
"Renamed to mbed_error_vprintf to match functionality.")
void mbed_error_vfprintf(const char *format, va_list arg);
/** @}*/
#ifdef __cplusplus
}
#endif