Subject: port-i386/2528: pccons ignores XSERVER
To: None <gnats-bugs@NetBSD.ORG>
From: Mike Long <mike.long@analog.com>
List: netbsd-bugs
Date: 06/07/1996 23:35:16
>Number:         2528
>Category:       port-i386
>Synopsis:       pccons ignores XSERVER
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun  8 00:05:02 1996
>Last-Modified:
>Originator:     Mike Long <mike.long@analog.com>
>Organization:
	None of the Above
>Release:        1.2_ALPHA
>Environment:
System: NetBSD azathoth 1.2_ALPHA NetBSD 1.2_ALPHA (AZATHOTH) #69: Wed Jun 5 22:12:55 EDT 1996 root@azathoth:/usr/src/sys/arch/i386/compile/AZATHOTH i386

>Description:
	The pccons driver does not exclude X support if 'options
XSERVER' is absent.  Excluding X support saves ~.6K, which may make
a difference in the INSTALL* kernels.

>How-To-Repeat:
# cd /sys/arch/i386/conf; config INSTOTHER
# cd ../compile/INSTOTHER; make depend && make
# nm netbsd | fgrep pc_xmode

>Fix:
	Apply this patch:

*** /sys/arch/i386/isa/pccons.c.orig	Wed Jun  5 07:36:07 1996
--- /sys/arch/i386/isa/pccons.c	Fri Jun  7 23:23:26 1996
***************
*** 92,96 ****
--- 92,98 ----
  static u_short cursor_shape = 0xffff,	/* don't update until set by user */
  	       old_cursor_shape = 0xffff;
+ #ifdef XSERVER
  int pc_xmode = 0;
+ #endif
  
  #define	PCUNIT(x)	(minor(x))
***************
*** 151,156 ****
--- 153,160 ----
  char *sget __P((void));
  void sput __P((u_char *, int));
+ #ifdef XSERVER
  void pc_xmode_on __P((void));
  void pc_xmode_off __P((void));
+ #endif
  
  void	pcstart __P((struct tty *));
***************
*** 161,165 ****
--- 165,171 ----
  int kbd_cmd __P((u_char, u_char));
  void set_cursor_shape __P((void));
+ #ifdef XSERVER
  void get_cursor_shape __P((void));
+ #endif
  void do_async_update __P((void *));
  void async_update __P((void));
***************
*** 318,321 ****
--- 324,328 ----
  }
  
+ #ifdef XSERVER
  void
  get_cursor_shape()
***************
*** 340,343 ****
--- 347,351 ----
  		cursor_shape &= 0x1f1f;
  }
+ #endif /* XSERVER */
  
  void
***************
*** 368,373 ****
--- 376,383 ----
  	}
  
+ #ifdef XSERVER
  	if (pc_xmode > 0)
  		return;
+ #endif
  
  	pos = crtat - Crtat;
***************
*** 650,653 ****
--- 660,664 ----
  
  	switch (cmd) {
+ #ifdef XSERVER
  	case CONSOLE_X_MODE_ON:
  		pc_xmode_on();
***************
*** 668,671 ****
--- 679,683 ----
  			sysbeep(BEEP_FREQ, BEEP_TIME);
  		return 0;
+ #endif /* XSERVER */
  	case CONSOLE_SET_TYPEMATIC_RATE: {
   		u_char	rate;
***************
*** 789,794 ****
--- 801,808 ----
  	register char *cp;
  
+ #ifdef XSERVER
  	if (pc_xmode > 0)
  		return 0;
+ #endif
  
  	do {
***************
*** 873,878 ****
--- 887,894 ----
  	u_char c, scroll = 0;
  
+ #ifdef XSERVER
  	if (pc_xmode > 0)
  		return;
+ #endif
  
  	if (crtat == 0) {
***************
*** 1461,1464 ****
--- 1477,1481 ----
  	}
  
+ #ifdef XSERVER
  	if (pc_xmode > 0) {
  #if defined(DDB) && defined(XSERVER_DDB)
***************
*** 1514,1517 ****
--- 1531,1535 ----
  		return capchar;
  	}
+ #endif /* XSERVER */
  
  	switch (dt) {
***************
*** 1662,1665 ****
--- 1680,1684 ----
  }
  
+ #ifdef XSERVER
  void
  pc_xmode_on()
***************
*** 1702,1703 ****
--- 1721,1723 ----
  	fp->tf_eflags &= ~PSL_IOPL;
  }
+ #endif /* XSERVER */

>Audit-Trail:
>Unformatted: