diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-09-16 09:53:22 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-09-16 09:53:22 +0000 |
commit | d8b7b6132a2ddccbacaf791df00f44daab0805cd (patch) | |
tree | 82ae80600c87fe24e7df564b6b4a089aebff981b /sbin/kbd | |
parent | b617766a988edc25fd3664748194dd296a8e8be9 (diff) |
prettier simple code; mcbride ok
Diffstat (limited to 'sbin/kbd')
-rw-r--r-- | sbin/kbd/main.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/sbin/kbd/main.c b/sbin/kbd/main.c index 08a2b04fc5b..8ff9d044ea1 100644 --- a/sbin/kbd/main.c +++ b/sbin/kbd/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.6 2003/07/10 00:00:57 david Exp $ */ +/* $OpenBSD: main.c,v 1.7 2004/09/16 09:53:21 deraadt Exp $ */ /* * Copyright (c) 1996 Juergen Hannken-Illjes @@ -45,7 +45,7 @@ static void usage(void) { fprintf(stderr, "usage: %s -l or %s [-q] name\n", - __progname, __progname); + __progname, __progname); exit(1); } @@ -53,33 +53,25 @@ int main(int argc, char *argv[]) { char *optstring = "lq"; - int ch, list_tables, verbose; - - list_tables = 0; - verbose = 1; + int ch, list_tables = 0, verbose = 1; while ((ch = getopt(argc, argv, optstring)) != -1) switch (ch) { case 'l': list_tables = 1; break; - case 'q': verbose = 0; break; - - case '?': default: usage(); } if (argc != optind + list_tables ? 0 : 1) usage(); - if (list_tables) { + if (list_tables) kbd_list(); - } else { + else kbd_set(argv[optind], verbose); - } - exit(0); } |