diff options
author | Maxim Sobolev <sobomax@FreeBSD.org> | 2001-05-20 12:17:31 +0000 |
---|---|---|
committer | Maxim Sobolev <sobomax@FreeBSD.org> | 2001-05-20 12:17:31 +0000 |
commit | 1f22a113d087594eac86b8e17cb0f60c7033a3bb (patch) | |
tree | 4b50c534e7753cf6a53fc18517da371c2e527646 /usr.sbin/vidcontrol | |
parent | 2b1f35a9afacf9c3c324b99bdbb836be153fc41f (diff) | |
download | src-1f22a113d087594eac86b8e17cb0f60c7033a3bb.tar.gz src-1f22a113d087594eac86b8e17cb0f60c7033a3bb.zip |
- Sort usage() output;
- sync usage() with reality and manpage;
- display usage() even if terminal is not a syscons.
Submitted by: ru, sobomax
Notes
Notes:
svn path=/head/; revision=76897
Diffstat (limited to 'usr.sbin/vidcontrol')
-rw-r--r-- | usr.sbin/vidcontrol/vidcontrol.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.sbin/vidcontrol/vidcontrol.c b/usr.sbin/vidcontrol/vidcontrol.c index 2fbf7d0c4956..97e36b479897 100644 --- a/usr.sbin/vidcontrol/vidcontrol.c +++ b/usr.sbin/vidcontrol/vidcontrol.c @@ -73,10 +73,10 @@ static void usage() { fprintf(stderr, "%s\n%s\n%s\n%s\n", -"usage: vidcontrol [-r fg bg] [-b color] [-c appearance] [-d] [-l scrmap]", -" [-i adapter | mode] [-L] [-M char] [-m on|off]", -" [-f size file] [-s number] [-t N|off] [-x] [-g geometry]", -" [-p] [-P] [mode] [fgcol [bgcol]] [show]"); +"usage: vidcontrol [-b color] [-c appearance] [-d] [-f [size] file] [-g geometry]", +" [-i adapter | mode] [-l screen_map] [-L] [-m on | off]", +" [-M char] [-p] [-P] [-r foreground background] [-s number]", +" [-t N | off] [-x] [mode] [foreground [background]] [show]"); exit(1); } @@ -722,6 +722,9 @@ main(int argc, char **argv) info.size = sizeof(info); + if (argc == 1) + usage(); + /* Not reached */ if (ioctl(0, CONS_GETINFO, &info) < 0) 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) |