From naddy@mips.inka.de  Mon Feb 10 10:31:41 2003
Return-Path: <naddy@mips.inka.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 1F63F37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 10 Feb 2003 10:31:41 -0800 (PST)
Received: from mail.inka.de (quechua.inka.de [193.197.184.2])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 5E35843F75
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 10 Feb 2003 10:31:39 -0800 (PST)
	(envelope-from naddy@mips.inka.de)
Received: from kemoauc.mips.inka.de (uucp@)
	by mail.inka.de with gbsmtp 
	id 18iIiP-0007li-09; Mon, 10 Feb 2003 19:31:37 +0100
Received: from kemoauc.mips.inka.de (localhost [127.0.0.1])
	by kemoauc.mips.inka.de (8.12.6/8.12.6) with ESMTP id h1AI5DPD077177
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 10 Feb 2003 19:05:13 +0100 (CET)
	(envelope-from naddy@localhost.mips.inka.de)
Received: (from naddy@localhost)
	by kemoauc.mips.inka.de (8.12.6/8.12.6/Submit) id h1AI5DmA077176;
	Mon, 10 Feb 2003 19:05:13 +0100 (CET)
Message-Id: <200302101805.h1AI5DmA077176@kemoauc.mips.inka.de>
Date: Mon, 10 Feb 2003 19:05:13 +0100 (CET)
From: Christian Weisgerber <naddy@freebsd.org>
Reply-To: Christian Weisgerber <naddy@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: config.8: recover kernel conf from INCLUDE_CONFIG_FILE
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         48157
>Category:       bin
>Synopsis:       config.8: recover kernel conf from INCLUDE_CONFIG_FILE
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ceri
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 10 10:40:00 PST 2003
>Closed-Date:    Thu Mar 13 04:18:10 PST 2003
>Last-Modified:  Thu Mar 13 04:18:10 PST 2003
>Originator:     Christian Weisgerber
>Release:        FreeBSD 5.0-CURRENT alpha
>Organization:
>Environment:
System: FreeBSD kemoauc.mips.inka.de 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Wed Feb 5 13:01:08 CET 2003 naddy@kemoauc.mips.inka.de:/usr/obj/usr/src/sys/KEMOAUC alpha

>Description:

"options INCLUDE_CONFIG_FILE" allows the inclusion of the kernel
configuration file into the kernel image.  config.8 suggests the
command

    strings kernel | grep ___

to recover the original configuration file.  Instead I propose this
command

    strings kernel | sed -n 's/^___//p'

which is less likely to match false positives and removes the
protecting leading underscores.

>How-To-Repeat:

>Fix:

Index: src/usr.sbin/config/config.8
===================================================================
RCS file: /home/ncvs/src/usr.sbin/config/config.8,v
retrieving revision 1.37
diff -u -r1.37 config.8
--- src/usr.sbin/config/config.8	12 Dec 2002 17:26:02 -0000	1.37
+++ src/usr.sbin/config/config.8	10 Feb 2003 17:58:18 -0000
@@ -164,7 +164,7 @@
 can be used to extract it from a kernel:
 to extract the configuration information, use the command
 .Pp
-.Dl "strings kernel | grep ___"
+.Dl "strings kernel | sed -n 's/^___//p'"
 .Sh DEBUG KERNELS
 Traditional
 .Bx
>Release-Note:
>Audit-Trail:

From: Ceri Davies <setantae@submonkey.net>
To: Christian Weisgerber <naddy@FreeBSD.org>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: bin/48157: config.8: recover kernel conf from INCLUDE_CONFIG_FILE
Date: Mon, 10 Feb 2003 18:54:29 +0000

 On Mon, Feb 10, 2003 at 07:05:13PM +0100, Christian Weisgerber wrote:
 > 
 >     strings kernel | grep ___
 > 
 > to recover the original configuration file.  Instead I propose this
 > command
 > 
 >     strings kernel | sed -n 's/^___//p'
 
 LINT suggests "strings -n 3 /kernel | sed -n 's/^___//p'" - the two should
 be made consistent, whichever is decided upon.
 
 Ceri
 -- 
Responsible-Changed-From-To: freebsd-bugs->ceri 
Responsible-Changed-By: ceri 
Responsible-Changed-When: Tue Feb 18 12:28:13 PST 2003 
Responsible-Changed-Why:  
I'll take this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=48157 
State-Changed-From-To: open->patched 
State-Changed-By: ceri 
State-Changed-When: Tue Feb 18 13:05:14 PST 2003 
State-Changed-Why:  
Committed to -HEAD. 
Keeping this open as my MFC reminder (after 4.8). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=48157 
State-Changed-From-To: patched->closed 
State-Changed-By: ceri 
State-Changed-When: Thu Mar 13 04:17:43 PST 2003 
State-Changed-Why:  
trhodes MFCd this in r1.21.2.6. 

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