diff options
-rw-r--r-- | usr.sbin/lpr/lpc/cmds.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/usr.sbin/lpr/lpc/cmds.c b/usr.sbin/lpr/lpc/cmds.c index 71aaa1a..e9cd994 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 */ |