summaryrefslogtreecommitdiff
path: root/sys/arch/i386/stand/libsa/dev_i386.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-04-18 07:40:04 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-04-18 07:40:04 +0000
commit888b63e1743ef4b4277b88169301e0b5c1445e16 (patch)
tree5b9d1c51879f3e1f909c17e6ec7c2f6050ac92e1 /sys/arch/i386/stand/libsa/dev_i386.c
parentc2ee71fae9cec63f4a94c921619dc28d1c5b5032 (diff)
i386 bootblocks that work for 2.3. A tale too long to tell
Diffstat (limited to 'sys/arch/i386/stand/libsa/dev_i386.c')
-rw-r--r--sys/arch/i386/stand/libsa/dev_i386.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/sys/arch/i386/stand/libsa/dev_i386.c b/sys/arch/i386/stand/libsa/dev_i386.c
index 59934b65021..50abdad5277 100644
--- a/sys/arch/i386/stand/libsa/dev_i386.c
+++ b/sys/arch/i386/stand/libsa/dev_i386.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dev_i386.c,v 1.19 1997/08/22 00:38:35 mickey Exp $ */
+/* $OpenBSD: dev_i386.c,v 1.20 1998/04/18 07:39:49 deraadt Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
@@ -115,34 +115,34 @@ devboot(bootdev, p)
*p = '\0';
}
+int pch_pos = 0;
+
void
putchar(c)
- register int c;
+ int c;
{
- static int pos = 0;
-
switch(c) {
case '\177': /* DEL erases */
cnputc('\b');
cnputc(' ');
case '\b':
cnputc('\b');
- if (pos)
- pos--;
+ if (pch_pos)
+ pch_pos--;
break;
case '\t':
do
cnputc(' ');
- while(++pos % 8);
+ while(++pch_pos % 8);
break;
case '\n':
case '\r':
cnputc(c);
- pos=0;
+ pch_pos=0;
break;
default:
cnputc(c);
- pos++;
+ pch_pos++;
break;
}
}
@@ -163,15 +163,14 @@ getchar()
return(c);
}
+char ttyname_buf[8];
char *
ttyname(fd)
int fd;
{
- static char buf[8];
-
- sprintf(buf, "%s%d", cdevs[major(cn_tab->cn_dev)],
+ sprintf(ttyname_buf, "%s%d", cdevs[major(cn_tab->cn_dev)],
minor(cn_tab->cn_dev));
- return (buf);
+ return (ttyname_buf);
}
dev_t