PERFORCE change 146462 for review
Ed Schouten
ed at FreeBSD.org
Sat Aug 2 15:37:23 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=146462
Change 146462 by ed at ed_dull on 2008/08/02 15:36:49
Fix some small style(9) issues in tty.c. Also reduce the baud
rate for psuedo-devices to 38400 baud, which means the buffer
sizes are similar to the old TTY code.
Affected files ...
.. //depot/projects/mpsafetty/sys/kern/tty.c#10 edit
Differences ...
==== //depot/projects/mpsafetty/sys/kern/tty.c#10 (text+ko) ====
@@ -768,6 +768,7 @@
static int
ttydevsw_defopen(struct tty *tp)
{
+
return (0);
}
@@ -779,6 +780,7 @@
static void
ttydevsw_defoutwakeup(struct tty *tp)
{
+
panic("Terminal device has output, while not implemented");
}
@@ -790,14 +792,16 @@
static int
ttydevsw_defioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td)
{
+
return (ENOIOCTL);
}
static int
ttydevsw_defparam(struct tty *tp, struct termios *t)
{
+
/* Use a fake baud rate, we're not a real device. */
- t->c_ispeed = t->c_ospeed = B115200;
+ t->c_ispeed = t->c_ospeed = B38400;
return (0);
}
@@ -805,19 +809,23 @@
static int
ttydevsw_defmodem(struct tty *tp, int sigon, int sigoff)
{
+
/* Simulate a carrier to make the TTY layer happy */
return (SER_DCD);
}
static int
-ttydevsw_defmmap(struct tty *tp, vm_offset_t offset, vm_paddr_t *paddr, int nprot)
+ttydevsw_defmmap(struct tty *tp, vm_offset_t offset, vm_paddr_t *paddr,
+ int nprot)
{
+
return (-1);
}
static void
ttydevsw_deffree(void *softc)
{
+
panic("Terminal device freed without a free-handler");
}
More information about the p4-projects
mailing list