From owner-freebsd-bugs@FreeBSD.ORG Thu Aug 28 20:40:01 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13CDF1065689 for ; Thu, 28 Aug 2008 20:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id DE3338FC41 for ; Thu, 28 Aug 2008 20:40:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7SKe0Eo032904 for ; Thu, 28 Aug 2008 20:40:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7SKe0f2032903; Thu, 28 Aug 2008 20:40:00 GMT (envelope-from gnats) Resent-Date: Thu, 28 Aug 2008 20:40:00 GMT Resent-Message-Id: <200808282040.m7SKe0f2032903@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Gavin Atkinson Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F86E106569A for ; Thu, 28 Aug 2008 20:35:06 +0000 (UTC) (envelope-from ga9@buffy.york.ac.uk) Received: from buffy.york.ac.uk (buffy.york.ac.uk [144.32.226.160]) by mx1.freebsd.org (Postfix) with ESMTP id B19F18FC37 for ; Thu, 28 Aug 2008 20:35:05 +0000 (UTC) (envelope-from ga9@buffy.york.ac.uk) Received: from buffy.york.ac.uk (localhost [127.0.0.1]) by buffy.york.ac.uk (8.14.2/8.14.2) with ESMTP id m7SKZ4Gh050455 for ; Thu, 28 Aug 2008 21:35:04 +0100 (BST) (envelope-from ga9@buffy.york.ac.uk) Received: (from ga9@localhost) by buffy.york.ac.uk (8.14.2/8.14.2/Submit) id m7SKZ4KF050454; Thu, 28 Aug 2008 21:35:04 +0100 (BST) (envelope-from ga9) Message-Id: <200808282035.m7SKZ4KF050454@buffy.york.ac.uk> Date: Thu, 28 Aug 2008 21:35:04 +0100 (BST) From: Gavin Atkinson To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/126926: [patch] Add MACHINE to dmesg X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Gavin Atkinson List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Aug 2008 20:40:01 -0000 >Number: 126926 >Category: kern >Synopsis: [patch] Add MACHINE to dmesg >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Aug 28 20:40:00 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Gavin Atkinson >Release: FreeBSD 7.0-STABLE amd64 >Organization: >Environment: System: FreeBSD buffy.york.ac.uk 7.0-STABLE FreeBSD 7.0-STABLE #3: Fri Jun 20 09:21:51 UTC 2008 root@buffy.york.ac.uk:/usr/obj/usr/src/sys/GENERIC amd64 >Description: As somebody who has seen a lot of PRs, it has often proved difficult to determine whether somebody is running an i386 or amd64 kernel. Sometimes it is obvious from looking at the I/O ranges assigned, but other times (see www/126925 for example) there may be nothing at all in the dmesg to indicate the architecture that the kernel was built for. This patch adds it. >How-To-Repeat: Look at the dmesg in www/126925 and tell me if it was an i386 or amd64 kernel... >Fix: This patch will include the contents of ${MACHINE} into the kernel VERSTR, which in turn will lead to the following appearance in a dmesg: Copyright (c) 1992-2008 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 8.0-CURRENT #28: Tue Aug 19 19:42:20 BST 2008 root@rho.york.ac.uk:/usr/obj/usr/src/sys/RHO i386 WARNING: WITNESS option enabled, expect reduced performance. (note the architecture on the sixth line). This will also be included in the output of `sysctl kern.version` and `uname -v`, but I don't see these as a disadvantage. Given the recent change to include the SVN revision number if available into this string, I think it's safe to change the format again on the assumption that nobody is parsing this directly. --- newvers.sh begins here --- Index: src/sys/conf/newvers.sh =================================================================== RCS file: /home/ncvs/src/sys/conf/newvers.sh,v retrieving revision 1.76 diff -u -r1.76 newvers.sh --- src/sys/conf/newvers.sh 13 Jul 2008 20:08:38 -0000 1.76 +++ src/sys/conf/newvers.sh 16 Aug 2008 09:25:24 -0000 @@ -86,6 +86,7 @@ touch version v=`cat version` u=${USER:-root} d=`pwd` h=${HOSTNAME:-`hostname`} t=`date` i=`${MAKE:-make} -V KERN_IDENT` +p=`${MAKE:-make} -V MACHINE` for dir in /bin /usr/bin /usr/local/bin; do if [ -x "${dir}/svnversion" ]; then @@ -105,7 +106,7 @@ cat << EOF > vers.c $COPYRIGHT #define SCCSSTR "@(#)${VERSION} #${v}${svn}: ${t}" -#define VERSTR "${VERSION} #${v}${svn}: ${t}\\n ${u}@${h}:${d}\\n" +#define VERSTR "${VERSION} #${v}${svn}: ${t}\\n ${u}@${h}:${d} ${p}\\n" #define RELSTR "${RELEASE}" char sccs[sizeof(SCCSSTR) > 128 ? sizeof(SCCSSTR) : 128] = SCCSSTR; --- newvers.sh ends here --- >Release-Note: >Audit-Trail: >Unformatted: