From antoine@massena-4-82-67-196-50.fbx.proxad.net  Wed Sep 15 18:41:57 2004
Return-Path: <antoine@massena-4-82-67-196-50.fbx.proxad.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id DE34116A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 15 Sep 2004 18:41:57 +0000 (GMT)
Received: from massena-4-82-67-196-50.fbx.proxad.net (massena-4-82-67-196-50.fbx.proxad.net [82.67.196.50])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 280BF43D58
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 15 Sep 2004 18:41:57 +0000 (GMT)
	(envelope-from antoine@massena-4-82-67-196-50.fbx.proxad.net)
Received: from massena-4-82-67-196-50.fbx.proxad.net (localhost.fbx.proxad.net [127.0.0.1])
	by massena-4-82-67-196-50.fbx.proxad.net (8.13.1/8.13.1) with ESMTP id i8FIg0Lc001212
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 15 Sep 2004 20:42:01 +0200 (CEST)
	(envelope-from antoine@massena-4-82-67-196-50.fbx.proxad.net)
Received: (from antoine@localhost)
	by massena-4-82-67-196-50.fbx.proxad.net (8.13.1/8.13.1/Submit) id i8FIftfr001211;
	Wed, 15 Sep 2004 20:41:55 +0200 (CEST)
	(envelope-from antoine)
Message-Id: <200409151841.i8FIftfr001211@massena-4-82-67-196-50.fbx.proxad.net>
Date: Wed, 15 Sep 2004 20:41:55 +0200 (CEST)
From: Antoine Brodin <antoine.brodin@laposte.net>
Reply-To: Antoine Brodin <antoine.brodin@laposte.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] genericize.pl -c misses some comments
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         71773
>Category:       bin
>Synopsis:       [patch] genericize.pl -c misses some comments
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    des
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 15 18:50:29 GMT 2004
>Closed-Date:    Mon Jun 08 11:37:32 UTC 2009
>Last-Modified:  Mon Jun 08 11:37:32 UTC 2009
>Originator:     Antoine Brodin
>Release:        FreeBSD 6.0-CURRENT i386
>Organization:
none
>Environment:
System: FreeBSD massena-4-82-67-196-50.fbx.proxad.net 6.0-CURRENT FreeBSD 6.0-CURRENT #0: Mon Sep 13 17:05:28 CEST 2004 root@massena-4-82-67-196-50.fbx.proxad.net:/usr/obj/usr/src/sys/BARTON i386
>Description:
	The genericize.pl script in src/tools/tools/genericize misses
	some comments when invoked with -c option.
>How-To-Repeat:
	Use genericize.pl -c on a GENERIC i386 config
	It misses two lines :
					# output.  Adds ~128k to driver.
	and
					# output.  Adds ~215k to driver.
>Fix:
	Apply this patch :

--- genericize.patch begins here ---
Index: genericize.pl
===================================================================
RCS file: /home/ncvs/src/tools/tools/genericize/genericize.pl,v
retrieving revision 1.2
diff -u -r1.2 genericize.pl
--- genericize.pl	29 Aug 2004 19:45:50 -0000	1.2
+++ genericize.pl	15 Sep 2004 17:50:00 -0000
@@ -66,7 +66,7 @@
     while (<GENERIC>) {
 	my $line = $_;
 	chomp();
-	if ($opts{'c'} && m/^\#/) {
+	if ($opts{'c'} && m/^\s*\#/) {
 	    if ($blank) {
 		print "\n";
 		$blank = 0;
--- genericize.patch ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->des 
Responsible-Changed-By: ceri 
Responsible-Changed-When: Wed Sep 15 18:58:46 GMT 2004 
Responsible-Changed-Why:  
I'm not sure if des wants to claim maintainership over this, but throw 
it his way first just in case. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71773 

From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=)
To: Antoine Brodin <antoine.brodin@laposte.net>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: bin/71773: [patch] genericize.pl -c misses some comments
Date: Wed, 15 Sep 2004 22:14:54 +0200

 Antoine Brodin <antoine.brodin@laposte.net> writes:
 > 	It misses two lines :
 > 					# output.  Adds ~128k to driver.
 > 	and
 > 					# output.  Adds ~215k to driver.
 
 This isn't quite as simple as it looks.  These comments belong to
 device or option lines and should not show up in the output unless the
 device or option line they belong to is also kept.  There are a number
 of other cases like this (though perhaps none so obvious), and fixing
 them all would require a lot of extra heuristics.
 
 From a "better too many comments than too little" persepctive, though,
 the suggested patch makes sense, and I will commit it.
 
 DES
 --=20
 Dag-Erling Sm=F8rgrav - des@des.no
State-Changed-From-To: open->suspended 
State-Changed-By: des 
State-Changed-When: Thu Sep 16 14:48:49 GMT 2004 
State-Changed-Why:  
Patch committed, but a better solution may be required in the long term 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71773 
State-Changed-From-To: suspended->closed 
State-Changed-By: des 
State-Changed-When: Mon Jun 8 11:37:31 UTC 2009 
State-Changed-Why:  
stale 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71773 
>Unformatted:
