Index: fbset.c =================================================================== --- fbset.c.orig 2006-10-09 05:29:45.000000000 +0300 +++ fbset.c 2006-10-09 05:33:33.000000000 +0300 @@ -229,7 +229,7 @@ static void ModifyVideoMode(struct Video static void DisplayVModeInfo(struct VideoMode *vmode); static void DisplayFBInfo(struct fb_fix_screeninfo *fix); static int FillScanRates(struct VideoMode *vmode); -static void Usage(void) __attribute__ ((noreturn)); +static void Usage(int status) __attribute__ ((noreturn)); int main(int argc, char *argv[]); @@ -829,10 +829,12 @@ static int FillScanRates(struct VideoMod * Print the Usage Template and Exit */ -static void Usage(void) +static void Usage(int status) { puts(VERSION); - Die("\nUsage: %s [options] [mode]\n\n" + printf( + "Usage: %s [options] [mode]\n" + "\n" "Valid options:\n" " General options:\n" " -h, --help : display this usage information\n" @@ -887,6 +889,7 @@ static void Usage(void) " -step : step increment (in pixels or pixel lines)\n" " (default is 8 horizontal, 2 vertical)\n", ProgramName); + exit(status); } @@ -910,7 +913,7 @@ int main(int argc, char *argv[]) while (--argc > 0) { argv++; if (!strcmp(argv[0], "-h") || !strcmp(argv[0], "--help")) - Usage(); + Usage(0); else if (!strcmp(argv[0], "-v") || !strcmp(argv[0], "--verbose")) Opt_verbose = 1; else if (!strcmp(argv[0], "-V") || !strcmp(argv[0], "--version")) @@ -937,7 +940,7 @@ int main(int argc, char *argv[]) argc -= 5; argv += 5; } else - Usage(); + Usage(1); } else if (!strcmp(argv[0], "-t") || !strcmp(argv[0], "--timings")) { if (argc > 7) { Opt_pixclock = argv[1]; @@ -951,7 +954,7 @@ int main(int argc, char *argv[]) argc -= 7; argv += 7; } else - Usage(); + Usage(1); } else if (!strcmp(argv[0], "-match")) { Opt_matchyres = argv[0]; Opt_change = 1; @@ -965,12 +968,12 @@ int main(int argc, char *argv[]) Opt_change |= Options[i].change; argv++; } else - Usage(); + Usage(1); } else if (!Opt_modename) { Opt_modename = argv[0]; Opt_change = 1; } else - Usage(); + Usage(1); } }