svn commit: r239431 - stable/9/usr.sbin/crashinfo

Ed Maste emaste at FreeBSD.org
Mon Aug 20 14:49:06 UTC 2012


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)
 


More information about the svn-src-all mailing list