Subject: kern/36538: pckbc.c's printf() output should match its own internal naming conventions
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Greg A. Woods <woods@planix.com>
List: netbsd-bugs
Date: 06/23/2007 19:20:00
>Number:         36538
>Category:       kern
>Synopsis:       pckbc.c's printf() output should match its own internal naming conventions
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 23 19:20:00 +0000 2007
>Originator:     Greg A. Woods
>Release:        netbsd-4 2007/06/23
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Environment:
	
	
System: NetBSD
>Description:


	pckbc.c's printf() output should match its own internal naming
	conventions

>How-To-Repeat:
	
>Fix:

Index: sys/dev/ic/pckbc.c
===================================================================
RCS file: /cvs/master/m-NetBSD/main/src/sys/dev/ic/pckbc.c,v
retrieving revision 1.35
diff -u -r1.35 pckbc.c
--- sys/dev/ic/pckbc.c	11 Dec 2005 12:21:28 -0000	1.35
+++ sys/dev/ic/pckbc.c	10 Feb 2007 18:07:37 -0000
@@ -326,7 +326,7 @@
 
 	/* set initial cmd byte */
 	if (!pckbc_put8042cmd(t)) {
-		printf("kbc: cmd word write error\n");
+		printf("pckbc: initial cmd word write error\n");
 		return;
 	}
 
@@ -349,12 +349,12 @@
 	if (res == 0 || res == 0xfa || res == 0x01 || res == 0xab) {
 #ifdef PCKBCDEBUG
 		if (res != 0)
-			printf("kbc: returned %x on kbd slot test\n", res);
+			printf("pckbc: returned %x on kbd slot test\n", res);
 #endif
 		if (pckbc_attach_slot(sc, PCKBC_KBD_SLOT))
 			cmdbits |= KC8_KENABLE;
 	} else {
-		printf("kbc: kbd port test: %x\n", res);
+		printf("pckbc: kbd port test failed: %x\n", res);
 		return;
 	}
 #else
@@ -368,11 +368,11 @@
 	 *  (eg UMC880?).
 	 */
 	if (!pckbc_send_cmd(iot, ioh_c, KBC_AUXECHO)) {
-		printf("kbc: aux echo error 1\n");
+		printf("pckbc: aux echo error 1, mouse on aux port disabled\n");
 		goto nomouse;
 	}
 	if (!pckbc_wait_output(iot, ioh_c)) {
-		printf("kbc: aux echo error 2\n");
+		printf("pckbc: aux echo error 2, mouse on aux port disabled\n");
 		goto nomouse;
 	}
 	t->t_haveaux = 1;
@@ -390,7 +390,7 @@
 			cmdbits |= KC8_MENABLE;
 	} else {
 #ifdef PCKBCDEBUG
-		printf("kbc: aux echo test failed\n");
+		printf("pckbc: aux echo test failed, aux port disabled\n");
 #endif
 		t->t_haveaux = 0;
 	}
@@ -399,7 +399,7 @@
 	/* enable needed interrupts */
 	t->t_cmdbyte |= cmdbits;
 	if (!pckbc_put8042cmd(t))
-		printf("kbc: cmd word write error\n");
+		printf("pckbc: cmd word write error enabling interrupts\n");
 }
 
 static void
@@ -679,14 +679,14 @@
 	 * all until we request a self-test.
 	 */
 	if (!pckbc_send_cmd(iot, ioh_c, KBC_SELFTEST)) {
-		printf("kbc: unable to request selftest\n");
+		printf("pckbc: unable to request selftest\n");
 		res = EIO;
 		goto out;
 	}
 
 	reply = pckbc_poll_data1(&pckbc_consdata, PCKBC_KBD_SLOT);
 	if (reply != 0x55) {
-		printf("kbc: selftest returned 0x%02x\n", reply);
+		printf("pckbc: selftest returned 0x%02x\n", reply);
 		res = EIO;
 		goto out;
 	}
@@ -695,7 +695,7 @@
 	/* init cmd byte, enable ports */
 	pckbc_consdata.t_cmdbyte = KC8_CPU;
 	if (!pckbc_put8042cmd(&pckbc_consdata)) {
-		printf("kbc: cmd word write error\n");
+		printf("pckbc: cmd word write error sending KC8_CPU\n");
 		res = EIO;
 		goto out;
 	}

>Unformatted: