Bug 498945 - btrace does not recognize "-n" and "-b" options
Summary: btrace does not recognize "-n" and "-b" options
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: blktrace
Version: 5.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Eric Sandeen
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-05-04 14:54 UTC by Milos Malik
Modified: 2010-02-03 13:18 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-02 09:41:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2009:1284 0 normal SHIPPED_LIVE New package: blktrace 2009-09-01 09:51:07 UTC

Description Milos Malik 2009-05-04 14:54:58 UTC
Description of problem:
btrace script contains an getopt call:

while getopts "a:r:stSw:hv" c

If the man page is correct about supported command line options, the getopt call should like this way:

while getopts "a:b:n:r:stSw:hv" c

Version-Release number of selected component (if applicable):
blktrace-1.0.0-3

How reproducible:
always

Steps to Reproduce:
# man btrace | col -b | grep -- "-b "
       Usage: btrace [-s] [-t] [-w N] [-n N] [-b N] [-a <trace>...] <dev>...
       -b  N  Specifies buffer size for event extraction (scaled by 1024) (see
# man btrace | col -b | grep -- "-n "
       Usage: btrace [-s] [-t] [-w N] [-n N] [-b N] [-a <trace>...] <dev>...
       -n N Specifies the number of buffers to use (see blktrace (8)).
# /usr/bin/btrace -n
/usr/bin/btrace: illegal option -- n
Usage: btrace [-s] [-t] [-S] [-w N] [-a <trace>...] [-r <dbg mnt]<dev>...
# /usr/bin/btrace -b
/usr/bin/btrace: illegal option -- b
Usage: btrace [-s] [-t] [-S] [-w N] [-a <trace>...] [-r <dbg mnt]<dev>...

  
Actual results:
not all supported options are mentioned in the getopt call

Expected results:
all supported options are mentioned in the getopt call

Comment 1 Milos Malik 2009-05-04 15:11:43 UTC
# btrace
Usage: btrace [-s] [-t] [-S] [-w N] [-a <trace>...] [-r <dbg mnt] <dev>...

I'm wondering what's the meaning of "-S" option. The script does not react when
it's present on the command line and the man page does not talk about it.

Comment 2 Eric Sandeen 2009-05-04 20:49:29 UTC
Patch sent upstream, thanks.

http://marc.info/?l=linux-btrace&m=124146968616948&w=2

Comment 5 Eric Sandeen 2009-05-13 22:54:08 UTC
Committed & built in blktrace-1.0.0-6.el5

Comment 11 errata-xmlrpc 2009-09-02 09:41:14 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1284.html


Note You need to log in before you can comment on or make changes to this bug.