From owner-svn-src-all@FreeBSD.ORG Mon Aug 20 14:49:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8CE19106566C; Mon, 20 Aug 2012 14:49:06 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 779B68FC12; Mon, 20 Aug 2012 14:49:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KEn6fQ049156; Mon, 20 Aug 2012 14:49:06 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KEn6ZK049154; Mon, 20 Aug 2012 14:49:06 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201208201449.q7KEn6ZK049154@svn.freebsd.org> From: Ed Maste Date: Mon, 20 Aug 2012 14:49:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239431 - stable/9/usr.sbin/crashinfo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 14:49:06 -0000 Author: emaste Date: Mon Aug 20 14:49:06 2012 New Revision: 239431 URL: http://svn.freebsd.org/changeset/base/239431 Log: MFC r232666: Improve multi-line kernel ident parsing Instead of blindly grabbing the line with 'Version string' and the following one from the core info file, take all lines after 'Version string' until the one one that matches the field format in the core info file. This provides compatibility with VendorBSD modifications that have a different kernel ident format. Modified: stable/9/usr.sbin/crashinfo/crashinfo.sh Directory Properties: stable/9/usr.sbin/crashinfo/ (props changed) Modified: stable/9/usr.sbin/crashinfo/crashinfo.sh ============================================================================== --- stable/9/usr.sbin/crashinfo/crashinfo.sh Mon Aug 20 14:42:29 2012 (r239430) +++ stable/9/usr.sbin/crashinfo/crashinfo.sh Mon Aug 20 14:49:06 2012 (r239431) @@ -45,10 +45,11 @@ find_kernel() nextline=1 next } - // { - if (nextline) { - print + nextline==1 { + if ($0 ~ "^ [A-Za-z ]+: ") { nextline=0 + } else { + print } }' $INFO)