- Sort usage() output;
- sync usage() with reality and manpage; - display usage() even if terminal is not a syscons. Submitted by: ru, sobomax
This commit is contained in:
parent
2b1f35a9af
commit
1f22a113d0
@ -73,10 +73,10 @@ static void
|
|||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s\n%s\n%s\n%s\n",
|
fprintf(stderr, "%s\n%s\n%s\n%s\n",
|
||||||
"usage: vidcontrol [-r fg bg] [-b color] [-c appearance] [-d] [-l scrmap]",
|
"usage: vidcontrol [-b color] [-c appearance] [-d] [-f [size] file] [-g geometry]",
|
||||||
" [-i adapter | mode] [-L] [-M char] [-m on|off]",
|
" [-i adapter | mode] [-l screen_map] [-L] [-m on | off]",
|
||||||
" [-f size file] [-s number] [-t N|off] [-x] [-g geometry]",
|
" [-M char] [-p] [-P] [-r foreground background] [-s number]",
|
||||||
" [-p] [-P] [mode] [fgcol [bgcol]] [show]");
|
" [-t N | off] [-x] [mode] [foreground [background]] [show]");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -722,6 +722,9 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
|
|
||||||
info.size = sizeof(info);
|
info.size = sizeof(info);
|
||||||
|
if (argc == 1)
|
||||||
|
usage();
|
||||||
|
/* Not reached */
|
||||||
if (ioctl(0, CONS_GETINFO, &info) < 0)
|
if (ioctl(0, CONS_GETINFO, &info) < 0)
|
||||||
err(1, "must be on a virtual console");
|
err(1, "must be on a virtual console");
|
||||||
while((opt = getopt(argc, argv, "b:c:df:g:i:l:LM:m:pPr:s:t:x")) != -1)
|
while((opt = getopt(argc, argv, "b:c:df:g:i:l:LM:m:pPr:s:t:x")) != -1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user