From nobody@FreeBSD.org  Wed Nov 28 02:18:41 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AE15E16A41B
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 28 Nov 2007 02:18:41 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id A177013C45A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 28 Nov 2007 02:18:41 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id lAS2IYTY094296
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 28 Nov 2007 02:18:34 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id lAS2IY5W094295;
	Wed, 28 Nov 2007 02:18:34 GMT
	(envelope-from nobody)
Message-Id: <200711280218.lAS2IY5W094295@www.freebsd.org>
Date: Wed, 28 Nov 2007 02:18:34 GMT
From: Weongyo Jeong <weongyo.jeong@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ndiscvt(8): sort a output format.
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         118297
>Category:       bin
>Synopsis:       [patch] ndiscvt(8): sort a output format.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 28 02:20:01 UTC 2007
>Closed-Date:    
>Last-Modified:  Wed Jul 03 01:40:49 UTC 2013
>Originator:     Weongyo Jeong
>Release:        FreeBSD 7.0 CURRENT
>Organization:
CDNetworks
>Environment:
FreeBSD freebsd.weongyo.org 7.0-CURRENT FreeBSD 7.0-CURRENT #3: Sun Jun 24 21:47:30 KST 2007     weongyo@bsd.dev1.cdnetworks.co.kr:/usr/obj/usr/src/sys/GENERIC  i386
You have mail in /var/mail/weongyo

>Description:
the output automatically generated by ndiscvt(8) is not easy to read.  This fix sorts output formats.

>How-To-Repeat:
$ ndis -i <anyfiles> -s <anyfiles> -o tmp.h

>Fix:
Index: inf.c
===================================================================
RCS file: /data/cvs/src/usr.sbin/ndiscvt/inf.c,v
retrieving revision 1.16
diff -u -r1.16 inf.c
--- inf.c       15 May 2005 19:46:14 -0000      1.16
+++ inf.c       28 Nov 2007 02:11:00 -0000
@@ -451,8 +451,8 @@
                if (reg->section == sec) {
                        if (reg->subkey == NULL) {
                                fprintf(ofp, "\n\t{ \"%s\",", reg->key);
-                               fprintf(ofp,"\n\t\"%s \",", reg->key);
-                               fprintf(ofp, "\n\t{ \"%s\" }, %d },",
+                               fprintf(ofp,"\n\t  \"%s \",", reg->key);
+                               fprintf(ofp, "\n\t  { \"%s\" }, %d },",
                                    reg->value == NULL ? "" :
                                    stringcvt(reg->value), devidx);
                        } else if (strncasecmp(reg->subkey,
@@ -537,8 +537,8 @@
                        continue;
                if (reg->key == NULL || strcasecmp(reg->key, "Default"))
                        continue;
-               fprintf(ofp, "\n\t{ \"%s\" }, %d },", reg->value == NULL ? "" :
-                   stringcvt(reg->value), devidx);
+               fprintf(ofp, "\n\t  { \"%s\" }, %d },",
+                   reg->value == NULL ? "" : stringcvt(reg->value), devidx);
                        break;
        }
        return;
@@ -555,7 +555,7 @@
                        continue;
                if (reg->key == NULL || strcasecmp(reg->key, "ParamDesc"))
                        continue;
-               fprintf(ofp, "\n\t\"%s", stringcvt(r->value));
+               fprintf(ofp, "\n\t  \"%s", stringcvt(r->value));
                        break;
        }
        return;


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->weongyo 
Responsible-Changed-By: thompsa 
Responsible-Changed-When: Fri Dec 28 01:11:23 UTC 2007 
Responsible-Changed-Why:  
Pass back to the new committer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=118297 
State-Changed-From-To: open->open 
State-Changed-By: linimon 
State-Changed-When: Wed Jul 3 00:50:32 UTC 2013 
State-Changed-Why:  
commit bit has been taken in for safekeeping. 


Responsible-Changed-From-To: weongyo->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Jul 3 00:50:32 UTC 2013 
Responsible-Changed-Why:  

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