Subject: port-hp300/1122: sys/arch/hp300/stand/cons.c doesn't compile...
To: None <gnats-admin@sun-lamp.cs.berkeley.edu>
From: None <boogles@martigny.ai.mit.edu>
List: netbsd-bugs
Date: 06/07/1995 12:20:04
>Number:         1122
>Category:       port-hp300
>Synopsis:       sys/arch/hp300/stand/cons.c doesn't compile...
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun  7 12:20:03 1995
>Originator:     Brian K Zuzga
>Organization:
MIT AI
>Release:        NetBSD-current as sup'ed 6/7/95
>Environment:
	
System: NetBSD geneva.ai.mit.edu 1.0A NetBSD 1.0A (DUALITY) #0: Sat Apr 1 14:12:40 EST 1995 mycroft@duality.gnu.ai.mit.edu:/build/src/sys/arch/hp300/compile/DUALITY hp300


>Description:
   The usage of the consdev struct used in cngetc() and cnputc() don't
match what is in /usr/include/dev/cons.h.  Just looks like the hp300
port lags a little behind the times.  I get a "too few arguments to
function" error.

>How-To-Repeat:

do a make in the sys/arch/hp300/stand dir.

>Fix:

Well, I don't know what the fix is, but I found the problem.  I don't
know what these new arguments are, so I guess I'm no help. :-)

/* From sys/arch/hp300/stand/cons.c: */

cngetc()
{
	if (cn_tab)
		return((*cn_tab->cn_getc)());
	return(0);
}

/* From /usr/include/dev/cons.h: */

struct consdev {
	void	(*cn_probe)	/* probe hardware and fill in consdev info */
		    __P((struct consdev *));
	void	(*cn_init)	/* turn on as console */
		    __P((struct consdev *));
	int	(*cn_getc)	/* kernel getchar interface */
		    __P((dev_t));
	void	(*cn_putc)	/* kernel putchar interface */
		    __P((dev_t, int));
	void	(*cn_pollc)	/* turn on and off polling */
		    __P((dev_t, int));
	dev_t	cn_dev;		/* major/minor of device */
	int	cn_pri;		/* pecking order; the higher the better */
};
>Audit-Trail:
>Unformatted: