summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>1997-03-03 00:30:02 +0000
committermillert <millert@openbsd.org>1997-03-03 00:30:02 +0000
commitce9b83ebf9daf122be8a2ef37dcf258548dc410e (patch)
tree2e9215ad2d0a0a2bb03f3ec97867a8fcb3f30e88
parentSync with NetBSD which is syncing with FreeBSD, whee! (diff)
downloadwireguard-openbsd-ce9b83ebf9daf122be8a2ef37dcf258548dc410e.tar.xz
wireguard-openbsd-ce9b83ebf9daf122be8a2ef37dcf258548dc410e.zip
Complain if invoked in a form that requires an argument and we didn't
get one.
-rw-r--r--usr.bin/at/at.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/at/at.c b/usr.bin/at/at.c
index 8554027954b..d6003864d66 100644
--- a/usr.bin/at/at.c
+++ b/usr.bin/at/at.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: at.c,v 1.8 1997/03/02 19:59:15 millert Exp $ */
+/* $OpenBSD: at.c,v 1.9 1997/03/03 00:30:02 millert Exp $ */
/* $NetBSD: at.c,v 1.4 1995/03/25 18:13:31 glass Exp $ */
/*
@@ -73,7 +73,7 @@ enum { ATQ, ATRM, AT, BATCH, CAT }; /* what program we want to run */
/* File scope variables */
#ifndef lint
-static char rcsid[] = "$OpenBSD: at.c,v 1.8 1997/03/02 19:59:15 millert Exp $";
+static char rcsid[] = "$OpenBSD: at.c,v 1.9 1997/03/03 00:30:02 millert Exp $";
#endif
char *no_export[] =
@@ -483,6 +483,9 @@ process_jobs(argc, argv, what)
char queue;
int jobno;
+ if (optind == argc && (what == ATRM || what == CAT))
+ usage();
+
PRIV_START
if (chdir(_PATH_ATJOBS) != 0)