From owner-p4-projects Sun Oct 13 16: 4: 2 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6C02B37B404; Sun, 13 Oct 2002 16:03:59 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1B1E137B401 for ; Sun, 13 Oct 2002 16:03:59 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B0E7643EAC for ; Sun, 13 Oct 2002 16:03:58 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id g9DN3SMt039843 for ; Sun, 13 Oct 2002 16:03:28 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.3/Submit) id g9DN3Stx039840 for perforce@freebsd.org; Sun, 13 Oct 2002 16:03:28 -0700 (PDT) Date: Sun, 13 Oct 2002 16:03:28 -0700 (PDT) Message-Id: <200210132303.g9DN3Stx039840@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett Subject: PERFORCE change 19238 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 #include -#include +#include #include #include @@ -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 #include -#include +#include #include #include @@ -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