PERFORCE change 76708 for review

Marcel Moolenaar marcel at FreeBSD.org
Sun May 8 13:29:56 PDT 2005


http://perforce.freebsd.org/chv.cgi?CH=76708

Change 76708 by marcel at marcel_nfs on 2005/05/08 20:29:27

	Fill in the cn_name field of the consdev structure to avoid
	confusing (for the end-user) warnings. Quick and dirty. Will
	be cleaned up when get back to this code.

Affected files ...

.. //depot/projects/tty/sys/dev/vtc/vtc_con.c#2 edit
.. //depot/projects/tty/sys/dev/vtc/vtc_core.c#3 edit

Differences ...

==== //depot/projects/tty/sys/dev/vtc/vtc_con.c#2 (text+ko) ====

@@ -38,6 +38,8 @@
 
 #include <dev/vtc/vtc_con.h>
 
+extern char vtc_device_name[];		/* XXX Should be in a header file. */
+
 static cn_checkc_t vtc_cncheckc;
 static cn_getc_t vtc_cngetc;
 static cn_init_t vtc_cninit;
@@ -66,6 +68,7 @@
 			cur_vc = vc;
 		}
 	}
+	strlcpy(cp->cn_name, vtc_device_name, sizeof(cp->cn_name));
 	cp->cn_arg = cur_vc;
 	cp->cn_pri = (cur_vc != NULL) ? CN_INTERNAL : CN_DEAD;
 }

==== //depot/projects/tty/sys/dev/vtc/vtc_core.c#3 (text+ko) ====

@@ -33,13 +33,15 @@
 #include <sys/kernel.h>
 #include <sys/module.h>
 
+char vtc_device_name[] = "vtc";
+
 static int
 vtc_modevent(module_t mod, int type, void *data)
 {
 
 	switch (type) {
 	case MOD_LOAD:
-		printf("vtc: <console, virtual terminal>\n");
+		printf("%s: <console, virtual terminal>\n", vtc_device_name);
 		return (0);
 
 	case MOD_UNLOAD:


More information about the p4-projects mailing list