Skip to content

Commit c989845

Browse files
committed
mbed_error_vfprintf -> mbed_error_vprintf
Name vfprintf doesn't make sense - if we have mbed_error_printf, this is vprintf.
1 parent d05c60e commit c989845

File tree

5 files changed

+17
-5
lines changed

5 files changed

+17
-5
lines changed

drivers/UARTSerial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ void UARTSerial::sigio(Callback<void()> func)
135135
}
136136

137137
/* Special synchronous write designed to work from critical section, such
138-
* as in mbed_error_vfprintf.
138+
* as in mbed_error_vprintf.
139139
*/
140140
ssize_t UARTSerial::write_unbuffered(const char *buf_ptr, size_t length)
141141
{

platform/mbed_board.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ void mbed_error_printf(const char *format, ...)
5050
{
5151
va_list arg;
5252
va_start(arg, format);
53-
mbed_error_vfprintf(format, arg);
53+
mbed_error_vprintf(format, arg);
5454
va_end(arg);
5555
}
5656

57-
void mbed_error_vfprintf(const char *format, va_list arg)
57+
void mbed_error_vprintf(const char *format, va_list arg)
5858
{
5959
#define ERROR_BUF_SIZE (128)
6060
core_util_critical_section_enter();
@@ -77,3 +77,8 @@ void mbed_error_vfprintf(const char *format, va_list arg)
7777
}
7878
core_util_critical_section_exit();
7979
}
80+
81+
void mbed_error_vfprintf(const char *format, va_list arg)
82+
{
83+
mbed_error_vprintf(format, arg);
84+
}

platform/mbed_error.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ WEAK void error(const char *format, ...)
8989
#ifndef NDEBUG
9090
va_list arg;
9191
va_start(arg, format);
92-
mbed_error_vfprintf(format, arg);
92+
mbed_error_vprintf(format, arg);
9393
va_end(arg);
9494
#endif
9595
exit(1);

platform/mbed_error.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ extern "C" {
4242
#else //MBED_CONF_PLATFORM_MAX_ERROR_FILENAME_LEN
4343
#if MBED_CONF_PLATFORM_MAX_ERROR_FILENAME_LEN > 64
4444
//We have to limit this to 64 bytes since we use mbed_error_printf for error reporting
45-
//and mbed_error_vfprintf uses 128bytes internal buffer which may not be sufficient for anything
45+
//and mbed_error_vprintf uses 128bytes internal buffer which may not be sufficient for anything
4646
//longer that 64 bytes with the current implementation.
4747
#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."
4848
#endif

platform/mbed_interface.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
#include <stdarg.h>
2828

29+
#include "mbed_toolchain.h"
2930
#include "device.h"
3031

3132
/* Mbed interface mac address
@@ -146,9 +147,15 @@ void mbed_error_printf(const char *format, ...);
146147
* @param arg Variable arguments list
147148
*
148149
*/
150+
void mbed_error_vprintf(const char *format, va_list arg);
151+
152+
/** @deprecated Renamed to mbed_error_vprintf to match functionality */
153+
MBED_DEPRECATED_SINCE("mbed-os-5.11",
154+
"Renamed to mbed_error_vprintf to match functionality.")
149155
void mbed_error_vfprintf(const char *format, va_list arg);
150156
/** @}*/
151157

158+
152159
#ifdef __cplusplus
153160
}
154161
#endif

0 commit comments

Comments
 (0)