Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Jan 2012 21:05:14 GMT
From:      Warren Block <wblock@wonkity.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/163934: [patch] usbconfig(8) sends help output to stderr instead of stdout
Message-ID:  <201201082105.q08L5EXm038909@red.freebsd.org>
Resent-Message-ID: <201201082110.q08LAERN033321@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         163934
>Category:       bin
>Synopsis:       [patch] usbconfig(8) sends help output to stderr instead of stdout
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 08 21:10:14 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Warren Block
>Release:        8-STABLE
>Organization:
>Environment:
FreeBSD lightning 8.2-STABLE FreeBSD 8.2-STABLE #0: Sun Jan  8 08:18:21 MST 2012     root@lightning:/usr/obj/usr/src/sys/LIGHTNING  i386
>Description:
usbconfig(8)'s -h option prints output to stderr.  This output is not due to an error, and is already 28 lines line.  A typical terminal will not display it all, so the user has to redirect stderr to view it with less or other utilities.
>How-To-Repeat:
usbconfig -h | less  (then try to scroll back)
>Fix:
Apply attached patch.

Patch attached with submission follows:

Index: usbconfig.c
===================================================================
--- usbconfig.c	(revision 229822)
+++ usbconfig.c	(working copy)
@@ -265,7 +265,7 @@
 static void
 usage(void)
 {
-	fprintf(stderr, ""
+	fprintf(stdout, ""
 	    "usbconfig - configure the USB subsystem" "\n"
 	    "usage: usbconfig -u <busnum> -a <devaddr> -i <ifaceindex> [cmds...]" "\n"
 	    "usage: usbconfig -d [ugen]<busnum>.<devaddr> -i <ifaceindex> [cmds...]" "\n"


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201082105.q08L5EXm038909>