diff options
Diffstat (limited to 'Documentation/accounting')
-rw-r--r-- | 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 e9126e794ed7..6207e2f59e3b 100644 --- a/Documentation/accounting/getdelays.c +++ b/Documentation/accounting/getdelays.c | |||
@@ -72,6 +72,16 @@ struct msgtemplate { | |||
72 | 72 | ||
73 | char cpumask[100+6*MAX_CPUS]; | 73 | char cpumask[100+6*MAX_CPUS]; |
74 | 74 | ||
75 | static void usage(void) | ||
76 | { | ||
77 | fprintf(stderr, "getdelays [-dilv] [-w logfile] [-r bufsize] " | ||
78 | "[-m cpumask] [-t tgid] [-p pid]\n"); | ||
79 | fprintf(stderr, " -d: print delayacct stats\n"); | ||
80 | fprintf(stderr, " -i: print IO accounting (works only with -p)\n"); | ||
81 | fprintf(stderr, " -l: listen forever\n"); | ||
82 | fprintf(stderr, " -v: debug on\n"); | ||
83 | } | ||
84 | |||
75 | /* | 85 | /* |
76 | * Create a raw netlink socket and bind | 86 | * Create a raw netlink socket and bind |
77 | */ | 87 | */ |
@@ -227,7 +237,7 @@ int main(int argc, char *argv[]) | |||
227 | struct msgtemplate msg; | 237 | struct msgtemplate msg; |
228 | 238 | ||
229 | while (1) { | 239 | while (1) { |
230 | c = getopt(argc, argv, "diw:r:m:t:p:v:l"); | 240 | c = getopt(argc, argv, "diw:r:m:t:p:vl"); |
231 | if (c < 0) | 241 | if (c < 0) |
232 | break; | 242 | break; |
233 | 243 | ||
@@ -277,7 +287,7 @@ int main(int argc, char *argv[]) | |||
277 | loop = 1; | 287 | loop = 1; |
278 | break; | 288 | break; |
279 | default: | 289 | default: |
280 | printf("Unknown option %d\n", c); | 290 | usage(); |
281 | exit(-1); | 291 | exit(-1); |
282 | } | 292 | } |
283 | } | 293 | } |