A litte trouble with declarations of boot() and panic() resolved. gcc-2.5.8
[unix-history] / sys / kern / subr_prf.c
index 5ba8464..1378028 100644 (file)
@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *     from: @(#)subr_prf.c    7.30 (Berkeley) 6/29/91
  * SUCH DAMAGE.
  *
  *     from: @(#)subr_prf.c    7.30 (Berkeley) 6/29/91
- *     $Id: subr_prf.c,v 1.4 1993/10/16 15:24:42 rgrimes Exp $
+ *     $Id: subr_prf.c,v 1.6 1993/12/19 00:51:32 wollman Exp $
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -80,7 +80,6 @@ static void  logpri __P((int level));
 static void  putchar __P((int ch, int flags, struct tty *tp));
 static char *ksprintn __P((u_long num, int base, int *len));
 void  kprintf __P((const char *fmt, int flags, struct tty *tp, va_list));
 static void  putchar __P((int ch, int flags, struct tty *tp));
 static char *ksprintn __P((u_long num, int base, int *len));
 void  kprintf __P((const char *fmt, int flags, struct tty *tp, va_list));
-volatile void boot(int bootopt);
 
 /*
  * Variable panicstr contains argument to first call to panic; used
 
 /*
  * Variable panicstr contains argument to first call to panic; used
@@ -99,14 +98,8 @@ int msgbufmapped;
  * and then reboots.  If we are called twice, then we avoid trying to sync
  * the disks as this often leads to recursive panics.
  */
  * and then reboots.  If we are called twice, then we avoid trying to sync
  * the disks as this often leads to recursive panics.
  */
-#ifdef __STDC__
-volatile void
-panic(const char *msg)
-#else
 void
 void
-panic(msg)
-       char *msg;
-#endif
+panic(const char *msg)
 {
        int bootopt = RB_AUTOBOOT | RB_DUMP;
 
 {
        int bootopt = RB_AUTOBOOT | RB_DUMP;
 
@@ -129,7 +122,7 @@ panic(msg)
 #endif
 #include "ddb.h"
 #if NDDB > 0
 #endif
 #include "ddb.h"
 #if NDDB > 0
-       Debugger ();
+       Debugger ("panic");
 #endif
        boot(bootopt);
 }
 #endif
        boot(bootopt);
 }
@@ -139,7 +132,7 @@ panic(msg)
  */
 void
 tablefull(tab)
  */
 void
 tablefull(tab)
-       char *tab;
+       const char *tab;
 {
 
        log(LOG_ERR, "%s: table is full\n", tab);
 {
 
        log(LOG_ERR, "%s: table is full\n", tab);
@@ -285,12 +278,12 @@ logpri(level)
        putchar('>', TOLOG, NULL);
 }
 
        putchar('>', TOLOG, NULL);
 }
 
-int
+void
 #ifdef __STDC__
 addlog(const char *fmt, ...)
 #else
 addlog(fmt /*, va_alist */)
 #ifdef __STDC__
 addlog(const char *fmt, ...)
 #else
 addlog(fmt /*, va_alist */)
-       char *fmt;
+       const char *fmt;
 #endif
 {
        register int s;
 #endif
 {
        register int s;
@@ -307,7 +300,6 @@ addlog(fmt /*, va_alist */)
                va_end(ap);
        }
        logwakeup();
                va_end(ap);
        }
        logwakeup();
-       return (0);
 }
 
 int    consintr = 1;                   /* ok to handle console interrupts? */
 }
 
 int    consintr = 1;                   /* ok to handle console interrupts? */
@@ -317,7 +309,7 @@ int
 printf(const char *fmt, ...)
 #else
 printf(fmt /*, va_alist */)
 printf(const char *fmt, ...)
 #else
 printf(fmt /*, va_alist */)
-       char *fmt;
+       const char *fmt;
 #endif
 {
        va_list ap;
 #endif
 {
        va_list ap;