diff options
author | Nick Withers <nick.withers@anu.edu.au> | 2013-08-14 17:56:27 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2013-08-15 04:57:56 +1000 |
commit | 01b0755035eab5b839845e944048419219f0bd2d (patch) | |
tree | 1b72c607f3e6a58d27fb4a5436f5dbd9395b0bd8 /cpukit/libcsupport/include/rtems/error.h | |
parent | bsp/csb336: Memory map update and jump to start at image start provided. (diff) | |
download | rtems-01b0755035eab5b839845e944048419219f0bd2d.tar.bz2 |
Expose rtems_verror()
Diffstat (limited to '')
-rw-r--r-- | cpukit/libcsupport/include/rtems/error.h | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/cpukit/libcsupport/include/rtems/error.h b/cpukit/libcsupport/include/rtems/error.h index 4eae14f912..95567631c0 100644 --- a/cpukit/libcsupport/include/rtems/error.h +++ b/cpukit/libcsupport/include/rtems/error.h @@ -5,8 +5,6 @@ * * Defines and externs for rtems error reporting * - * Currently just used by RTEMS monitor. - * * These routines provide general purpose error reporting. * rtems_error reports an error to stderr and allows use of * printf style formatting. A newline is appended to all messages. @@ -52,6 +50,8 @@ #include <rtems/rtems/status.h> #include <rtems/score/interr.h> +#include <stdarg.h> + #ifdef __cplusplus extern "C" { #endif @@ -67,7 +67,7 @@ extern "C" { typedef Internal_errors_t rtems_error_code_t; /* - * rtems_error() and rtems_panic() support + * rtems_error(), rtems_verror() and rtems_panic() support */ #if 0 @@ -106,6 +106,27 @@ int rtems_error( ); /** + * @brief Report an Error + * + * @param[in] error_code can be specified as any of the following: + * RTEMS_ERROR_ERRNO -- include errno text in output + * RTEMS_ERROR_PANIC -- halts local system after output + * RTEMS_ERROR_ABORT -- abort after output + * + * @param[in] printf_format is a normal printf(3) format string, + * with its concommitant arguments + * @param[in] @p arglist is a varargs list corresponding to + * printf_format + * + * @return the number of characters written. + */ +int rtems_verror( + rtems_error_code_t error_code, + const char *printf_format, + va_list arglist +); + +/** * rtems_panic is shorthand for rtems_error(RTEMS_ERROR_PANIC, ...) */ void rtems_panic( |