projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
put vax headers in their place
[unix-history]
/
usr
/
src
/
sys
/
kern
/
subr_prf.c
diff --git
a/usr/src/sys/kern/subr_prf.c
b/usr/src/sys/kern/subr_prf.c
index
f680c6e
..
509c1ff
100644
(file)
--- a/
usr/src/sys/kern/subr_prf.c
+++ b/
usr/src/sys/kern/subr_prf.c
@@
-1,11
+1,10
@@
-/* subr_prf.c 4.
11 %G%
*/
+/* subr_prf.c 4.
22 82/10/10
*/
#include "../h/param.h"
#include "../h/systm.h"
#include "../h/seg.h"
#include "../h/buf.h"
#include "../h/conf.h"
#include "../h/param.h"
#include "../h/systm.h"
#include "../h/seg.h"
#include "../h/buf.h"
#include "../h/conf.h"
-#include "../h/mtpr.h"
#include "../h/reboot.h"
#include "../h/vm.h"
#include "../h/msgbuf.h"
#include "../h/reboot.h"
#include "../h/vm.h"
#include "../h/msgbuf.h"
@@
-92,7
+91,7
@@
again:
case 'o': case 'O':
b = 8;
number:
case 'o': case 'O':
b = 8;
number:
- printn(*adx, b, touser);
+ printn(
(u_long)
*adx, b, touser);
break;
case 'c':
b = *adx;
break;
case 'c':
b = *adx;
@@
-103,7
+102,7
@@
number:
case 'b':
b = *adx++;
s = (char *)*adx;
case 'b':
b = *adx++;
s = (char *)*adx;
- printn(b, *s++, touser);
+ printn(
(u_long)
b, *s++, touser);
any = 0;
if (b) {
putchar('<', touser);
any = 0;
if (b) {
putchar('<', touser);
@@
-118,7
+117,8
@@
number:
for (; *s > 32; s++)
;
}
for (; *s > 32; s++)
;
}
- putchar('>', touser);
+ if (any)
+ putchar('>', touser);
}
break;
}
break;
@@
-127,6
+127,10
@@
number:
while (c = *s++)
putchar(c, touser);
break;
while (c = *s++)
putchar(c, touser);
break;
+
+ case '%':
+ putchar('%', touser);
+ break;
}
adx++;
goto loop;
}
adx++;
goto loop;
@@
-137,7
+141,7
@@
number:
* We don't use recursion to avoid deep kernel stacks.
*/
printn(n, b, touser)
* We don't use recursion to avoid deep kernel stacks.
*/
printn(n, b, touser)
- u
nsigned
long n;
+ u
_
long n;
{
char prbuf[11];
register char *cp;
{
char prbuf[11];
register char *cp;
@@
-165,37
+169,36
@@
printn(n, b, touser)
panic(s)
char *s;
{
panic(s)
char *s;
{
- int bootopt =
panicstr ? RB_AUTOBOOT : RB_AUTOBOOT|RB_NOSYNC
;
+ int bootopt =
RB_AUTOBOOT
;
+ if (panicstr)
+ bootopt |= RB_NOSYNC;
panicstr = s;
printf("panic: %s\n", s);
panicstr = s;
printf("panic: %s\n", s);
- (void) spl0();
boot(RB_PANIC, bootopt);
}
/*
boot(RB_PANIC, bootopt);
}
/*
- * Prdev prints a warning message of the form "mesg on dev x/y".
- * x and y are the major and minor parts of the device argument.
- *
- * PRDEV SHOULD COMPUTE AND USE DEVICE NAMES
+ * Warn that a system table is full.
*/
*/
-prdev(str, dev)
- char *str;
- dev_t dev;
+tablefull(tab)
+ char *tab;
{
{
- printf("%s
on dev %d/%d\n", str, major(dev), minor(dev)
);
+ printf("%s
: table is full\n", tab
);
}
/*
* Hard error is the preface to plaintive error messages
}
/*
* Hard error is the preface to plaintive error messages
- * about failing d
evice
transfers.
+ * about failing d
isk
transfers.
*/
*/
-harderr(bp)
+harderr(bp
, cp
)
struct buf *bp;
struct buf *bp;
+ char *cp;
{
{
- printf("hard err bn%d ", bp->b_blkno);
+ printf("%s%d%c: hard error sn%d ", cp,
+ dkunit(bp), 'a'+(minor(bp->b_dev)&07), bp->b_blkno);
}
/*
}
/*
@@
-211,16
+214,17
@@
putchar(c, touser)
if (touser) {
register struct tty *tp = u.u_ttyp;
if (touser) {
register struct tty *tp = u.u_ttyp;
- if (tp && (tp->t_state&CARR_ON)) {
+ if (tp && (tp->t_state&
TS_
CARR_ON)) {
register s = spl6();
if (c == '\n')
register s = spl6();
if (c == '\n')
- ttyoutput('\r', tp);
- ttyoutput(c, tp);
+
(void)
ttyoutput('\r', tp);
+
(void)
ttyoutput(c, tp);
ttstart(tp);
splx(s);
}
return;
}
ttstart(tp);
splx(s);
}
return;
}
+#include "../vax/mtpr.h" /* XXX */
if (c != '\0' && c != '\r' && c != 0177 && mfpr(MAPEN)) {
if (msgbuf.msg_magic != MSG_MAGIC) {
msgbuf.msg_bufx = 0;
if (c != '\0' && c != '\r' && c != 0177 && mfpr(MAPEN)) {
if (msgbuf.msg_magic != MSG_MAGIC) {
msgbuf.msg_bufx = 0;