Bug 498945 - btrace does not recognize "-n" and "-b" options
btrace does not recognize "-n" and "-b" options
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: blktrace (Show other bugs)
5.3
All Linux
medium Severity medium
: rc
: ---
Assigned To: Eric Sandeen
BaseOS QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-04 10:54 EDT by Milos Malik
Modified: 2010-02-03 08:18 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-02 05:41:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Milos Malik 2009-05-04 10:54:58 EDT
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 11:11:43 EDT
# 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 16:49:29 EDT
Patch sent upstream, thanks.

http://marc.info/?l=linux-btrace&m=124146968616948&w=2
Comment 5 Eric Sandeen 2009-05-13 18:54:08 EDT
Committed & built in blktrace-1.0.0-6.el5
Comment 11 errata-xmlrpc 2009-09-02 05:41:14 EDT
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.