From nobody@FreeBSD.org  Wed Aug 26 14:12:57 2009
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 9A538106568B
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 26 Aug 2009 14:12:57 +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 70AC98FC22
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 26 Aug 2009 14:12:57 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n7QECv5M035371
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 26 Aug 2009 14:12:57 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n7QECvEJ035370;
	Wed, 26 Aug 2009 14:12:57 GMT
	(envelope-from nobody)
Message-Id: <200908261412.n7QECvEJ035370@www.freebsd.org>
Date: Wed, 26 Aug 2009 14:12:57 GMT
From: Oliver Pinter <oliver.pntr@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: not enabled function, and false manual
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         138206
>Category:       docs
>Synopsis:       [patch] ntp(1): not enabled function, and false manual
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bcr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 26 14:20:02 UTC 2009
>Closed-Date:    Sun May 23 11:38:09 UTC 2010
>Last-Modified:  Sun May 23 11:38:09 UTC 2010
>Originator:     Oliver Pinter
>Release:        7.2-STABLE
>Organization:
>Environment:
FreeBSD oliverp.teteny.bme.hu 7.2-STABLE FreeBSD 7.2-STABLE #8: Thu Aug 20 20:22:09 CEST 2009     root@oliverp.teteny.bme.hu:/usr/obj/usr/src/sys/stable  amd64
>Description:
    man:
    
         -d      Specify debugging mode.  This option may occur more than once,
                 with each occurrence indicating greater detail of display.
    
    shell:
    
    /etc# ntpd -d -c /etc/ntp.conf
    ntpd: illegal option -- d
    ntpd - NTP daemon program - Ver. 4.2.4p5
    USAGE:  ntpd [ -<flag> [<val>] | --<name>[{=| }<val>] ]...

------------

after the attached patch:

 # ntpd -dddddddd
 ntpd 4.2.4p5-a Tue Aug 25 16:18:59 CEST 2009 (1)
 adding new filegen
 adding new filegen
 adding new filegen
 adding new filegen
 adding new filegen
 adding new filegen
 addto_syslog: set_process_priority: Leave priority alone: priority_done is <2>
 addto_syslog: precision = 0.698 usec
 create_sockets(123)
 addto_syslog: ntp_io: estimated max descriptors: 11095, initial socket boundary:
  20
 addto_syslog: bind() fd 20, family 2, port 123, addr 0.0.0.0, in_classd=0 flags=
 0x89 fails: Address already in use
 addto_syslog: unable to bind to wildcard socket address 0.0.0.0 - another proces
 s may be running - EXITIN

---

this output is OK
>How-To-Repeat:
ntp[qd] -d foo
>Fix:


Patch attached with submission follows:

commit 18001be3bcb3f48f77d87502373f4dbc4683c1dd
Author: opv <opv@oliverp.teteny.bme.hu>
Date:   Tue Aug 25 16:15:58 2009 +0200

    fix ntpq -d options
    
    add -DDEBUG as the header say...

	#ifdef DEBUG
	#define VALUE_OPT_DEBUG_LEVEL    'd'
	#endif /* DEBUG */
	#ifdef DEBUG
	#define VALUE_OPT_SET_DEBUG_LEVEL 'D'
	#endif /* DEBUG */

    after this patch, the ntpq running as the man say
    
    Signed-off-by : Oliver Pinter <oliverp@teteny.bme.hu>

diff --git a/usr.sbin/ntp/Makefile.inc b/usr.sbin/ntp/Makefile.inc
index f81905a..71e2a57 100644
--- a/usr.sbin/ntp/Makefile.inc
+++ b/usr.sbin/ntp/Makefile.inc
@@ -2,7 +2,7 @@
 
 .include <bsd.own.mk>
 
-DEFS_LOCAL= -DPARSE -DHAVE_CONFIG_H
+DEFS_LOCAL= -DPARSE -DHAVE_CONFIG_H -DDEBUG
 NTPDEFS=   -DSYS_FREEBSD
 # CLOCKDEFS=
 #	-DLOCAL_CLOCK -DPST -DWWVB -DAS2201 -DGOES -DGPSTM -DOMEGA \


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-doc 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Aug 26 14:26:15 UTC 2009 
Responsible-Changed-Why:  
Fix synopsis. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=138206 
State-Changed-From-To: open->patched 
State-Changed-By: bcr 
State-Changed-When: Tue May 18 18:15:34 UTC 2010 
State-Changed-Why:  
Fixed in r208273, MFC pending. 


Responsible-Changed-From-To: freebsd-doc->bcr 
Responsible-Changed-By: bcr 
Responsible-Changed-When: Tue May 18 18:15:34 UTC 2010 
Responsible-Changed-Why:  
Fixed in r208273, MFC pending. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/138206: commit references a PR
Date: Tue, 18 May 2010 18:14:25 +0000 (UTC)

 Author: bcr (doc committer)
 Date: Tue May 18 18:14:12 2010
 New Revision: 208273
 URL: http://svn.freebsd.org/changeset/base/208273
 
 Log:
   Add a sentence to the man page explaining that the -d option
   can only be used when ntpd is compiled with DEBUG support.
   
   PR:             docs/138206
   Submitted by:   Oliver Pinter (oliver dot pntr at gmail dot com)
   MFC after:      5 days
   Approved by:    roberto
 
 Modified:
   head/usr.sbin/ntp/doc/ntpd.8
 
 Modified: head/usr.sbin/ntp/doc/ntpd.8
 ==============================================================================
 --- head/usr.sbin/ntp/doc/ntpd.8	Tue May 18 17:43:53 2010	(r208272)
 +++ head/usr.sbin/ntp/doc/ntpd.8	Tue May 18 18:14:12 2010	(r208273)
 @@ -1,7 +1,7 @@
  .\"
  .\" $FreeBSD$
  .\"
 -.Dd May 17, 2006
 +.Dd May 18, 2010
  .Dt NTPD 8
  .Os
  .Sh NAME
 @@ -108,6 +108,9 @@ Specify the name and path of the configu
  Specify debugging mode.
  This option may occur more than once,
  with each occurrence indicating greater detail of display.
 +You need to compile
 +.Nm
 +with DEBUG in order to use this.
  .It Fl D Ar level
  Specify debugging level directly.
  .It Fl f Ar driftfile
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/138206: commit references a PR
Date: Sun, 23 May 2010 11:27:03 +0000 (UTC)

 Author: bcr (doc committer)
 Date: Sun May 23 11:26:43 2010
 New Revision: 208446
 URL: http://svn.freebsd.org/changeset/base/208446
 
 Log:
   MFC r208273:
   Add a sentence to the man page explaining that the -d option
   can only be used when ntpd is compiled with DEBUG support.
   
   PR:             docs/138206
   Submitted by:   Oliver Pinter (oliver dot pntr at gmail dot com)
   Approved by:    roberto
 
 Modified:
   stable/8/usr.sbin/ntp/doc/ntpd.8
 
 Modified: stable/8/usr.sbin/ntp/doc/ntpd.8
 ==============================================================================
 --- stable/8/usr.sbin/ntp/doc/ntpd.8	Sun May 23 11:20:26 2010	(r208445)
 +++ stable/8/usr.sbin/ntp/doc/ntpd.8	Sun May 23 11:26:43 2010	(r208446)
 @@ -1,7 +1,7 @@
  .\"
  .\" $FreeBSD$
  .\"
 -.Dd May 17, 2006
 +.Dd May 18, 2010
  .Dt NTPD 8
  .Os
  .Sh NAME
 @@ -108,6 +108,9 @@ Specify the name and path of the configu
  Specify debugging mode.
  This option may occur more than once,
  with each occurrence indicating greater detail of display.
 +You need to compile
 +.Nm
 +with DEBUG in order to use this.
  .It Fl D Ar level
  Specify debugging level directly.
  .It Fl f Ar driftfile
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/138206: commit references a PR
Date: Sun, 23 May 2010 11:28:24 +0000 (UTC)

 Author: bcr (doc committer)
 Date: Sun May 23 11:28:04 2010
 New Revision: 208447
 URL: http://svn.freebsd.org/changeset/base/208447
 
 Log:
   MFC r208273:
   Add a sentence to the man page explaining that the -d option
   can only be used when ntpd is compiled with DEBUG support.
   
   PR:             docs/138206
   Submitted by:   Oliver Pinter (oliver dot pntr at gmail dot com)
   Approved by:    roberto
 
 Modified:
   stable/7/usr.sbin/ntp/doc/ntpd.8
 
 Modified: stable/7/usr.sbin/ntp/doc/ntpd.8
 ==============================================================================
 --- stable/7/usr.sbin/ntp/doc/ntpd.8	Sun May 23 11:26:43 2010	(r208446)
 +++ stable/7/usr.sbin/ntp/doc/ntpd.8	Sun May 23 11:28:04 2010	(r208447)
 @@ -1,7 +1,7 @@
  .\"
  .\" $FreeBSD$
  .\"
 -.Dd May 17, 2006
 +.Dd May 18, 2010
  .Dt NTPD 8
  .Os
  .Sh NAME
 @@ -108,6 +108,9 @@ Specify the name and path of the configu
  Specify debugging mode.
  This option may occur more than once,
  with each occurrence indicating greater detail of display.
 +You need to compile
 +.Nm
 +with DEBUG in order to use this.
  .It Fl D Ar level
  Specify debugging level directly.
  .It Fl f Ar driftfile
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: bcr 
State-Changed-When: Sun May 23 11:35:57 UTC 2010 
State-Changed-Why:  
MFC done, PR closed. Thanks for sending it. 

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