Date: Sun, 13 Oct 2002 16:03:28 -0700 (PDT) From: Juli Mallett <jmallett@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 19238 for review Message-ID: <200210132303.g9DN3Stx039840@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=19238 Change 19238 by jmallett@jmallett_thefather on 2002/10/13 16:02:40 A go at converting the arcbios tty stuff to our console code. Affected files ... .. //depot/projects/mips/sys/dev/arcbios/arcbios.c#2 edit .. //depot/projects/mips/sys/dev/arcbios/arcbios_tty.c#2 edit Differences ... ==== //depot/projects/mips/sys/dev/arcbios/arcbios.c#2 (text+ko) ==== @@ -42,7 +42,7 @@ #include <sys/param.h> #include <sys/systm.h> -#include <dev/cons.h> +#include <sys/cons.h> #include <sys/conf.h> #include <dev/arcbios/arcbios.h> @@ -62,12 +62,7 @@ void arcbios_fetch_system_identifier(struct arcbios_component *, struct arcbios_treewalk_context *); -struct consdev arcbios_cn = { - NULL, NULL, arcbios_cngetc, arcbios_cnputc, nullcnpollc, NULL, - NODEV, CN_NORMAL, -}; - -extern const struct cdevsw arcbios_cdevsw; +CONS_DRIVER(arcbios, NULL, NULL, NULL, arcbios_cngetc, NULL, arcbios_cnputc, NULL); /* * arcbios_init: ==== //depot/projects/mips/sys/dev/arcbios/arcbios_tty.c#2 (text+ko) ==== @@ -41,7 +41,7 @@ #include <sys/tty.h> #include <sys/termios.h> -#include <dev/cons.h> +#include <sys/cons.h> #include <dev/arcbios/arcbios.h> #include <dev/arcbios/arcbiosvar.h> @@ -63,10 +63,21 @@ dev_type_tty(arcbios_ttytty); dev_type_poll(arcbios_ttypoll); -const struct cdevsw arcbios_cdevsw = { - arcbios_ttyopen, arcbios_ttyclose, arcbios_ttyread, arcbios_ttywrite, - arcbios_ttyioctl, arcbios_ttystop, arcbios_ttytty, arcbios_ttypoll, - nommap, D_TTY, +const struct cdevsw arcbios_cdevsw { + /* open */ arcbios_ttyopen, + /* close */ arcbios_ttyclose, + /* read */ arcbios_ttyread, + /* write */ arcbios_ttywrite, + /* ioctl */ arcbios_ttyioctl, + /* poll */ arcbios_ttypoll, + /* mmap */ nommap, + /* strategy */ nostrategy, + /* name */ arcbios_driver_name, + /* maj */ CDEV_MAJOR, + /* dump */ nodump, + /* psize */ nopsize, + /* flags */ D_TTY, + /* kqfilter */ nokqfilter, }; int @@ -241,13 +252,3 @@ } callout_reset(&arcbios_tty_ch, 1, arcbios_tty_poll, tp); } - -struct tty * -arcbios_ttytty(dev_t dev) -{ - - if (minor(dev) != 0) - panic("arcbios_ttytty: bogus"); - - return (arcbios_tty[0]); -} To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210132303.g9DN3Stx039840>