diff options
author | 2002-05-11 21:51:07 +0000 | |
---|---|---|
committer | 2002-05-11 21:51:07 +0000 | |
commit | 350dcc683d5653729cbe622fe219639a10020ec5 (patch) | |
tree | d8137b8f5fecb9e2676bb744141bd751c7d28940 | |
parent | Use O_EXCL (not O_TRUNC) when creating new job file. If there is a (diff) | |
download | wireguard-openbsd-350dcc683d5653729cbe622fe219639a10020ec5.tar.xz wireguard-openbsd-350dcc683d5653729cbe622fe219639a10020ec5.zip |
Deal with unknown command line options more sanely.
-rw-r--r-- | libexec/atrun/atrun.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/libexec/atrun/atrun.c b/libexec/atrun/atrun.c index 576ef6843f3..4c3d80c0652 100644 --- a/libexec/atrun/atrun.c +++ b/libexec/atrun/atrun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atrun.c,v 1.17 2002/05/11 17:45:26 millert Exp $ */ +/* $OpenBSD: atrun.c,v 1.18 2002/05/11 21:51:07 millert Exp $ */ /* * atrun.c - run jobs queued by at; run with root privileges. @@ -71,7 +71,7 @@ /* File scope variables */ static char *namep; -static char rcsid[] = "$OpenBSD: atrun.c,v 1.17 2002/05/11 17:45:26 millert Exp $"; +static char rcsid[] = "$OpenBSD: atrun.c,v 1.18 2002/05/11 21:51:07 millert Exp $"; static int debug = 0; /* Local functions */ @@ -430,13 +430,9 @@ main(argc, argv) debug++; break; - case '?': - perr("unknown option"); - break; - default: - perr("idiotic option - aborted"); - break; + syslog(LOG_ERR, "unknown option"); + exit(EXIT_FAILURE); } } |