diff options
author | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2014-07-13 09:26:09 +0000 |
---|---|---|
committer | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2014-07-13 09:26:09 +0000 |
commit | 219fb4bc5d8106b0ba4be12dadb7546e3f82f36f (patch) | |
tree | 0585011bd8cb3c7efedd44b8a5c215c3fbfef701 /sys/arch/amd64/stand | |
parent | 6cc6e9954a3db49f93dea8de924444001078fe20 (diff) |
move putchar() into libsa
"sure" miod@
Diffstat (limited to 'sys/arch/amd64/stand')
-rw-r--r-- | sys/arch/amd64/stand/boot/Makefile | 6 | ||||
-rw-r--r-- | sys/arch/amd64/stand/cdboot/Makefile | 4 | ||||
-rw-r--r-- | sys/arch/amd64/stand/libsa/dev_i386.c | 33 | ||||
-rw-r--r-- | sys/arch/amd64/stand/pxeboot/Makefile | 6 | ||||
-rw-r--r-- | sys/arch/amd64/stand/pxeboot/devopen.c | 33 |
5 files changed, 10 insertions, 72 deletions
diff --git a/sys/arch/amd64/stand/boot/Makefile b/sys/arch/amd64/stand/boot/Makefile index f0c278c5900..2e475c61af4 100644 --- a/sys/arch/amd64/stand/boot/Makefile +++ b/sys/arch/amd64/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.27 2014/07/12 21:54:57 jasper Exp $ +# $OpenBSD: Makefile,v 1.28 2014/07/13 09:26:08 jasper Exp $ COPTS?= MAN?= boot.8 @@ -34,8 +34,8 @@ SRCS+= softraid.c .PATH: ${S}/lib/libsa SRCS+= alloc.c ctime.c exit.c getchar.c memcmp.c memcpy.c memset.c printf.c \ - snprintf.c strcmp.c strerror.c strlen.c strncmp.c strncpy.c strtol.c \ - strtoll.c + putchar.c snprintf.c strcmp.c strerror.c strlen.c strncmp.c strncpy.c \ + strtol.c strtoll.c SRCS+= close.c closeall.c cons.c cread.c dev.c disklabel.c dkcksum.c fstat.c \ lseek.c open.c read.c readdir.c stat.c SRCS+= elf32.c elf64.c loadfile.c diff --git a/sys/arch/amd64/stand/cdboot/Makefile b/sys/arch/amd64/stand/cdboot/Makefile index 2f3c1d9e8dc..b13d29664de 100644 --- a/sys/arch/amd64/stand/cdboot/Makefile +++ b/sys/arch/amd64/stand/cdboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.23 2014/07/12 21:54:57 jasper Exp $ +# $OpenBSD: Makefile,v 1.24 2014/07/13 09:26:08 jasper Exp $ MAN= cdboot.8 @@ -24,7 +24,7 @@ SRCS+= softraid.c SRCS+= cmd.c vars.c bootarg.c .PATH: ${S}/lib/libsa -SRCS+= alloc.c exit.c getchar.c strcmp.c strlen.c \ +SRCS+= alloc.c exit.c getchar.c putchar.c strcmp.c strlen.c \ strncmp.c memcmp.c memcpy.c memset.c printf.c snprintf.c \ strerror.c strncpy.c strtol.c strtoll.c ctime.c strlcpy.c SRCS+= close.c closeall.c dev.c disklabel.c dkcksum.c fstat.c lseek.c \ diff --git a/sys/arch/amd64/stand/libsa/dev_i386.c b/sys/arch/amd64/stand/libsa/dev_i386.c index 782e3d8249a..b5b8d42f986 100644 --- a/sys/arch/amd64/stand/libsa/dev_i386.c +++ b/sys/arch/amd64/stand/libsa/dev_i386.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dev_i386.c,v 1.14 2014/07/12 21:54:58 jasper Exp $ */ +/* $OpenBSD: dev_i386.c,v 1.15 2014/07/13 09:26:08 jasper Exp $ */ /* * Copyright (c) 1996-1999 Michael Shalayeff @@ -160,37 +160,6 @@ devboot(dev_t bootdev, char *p) *p = '\0'; } -int pch_pos = 0; - -void -putchar(int c) -{ - switch (c) { - case '\177': /* DEL erases */ - cnputc('\b'); - cnputc(' '); - case '\b': - cnputc('\b'); - if (pch_pos) - pch_pos--; - break; - case '\t': - do { - cnputc(' '); - } while (++pch_pos % 8); - break; - case '\n': - case '\r': - cnputc(c); - pch_pos=0; - break; - default: - cnputc(c); - pch_pos++; - break; - } -} - char ttyname_buf[8]; char * diff --git a/sys/arch/amd64/stand/pxeboot/Makefile b/sys/arch/amd64/stand/pxeboot/Makefile index 578e377c87d..72b13f83eb8 100644 --- a/sys/arch/amd64/stand/pxeboot/Makefile +++ b/sys/arch/amd64/stand/pxeboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.19 2014/07/12 21:54:58 jasper Exp $ +# $OpenBSD: Makefile,v 1.20 2014/07/13 09:26:08 jasper Exp $ MAN= pxeboot.8 @@ -26,8 +26,8 @@ SRCS+= softraid.c SRCS+= boot.c cmd.c vars.c bootarg.c .PATH: ${S}/lib/libsa -SRCS+= alloc.c exit.c getchar.c getfile.c gets.c globals.c strcmp.c strlen.c \ - strncmp.c memcmp.c memcpy.c memset.c printf.c snprintf.c \ +SRCS+= alloc.c exit.c getchar.c getfile.c gets.c globals.c putchar.c strcmp.c \ + strlen.c strncmp.c memcmp.c memcpy.c memset.c printf.c snprintf.c \ strerror.c strncpy.c strtol.c strtoll.c ctime.c strlcpy.c strlcat.c SRCS+= aes_xts.c explicit_bzero.c hmac_sha1.c pbkdf2.c rijndael.c sha1.c diff --git a/sys/arch/amd64/stand/pxeboot/devopen.c b/sys/arch/amd64/stand/pxeboot/devopen.c index 5ef61b6cc99..da1de624f30 100644 --- a/sys/arch/amd64/stand/pxeboot/devopen.c +++ b/sys/arch/amd64/stand/pxeboot/devopen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: devopen.c,v 1.10 2014/07/12 21:54:58 jasper Exp $ */ +/* $OpenBSD: devopen.c,v 1.11 2014/07/13 09:26:08 jasper Exp $ */ /* * Copyright (c) 2004 Tom Cosgrove @@ -144,37 +144,6 @@ devboot(dev_t bootdev, char *p) *p = '\0'; } -int pch_pos = 0; - -void -putchar(int c) -{ - switch (c) { - case '\177': /* DEL erases */ - cnputc('\b'); - cnputc(' '); - case '\b': - cnputc('\b'); - if (pch_pos) - pch_pos--; - break; - case '\t': - do - cnputc(' '); - while (++pch_pos % 8); - break; - case '\n': - case '\r': - cnputc(c); - pch_pos=0; - break; - default: - cnputc(c); - pch_pos++; - break; - } -} - char ttyname_buf[8]; char * |