Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/lpr/lprm Fix error output for negative argument to ...
details: https://anonhg.NetBSD.org/src/rev/038d29bbd04b
branches: trunk
changeset: 533546:038d29bbd04b
user: wiz <wiz%NetBSD.org@localhost>
date: Wed Jul 03 22:10:28 2002 +0000
description:
Fix error output for negative argument to '-w'.
Also update usage to include -w.
Patches from Brian Ginsbach in bin/17471.
diffstat:
usr.sbin/lpr/lprm/lprm.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (38 lines):
diff -r 79556b47d7e0 -r 038d29bbd04b usr.sbin/lpr/lprm/lprm.c
--- a/usr.sbin/lpr/lprm/lprm.c Wed Jul 03 22:07:33 2002 +0000
+++ b/usr.sbin/lpr/lprm/lprm.c Wed Jul 03 22:10:28 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lprm.c,v 1.10 1999/12/07 14:54:48 mrg Exp $ */
+/* $NetBSD: lprm.c,v 1.11 2002/07/03 22:10:28 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lprm.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lprm.c,v 1.10 1999/12/07 14:54:48 mrg Exp $");
+__RCSID("$NetBSD: lprm.c,v 1.11 2002/07/03 22:10:28 wiz Exp $");
#endif
#endif /* not lint */
@@ -127,8 +127,8 @@
wait_time = atoi(*++argv);
}
if (wait_time < 0)
- errx(1, "wait time must be postive: %s",
- optarg);
+ errx(1, "wait time must be postive: %d",
+ wait_time);
if (wait_time < 30)
warnx("warning: wait time less than 30 seconds");
break;
@@ -164,6 +164,7 @@
static void
usage()
{
- fprintf(stderr, "usage: lprm [-] [-Pprinter] [[job #] [user] ...]\n");
+ fprintf(stderr,
+ "usage: lprm [-] [-Pprinter] [-w maxwait] [[job #] [user] ...]\n");
exit(2);
}
Home |
Main Index |
Thread Index |
Old Index