[rtems-libbsd commit] Use LOG_EMERG for panic()

Sebastian Huber sebh at rtems.org
Mon Jul 10 06:34:10 UTC 2017


Module:    rtems-libbsd
Branch:    master
Commit:    378b5c2fa69da4f0fa94cbe28cb18bd0748cdf12
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=378b5c2fa69da4f0fa94cbe28cb18bd0748cdf12

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue May  9 14:09:49 2017 +0200

Use LOG_EMERG for panic()

---

 rtemsbsd/rtems/rtems-kernel-panic.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/rtemsbsd/rtems/rtems-kernel-panic.c b/rtemsbsd/rtems/rtems-kernel-panic.c
index 2c85fa9..279797c 100644
--- a/rtemsbsd/rtems/rtems-kernel-panic.c
+++ b/rtemsbsd/rtems/rtems-kernel-panic.c
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (c) 2009-2013 embedded brains GmbH.  All rights reserved.
+ * Copyright (c) 2009, 2017 embedded brains GmbH.  All rights reserved.
  *
  *  embedded brains GmbH
  *  Dornierstr. 4
@@ -42,6 +42,7 @@
 
 #include <sys/param.h>
 #include <sys/types.h>
+#include <sys/syslog.h>
 #include <sys/systm.h>
 
 #include <stdarg.h>
@@ -51,14 +52,10 @@ panic(const char *fmt, ...)
 {
 	va_list ap;
 
-	printf("\n*** BSD PANIC *** ");
-
 	va_start(ap, fmt);
-	vprintf(fmt, ap);
+	vlog(LOG_EMERG, fmt, ap);
 	va_end(ap);
 
-	printf("\n");
-
 	rtems_task_suspend(RTEMS_SELF);
 
 	/* FIXME */



More information about the vc mailing list