linux-btrace.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 2/5] blktrace: print correct usage
@ 2009-12-15 17:47 Edward Shishkin
  0 siblings, 0 replies; only message in thread
From: Edward Shishkin @ 2009-12-15 17:47 UTC (permalink / raw)
  To: linux-btrace

[-- 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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-12-15 17:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-15 17:47 [patch 2/5] blktrace: print correct usage Edward Shishkin

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).