Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Aug 2012 14:49:06 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r239431 - stable/9/usr.sbin/crashinfo
Message-ID:  <201208201449.q7KEn6ZK049154@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208201449.q7KEn6ZK049154>