Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f16825bbeb9e6e0970531aa2f21b18b2e8ae9e47 Commit: f16825bbeb9e6e0970531aa2f21b18b2e8ae9e47 Parent: 9e860d000a90cfc9ca270ddb6e99b177e6aa91cd Author: Randy Dunlap <[EMAIL PROTECTED]> AuthorDate: Tue May 8 00:30:13 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Tue May 8 11:15:11 2007 -0700
Taskstats: fix getdelays usage information 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 <[EMAIL PROTECTED]> Signed-off-by: Balbir Singh <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- Documentation/accounting/getdelays.c | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c index e9126e7..6207e2f 100644 --- a/Documentation/accounting/getdelays.c +++ b/Documentation/accounting/getdelays.c @@ -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); } } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html