linux-btrace.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Edward Shishkin <edward@redhat.com>
To: linux-btrace@vger.kernel.org
Subject: [patch 2/5] blktrace: print correct usage
Date: Tue, 15 Dec 2009 17:47:53 +0000	[thread overview]
Message-ID: <4B27CBC9.50409@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: blktrace-fix-498898.patch --]
[-- Type: text/plain, Size: 1386 bytes --]

Fixup for 498898:

Problem:
When somebody runs blktrace without parameters, it
shows the usage message. The usage message suggests
that version number "x.y.z" is a required parameter,
which is not true.

Solution:
Don't print version number when running
blktrace, blkparce, btt without parameters.

Signed-off-by: Edward Shishkin <edward@redhat.com>
---
 blkparse.c |    2 +-
 blktrace.c |    2 +-
 btt/args.c |    3 +--
 3 files changed, 3 insertions(+), 4 deletions(-)

--- blktrace.orig/blkparse.c
+++ blktrace/blkparse.c
@@ -2696,7 +2696,7 @@ static char usage_str[] =    "\n\n" \
 
 static void usage(char *prog)
 {
-	fprintf(stderr, "Usage: %s %s %s", prog, blkparse_version, usage_str);
+	fprintf(stderr, "Usage: %s %s", prog, usage_str);
 }
 
 int main(int argc, char *argv[])
--- blktrace.orig/blktrace.c
+++ blktrace/blktrace.c
@@ -493,7 +493,7 @@ static inline void pdc_nev_update(struct
 
 static void show_usage(char *prog)
 {
-	fprintf(stderr, "Usage: %s %s %s", prog, blktrace_version, usage_str);
+	fprintf(stderr, "Usage: %s %s", prog, usage_str);
 }
 
 /*
--- blktrace.orig/btt/args.c
+++ blktrace/btt/args.c
@@ -244,8 +244,7 @@ static char usage_str[] = \
 
 static void usage(char *prog)
 {
-	fprintf(stderr, "Usage: %s %s %s", prog, bt_timeline_version,
-		usage_str);
+	fprintf(stderr, "Usage: %s %s", prog, usage_str);
 }
 
 static FILE *setup_ofile(char *fname)

                 reply	other threads:[~2009-12-15 17:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B27CBC9.50409@redhat.com \
    --to=edward@redhat.com \
    --cc=linux-btrace@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).