From owner-svn-src-stable-7@FreeBSD.ORG Sun Nov 1 17:43:00 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1091E106566B; Sun, 1 Nov 2009 17:43:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F22A68FC08; Sun, 1 Nov 2009 17:42:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA1Hgxt7029753; Sun, 1 Nov 2009 17:42:59 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1Hgx0N029751; Sun, 1 Nov 2009 17:42:59 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011742.nA1Hgx0N029751@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 17:42:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198759 - in stable/7/sys: . contrib/pf kern X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2009 17:43:00 -0000 Author: avg Date: Sun Nov 1 17:42:59 2009 New Revision: 198759 URL: http://svn.freebsd.org/changeset/base/198759 Log: MFC 197658: print machine in kernel boot version string PR: kern/126926 Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/kern/init_main.c Modified: stable/7/sys/kern/init_main.c ============================================================================== --- stable/7/sys/kern/init_main.c Sun Nov 1 17:40:05 2009 (r198758) +++ stable/7/sys/kern/init_main.c Sun Nov 1 17:42:59 2009 (r198759) @@ -288,11 +288,24 @@ print_caddr_t(void *data) { printf("%s", (char *)data); } + +static void +print_version(void *data __unused) +{ + int len; + + /* Strip a trailing newline from version. */ + len = strlen(version); + while (len > 0 && version[len - 1] == '\n') + len--; + printf("%.*s %s\n", len, version, machine); +} + SYSINIT(announce, SI_SUB_COPYRIGHT, SI_ORDER_FIRST, print_caddr_t, copyright); SYSINIT(trademark, SI_SUB_COPYRIGHT, SI_ORDER_SECOND, print_caddr_t, trademark); -SYSINIT(version, SI_SUB_COPYRIGHT, SI_ORDER_THIRD, print_caddr_t, version); +SYSINIT(version, SI_SUB_COPYRIGHT, SI_ORDER_THIRD, print_version, NULL); #ifdef WITNESS static char wit_warn[] =