From owner-p4-projects@FreeBSD.ORG Sun May 8 20:29:55 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2392916A4E8; Sun, 8 May 2005 20:29:55 +0000 (GMT) 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 F0CF616A4E6 for ; Sun, 8 May 2005 20:29:54 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DAEE443D66 for ; Sun, 8 May 2005 20:29:54 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j48KTsqH094005 for ; Sun, 8 May 2005 20:29:54 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j48KTsNW094002 for perforce@freebsd.org; Sun, 8 May 2005 20:29:54 GMT (envelope-from marcel@freebsd.org) Date: Sun, 8 May 2005 20:29:54 GMT Message-Id: <200505082029.j48KTsNW094002@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 76708 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 May 2005 20:29:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=76708 Change 76708 by marcel@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 +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 #include +char vtc_device_name[] = "vtc"; + static int vtc_modevent(module_t mod, int type, void *data) { switch (type) { case MOD_LOAD: - printf("vtc: \n"); + printf("%s: \n", vtc_device_name); return (0); case MOD_UNLOAD: