Date: Thu, 28 Aug 2008 21:35:04 +0100 (BST) From: Gavin Atkinson <gavin@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/126926: [patch] Add MACHINE to dmesg Message-ID: <200808282035.m7SKZ4KF050454@buffy.york.ac.uk> Resent-Message-ID: <200808282040.m7SKe0f2032903@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808282035.m7SKZ4KF050454>