diff options
| author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-02-16 18:41:12 +0000 |
|---|---|---|
| committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-02-16 18:41:12 +0000 |
| commit | 8f91b78e3084aff37f7cabf0e6e13500f2b4a12e (patch) | |
| tree | 45a871308c610b20f12f45cc7fef495747038f5c /util-linux | |
| parent | 4489b78a050706ea6a8f4d729add35a5ea3c77db (diff) | |
| download | busybox-w32-8f91b78e3084aff37f7cabf0e6e13500f2b4a12e.tar.gz busybox-w32-8f91b78e3084aff37f7cabf0e6e13500f2b4a12e.tar.bz2 busybox-w32-8f91b78e3084aff37f7cabf0e6e13500f2b4a12e.zip | |
Do usage messages the same way all other apps fo them.
Skip printing of available options (can't do this easily).
Based on a patch by Larry Doolittle.
-Erik
git-svn-id: svn://busybox.net/trunk/busybox@1836 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'util-linux')
| -rw-r--r-- | util-linux/fbset.c | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/util-linux/fbset.c b/util-linux/fbset.c index f20c284aa..9acabbecb 100644 --- a/util-linux/fbset.c +++ b/util-linux/fbset.c | |||
| @@ -334,26 +334,6 @@ static void showmode(struct fb_var_screeninfo *v) | |||
| 334 | printf("endmode\n\n"); | 334 | printf("endmode\n\n"); |
| 335 | } | 335 | } |
| 336 | 336 | ||
| 337 | static void fbset_usage(void) | ||
| 338 | { | ||
| 339 | #ifndef BB_FEATURE_TRIVIAL_HELP | ||
| 340 | int i; | ||
| 341 | #endif | ||
| 342 | |||
| 343 | #ifndef STANDALONE | ||
| 344 | fprintf(stderr, "BusyBox v%s (%s) multi-call binary -- GPL2\n\n", | ||
| 345 | BB_VER, BB_BT); | ||
| 346 | #endif | ||
| 347 | fprintf(stderr, "Usage: fbset [options] [mode]\n"); | ||
| 348 | #ifndef BB_FEATURE_TRIVIAL_HELP | ||
| 349 | fprintf(stderr, "\nShows and modifies frame buffer device settings\n\n"); | ||
| 350 | fprintf(stderr, "The following options are recognized:\n"); | ||
| 351 | for (i = 0; g_cmdoptions[i].name; i++) | ||
| 352 | fprintf(stderr, "\t%s\n", g_cmdoptions[i].name); | ||
| 353 | #endif | ||
| 354 | exit(-1); | ||
| 355 | } | ||
| 356 | |||
| 357 | #ifdef STANDALONE | 337 | #ifdef STANDALONE |
| 358 | int main(int argc, char **argv) | 338 | int main(int argc, char **argv) |
| 359 | #else | 339 | #else |
| @@ -375,10 +355,10 @@ extern int fbset_main(int argc, char **argv) | |||
| 375 | for (i = 0; g_cmdoptions[i].name; i++) { | 355 | for (i = 0; g_cmdoptions[i].name; i++) { |
| 376 | if (!strcmp(thisarg, g_cmdoptions[i].name)) { | 356 | if (!strcmp(thisarg, g_cmdoptions[i].name)) { |
| 377 | if (argc - 1 < g_cmdoptions[i].param_count) | 357 | if (argc - 1 < g_cmdoptions[i].param_count) |
| 378 | fbset_usage(); | 358 | show_usage(); |
| 379 | switch (g_cmdoptions[i].code) { | 359 | switch (g_cmdoptions[i].code) { |
| 380 | case CMD_HELP: | 360 | case CMD_HELP: |
| 381 | fbset_usage(); | 361 | show_usage(); |
| 382 | case CMD_FB: | 362 | case CMD_FB: |
| 383 | fbdev = argv[1]; | 363 | fbdev = argv[1]; |
| 384 | break; | 364 | break; |
| @@ -423,7 +403,7 @@ extern int fbset_main(int argc, char **argv) | |||
| 423 | mode = *argv; | 403 | mode = *argv; |
| 424 | g_options |= OPT_READMODE; | 404 | g_options |= OPT_READMODE; |
| 425 | } else { | 405 | } else { |
| 426 | fbset_usage(); | 406 | show_usage(); |
| 427 | } | 407 | } |
| 428 | } | 408 | } |
| 429 | } | 409 | } |
