Bug 181645 - [patch] ntpq(8): ntpq -d flag does not work
Summary: [patch] ntpq(8): ntpq -d flag does not work
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 9.1-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-29 11:10 UTC by Marco Hoehle
Modified: 2017-12-31 22:27 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Hoehle 2013-08-29 11:10:00 UTC
In the manpage for ntpq the "debug" flag is explained but it does not work.

See example:

[hoehle@urz-hoehle-fbsd ~]$ man ntpq | grep "\-d"
     -d      Turn on debugging mode.

[hoehle@urz-hoehle-fbsd ~]$ ntpq -d
ntpq: illegal option -- d
ntpq - standard NTP query program - Ver. 4.2.4p8

Fix: 

Either update the manpage or add the flag ;-)
How-To-Repeat: 

test doc:
> man ntpq | grep "\-d"

test binary:
> ntpq -d
Comment 1 Rodrigo OSORIO 2013-08-29 14:14:35 UTC
> >Description:
> In the manpage for ntpq the "debug" flag is explained but it does not work.
> 
> See example:
> 
> [hoehle@urz-hoehle-fbsd ~]$ man ntpq | grep "\-d"
>      -d      Turn on debugging mode.
> 
> [hoehle@urz-hoehle-fbsd ~]$ ntpq -d
> ntpq: illegal option -- d
> ntpq - standard NTP query program - Ver. 4.2.4p8
> 
> test doc:
> > man ntpq | grep "\-d"
> 
> test binary:
> > ntpq -d
> 
> >Fix:
> 
> Either update the manpage or add the flag ;-)
> 

Apparently we forgot the -DDEBUG flag in usr.sbin/ntp/ntpq/Makefile
to enable the debug options.

Index: Makefile
===================================================================
--- Makefile    (revision 253954)
+++ Makefile    (working copy)
@@ -19,7 +19,7 @@
 
 DPADD+=                ${LIBEDIT} ${LIBTERMCAP}
 LDADD+=                -ledit -ltermcap
-CFLAGS+=       -DHAVE_LIBEDIT -DHAVE_READLINE_READLINE_H \
+CFLAGS+=       -DDEBUG -DHAVE_LIBEDIT -DHAVE_READLINE_READLINE_H \
                -I${DESTDIR}/${INCLUDEDIR}/edit
 
 CLEANFILES+= .version version.c
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:25 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped