summaryrefslogtreecommitdiff
path: root/include/printf.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/printf.h')
-rw-r--r--include/printf.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/printf.h b/include/printf.h
index 7d9c2ab5e2..ea1445a526 100644
--- a/include/printf.h
+++ b/include/printf.h
@@ -68,7 +68,7 @@
* @param context Context pointer to pass to addchar()
* @param format Format string (see above for acceptable formats)
* @param args Parameters
- * @return EC_SUCCESS, or non-zero if output was truncated.
+ * @return EC_SUCCESS, or EC_ERROR_OVERFLOW if the output was truncated.
*/
__stdlib_compat int vfnprintf(int (*addchar)(void *context, int c),
void *context, const char *format, va_list args);
@@ -81,12 +81,12 @@ __stdlib_compat int vfnprintf(int (*addchar)(void *context, int c),
* @param str Destination string
* @param size Size of destination in bytes
* @param format Format string
- * @return EC_SUCCESS, or non-zero if output was truncated.
+ * @return EC_SUCCESS, or EC_ERROR_OVERFLOW if the output was truncated.
*/
__stdlib_compat int snprintf(char *str, int size, const char *format, ...);
/**
- * Print formatted outut to a string.
+ * Print formatted output to a string.
*
* Guarantees null-termination if size!=0.
*
@@ -94,7 +94,8 @@ __stdlib_compat int snprintf(char *str, int size, const char *format, ...);
* @param size Size of destination in bytes
* @param format Format string
* @param args Parameters
- * @return EC_SUCCESS, or non-zero if output was truncated.
+ * @return The string length written to str, or a negative value on error.
+ * The negative values can be -EC_ERROR_INVAL or -EC_ERROR_OVERFLOW.
*/
__stdlib_compat int vsnprintf(char *str, int size, const char *format,
va_list args);