summaryrefslogtreecommitdiffstats
path: root/rtemsbsd/rtems/rtems-bsd-program.c
diff options
context:
space:
mode:
Diffstat (limited to 'rtemsbsd/rtems/rtems-bsd-program.c')
-rw-r--r--rtemsbsd/rtems/rtems-bsd-program.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/rtemsbsd/rtems/rtems-bsd-program.c b/rtemsbsd/rtems/rtems-bsd-program.c
index 8edd8f93..7b5920e2 100644
--- a/rtemsbsd/rtems/rtems-bsd-program.c
+++ b/rtemsbsd/rtems/rtems-bsd-program.c
@@ -52,6 +52,8 @@
#include <setjmp.h>
#include <stdlib.h>
+#include <machine/rtems-bsd-program.h>
+
struct rtems_bsd_program_control {
void *context;
int exit_code;
@@ -116,6 +118,17 @@ rtems_bsd_program_exit(int exit_code)
panic("unexpected BSD program exit");
}
+void
+rtems_bsd_program_error(const char *fmt, ...)
+{
+ va_list list;
+ va_start(list, fmt);
+ vfprintf(stderr, fmt, list);
+ fprintf(stderr, "\n");
+ va_end(list);
+ rtems_bsd_program_exit(1);
+}
+
const char *
rtems_bsd_program_get_name(void)
{