summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarance A Drosehn <gad@FreeBSD.org>2012-04-30 00:54:10 +0000
committerGarance A Drosehn <gad@FreeBSD.org>2012-04-30 00:54:10 +0000
commitaa318fd726e86e006c2099b0033d6d3e3d02efdf (patch)
tree1913092efc3e591f68f043034ea8973cb9921e58
parentc11c655c32aa3431d63543990c6e677b264c89a3 (diff)
Notes
-rw-r--r--usr.sbin/lpr/lpc/cmds.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/usr.sbin/lpr/lpc/cmds.c b/usr.sbin/lpr/lpc/cmds.c
index 71aaa1a00148..e9cd99483a9a 100644
--- a/usr.sbin/lpr/lpc/cmds.c
+++ b/usr.sbin/lpr/lpc/cmds.c
@@ -163,6 +163,14 @@ generic(void (*specificrtn)(struct printer *_pp), int cmdopts,
break;
}
}
+ if (argc < 1) {
+ printf("error: No printer name(s) specified before"
+ " '-msg'.\n");
+ printf("usage: %s {all | printer ...}",
+ generic_cmdname);
+ printf(" [-msg <text> ...]\n");
+ return;
+ }
}
/* call initialization routine, if there is one for this cmd */