aboutsummaryrefslogtreecommitdiff
path: root/fbset.c
diff options
context:
space:
mode:
Diffstat (limited to 'fbset.c')
-rw-r--r--fbset.c26
1 files changed, 3 insertions, 23 deletions
diff --git a/fbset.c b/fbset.c
index f20c284aa..9acabbecb 100644
--- a/fbset.c
+++ b/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
337static 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
358int main(int argc, char **argv) 338int 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 }