From: Balbir Singh <balbir@in.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, jlan@sgi.com,
Balbir Singh <balbir@in.ibm.com>,
Randy Dunlap <randy.dunlap@oracle.com>
Subject: [PATCH -mm] Taskstats fix getdelays usage information
Date: Thu, 19 Apr 2007 14:56:36 +0530 [thread overview]
Message-ID: <20070419092636.24538.20798.sendpatchset@balbir-laptop> (raw)
Add usage to getdelays.c. This patch was originally posted by Randy Dunlap
http://lkml.org/lkml/2007/3/19/168
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: <balbir@in.ibm.com>
---
Documentation/accounting/getdelays.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff -puN Documentation/accounting/getdelays.c~fix-getdelays-usage Documentation/accounting/getdelays.c
--- linux-2.6.20/Documentation/accounting/getdelays.c~fix-getdelays-usage 2007-04-19 14:41:45.000000000 +0530
+++ linux-2.6.20-balbir/Documentation/accounting/getdelays.c 2007-04-19 14:42:26.000000000 +0530
@@ -72,6 +72,16 @@ struct msgtemplate {
char cpumask[100+6*MAX_CPUS];
+static void usage(void)
+{
+ fprintf(stderr, "getdelays [-dilv] [-w logfile] [-r bufsize] "
+ "[-m cpumask] [-t tgid] [-p pid]\n");
+ fprintf(stderr, " -d: print delayacct stats\n");
+ fprintf(stderr, " -i: print IO accounting (works only with -p)\n");
+ fprintf(stderr, " -l: listen forever\n");
+ fprintf(stderr, " -v: debug on\n");
+}
+
/*
* Create a raw netlink socket and bind
*/
@@ -227,7 +237,7 @@ int main(int argc, char *argv[])
struct msgtemplate msg;
while (1) {
- c = getopt(argc, argv, "diw:r:m:t:p:v:l");
+ c = getopt(argc, argv, "diw:r:m:t:p:vl");
if (c < 0)
break;
@@ -277,7 +287,7 @@ int main(int argc, char *argv[])
loop = 1;
break;
default:
- printf("Unknown option %d\n", c);
+ usage();
exit(-1);
}
}
_
--
Warm Regards,
Balbir Singh
Linux Technology Center
IBM, ISTL
reply other threads:[~2007-04-19 9:27 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=20070419092636.24538.20798.sendpatchset@balbir-laptop \
--to=balbir@in.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=jlan@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=randy.dunlap@oracle.com \
/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
all inboxes | Powered by JetHome®