summaryrefslogtreecommitdiff
path: root/sys/arch/landisk/stand/boot
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2014-07-12 21:54:59 +0000
committerJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2014-07-12 21:54:59 +0000
commit55a05995977ff661af3b9e512515abc461867ca5 (patch)
treed4bb8dcc9cdf6a4c586530a373c0849e4080678a /sys/arch/landisk/stand/boot
parent131b9116e2e83a04a7aab4b8596774aa49ed6935 (diff)
move getchar() into libsa where applicable
ok miod@
Diffstat (limited to 'sys/arch/landisk/stand/boot')
-rw-r--r--sys/arch/landisk/stand/boot/Makefile4
-rw-r--r--sys/arch/landisk/stand/boot/devs.c17
-rw-r--r--sys/arch/landisk/stand/boot/libsa.h4
-rw-r--r--sys/arch/landisk/stand/boot/scifcons.c4
4 files changed, 7 insertions, 22 deletions
diff --git a/sys/arch/landisk/stand/boot/Makefile b/sys/arch/landisk/stand/boot/Makefile
index 76a67930893..6dd5ffef6ae 100644
--- a/sys/arch/landisk/stand/boot/Makefile
+++ b/sys/arch/landisk/stand/boot/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.8 2012/09/02 16:21:05 deraadt Exp $
+# $OpenBSD: Makefile,v 1.9 2014/07/12 21:54:58 jasper Exp $
MAN= boot.8
MLINKS= boot.8 boot.conf.5
@@ -23,7 +23,7 @@ AFLAGS+= -fno-pie
SRCS+= boot.c cmd.c vars.c bootarg.c
.PATH: ${S}/lib/libkern/arch/sh ${S}/lib/libkern
-SRCS+= strlen.c strlcpy.c
+SRCS+= getchar.c strlen.c strlcpy.c
SAREL=
SA_ZLIB=
diff --git a/sys/arch/landisk/stand/boot/devs.c b/sys/arch/landisk/stand/boot/devs.c
index dd0120e0c07..e1c27a69b3f 100644
--- a/sys/arch/landisk/stand/boot/devs.c
+++ b/sys/arch/landisk/stand/boot/devs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: devs.c,v 1.7 2011/03/13 00:13:53 deraadt Exp $ */
+/* $OpenBSD: devs.c,v 1.8 2014/07/12 21:54:58 jasper Exp $ */
/*
* Copyright (c) 2006 Michael Shalayeff
@@ -146,18 +146,3 @@ putchar(int c)
break;
}
}
-
-int
-getchar(void)
-{
- int c = scif_getc();
-
- if (c == '\r')
- c = '\n';
-
- if ((c < ' ' && c != '\n') || c == '\177')
- return c;
-
- putchar(c);
- return c;
-}
diff --git a/sys/arch/landisk/stand/boot/libsa.h b/sys/arch/landisk/stand/boot/libsa.h
index fa6158fbce6..8265d7b09c8 100644
--- a/sys/arch/landisk/stand/boot/libsa.h
+++ b/sys/arch/landisk/stand/boot/libsa.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: libsa.h,v 1.4 2011/03/13 00:13:53 deraadt Exp $ */
+/* $OpenBSD: libsa.h,v 1.5 2014/07/12 21:54:58 jasper Exp $ */
/*
* Copyright (c) 2006 Michael Shalayeff
@@ -30,7 +30,7 @@ int blkdevopen(struct open_file *, ...);
int blkdevclose(struct open_file *);
int blkdevstrategy(void *, int, daddr32_t, size_t, void *, size_t *);
void scif_init(unsigned int);
-int scif_getc(void);
+int getc(void);
void scif_putc(int);
void cache_flush(void);
void cache_disable(void);
diff --git a/sys/arch/landisk/stand/boot/scifcons.c b/sys/arch/landisk/stand/boot/scifcons.c
index d2ef9517f7e..6f6574b7947 100644
--- a/sys/arch/landisk/stand/boot/scifcons.c
+++ b/sys/arch/landisk/stand/boot/scifcons.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scifcons.c,v 1.3 2008/06/27 06:03:08 ray Exp $ */
+/* $OpenBSD: scifcons.c,v 1.4 2014/07/12 21:54:58 jasper Exp $ */
/* $NetBSD: scifcons.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */
/* NetBSD: scif.c,v 1.38 2004/12/13 02:14:13 chs Exp */
@@ -162,7 +162,7 @@ scif_init(unsigned int bps)
}
int
-scif_getc(void)
+getc(void)
{
unsigned char c, err_c;
unsigned short err_c2;