PERFORCE change 154201 for review
Ed Schouten
ed at FreeBSD.org
Sat Dec 6 10:12:00 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=154201
Change 154201 by ed at ed_flippo on 2008/12/06 18:10:59
Somewhat make device status reports work.
Affected files ...
.. //depot/projects/mpsafetty/sys/dev/syscons/scterm-teken.c#13 edit
.. //depot/projects/mpsafetty/sys/dev/syscons/syscons.c#8 edit
.. //depot/projects/mpsafetty/sys/dev/syscons/syscons.h#4 edit
Differences ...
==== //depot/projects/mpsafetty/sys/dev/syscons/scterm-teken.c#13 (text+ko) ====
@@ -398,4 +398,7 @@
static void
scteken_respond(void *arg, const void *buf, size_t len)
{
+ scr_stat *scp = arg;
+
+ sc_respond(scp, buf, len);
}
==== //depot/projects/mpsafetty/sys/dev/syscons/syscons.c#8 (text+ko) ====
@@ -3569,7 +3569,7 @@
#endif /* !SC_NO_FONT_LOADING */
void
-sc_paste(scr_stat *scp, u_char *p, int count)
+sc_paste(scr_stat *scp, const u_char *p, int count)
{
struct tty *tp;
u_char *rmap;
@@ -3584,6 +3584,22 @@
}
void
+sc_respond(scr_stat *scp, const u_char *p, int count)
+{
+ struct tty *tp;
+
+ tp = SC_DEV(scp->sc, scp->sc->cur_scp->index);
+ if (!tty_opened(tp))
+ return;
+ for (; count > 0; --count)
+ ttydisc_rint(tp, *p++, 0);
+#if 0
+ /* XXX: we can't call ttydisc_rint_done() here! */
+ ttydisc_rint_done(tp);
+#endif
+}
+
+void
sc_bell(scr_stat *scp, int pitch, int duration)
{
if (cold || shutdown_in_progress || !enable_bell)
==== //depot/projects/mpsafetty/sys/dev/syscons/syscons.h#4 (text+ko) ====
@@ -563,7 +563,8 @@
int sc_switch_scr(sc_softc_t *sc, u_int next_scr);
void sc_alloc_scr_buffer(scr_stat *scp, int wait, int discard);
int sc_init_emulator(scr_stat *scp, char *name);
-void sc_paste(scr_stat *scp, u_char *p, int count);
+void sc_paste(scr_stat *scp, const u_char *p, int count);
+void sc_respond(scr_stat *scp, const u_char *p, int count);
void sc_bell(scr_stat *scp, int pitch, int duration);
/* schistory.c */
More information about the p4-projects
mailing list