Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/rump/librump/rumpkern Make some stubby tty routines used...



details:   https://anonhg.NetBSD.org/src/rev/b68c3180b997
branches:  trunk
changeset: 755647:b68c3180b997
user:      pooka <pooka%NetBSD.org@localhost>
date:      Mon Jun 14 13:25:40 2010 +0000

description:
Make some stubby tty routines used by printf weak aliases, so that
the full ones will be used if we have the upcoming tty component
loaded.

diffstat:

 sys/rump/librump/rumpkern/emul.c |  32 +++++++++++++++++++++-----------
 1 files changed, 21 insertions(+), 11 deletions(-)

diffs (66 lines):

diff -r 9ce2cf81f860 -r b68c3180b997 sys/rump/librump/rumpkern/emul.c
--- a/sys/rump/librump/rumpkern/emul.c  Mon Jun 14 05:27:51 2010 +0000
+++ b/sys/rump/librump/rumpkern/emul.c  Mon Jun 14 13:25:40 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: emul.c,v 1.141 2010/06/13 15:17:02 pooka Exp $ */
+/*     $NetBSD: emul.c,v 1.142 2010/06/14 13:25:40 pooka Exp $ */
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.141 2010/06/13 15:17:02 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.142 2010/06/14 13:25:40 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/null.h>
@@ -204,13 +204,31 @@
 }
 void (*delay_func)(unsigned int) = rump_delay;
 
+/*
+ * Provide weak aliases for tty routines used by printf.
+ * They will be used unless the rumpkern_tty component is present.
+ */
+
+int rump_ttycheckoutq(struct tty *, int);
 int
-ttycheckoutq(struct tty *tp, int wait)
+rump_ttycheckoutq(struct tty *tp, int wait)
 {
 
        return 1;
 }
+__weak_alias(ttycheckoutq,rump_ttycheckoutq);
 
+int rump_tputchar(int, int, struct tty *);
+int
+rump_tputchar(int c, int flags, struct tty *tp)
+{
+
+       cnputc(c);
+       return 0;
+}
+__weak_alias(tputchar,rump_tputchar);
+
+//struct cdevsw cons_cdevsw;
 void
 cnputc(int c)
 {
@@ -226,14 +244,6 @@
        /* done */
 }
 
-int
-tputchar(int c, int flags, struct tty *tp)
-{
-
-       cnputc(c);
-       return 0;
-}
-
 void
 cpu_reboot(int howto, char *bootstr)
 {



Home | Main Index | Thread Index | Old Index