Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/vacation Use setprogname(); sort options in usage.



details:   https://anonhg.NetBSD.org/src/rev/c9e790bbf0e9
branches:  trunk
changeset: 565311:c9e790bbf0e9
user:      wiz <wiz%NetBSD.org@localhost>
date:      Sun Apr 04 10:29:20 2004 +0000

description:
Use setprogname(); sort options in usage.

diffstat:

 usr.bin/vacation/vacation.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r de1a30b9d058 -r c9e790bbf0e9 usr.bin/vacation/vacation.c
--- a/usr.bin/vacation/vacation.c       Sun Apr 04 10:09:41 2004 +0000
+++ b/usr.bin/vacation/vacation.c       Sun Apr 04 10:29:20 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vacation.c,v 1.27 2004/04/04 01:19:35 christos Exp $   */
+/*     $NetBSD: vacation.c,v 1.28 2004/04/04 10:29:20 wiz Exp $        */
 
 /*
  * Copyright (c) 1983, 1987, 1993
@@ -40,7 +40,7 @@
 #if 0
 static char sccsid[] = "@(#)vacation.c 8.2 (Berkeley) 1/26/94";
 #endif
-__RCSID("$NetBSD: vacation.c,v 1.27 2004/04/04 01:19:35 christos Exp $");
+__RCSID("$NetBSD: vacation.c,v 1.28 2004/04/04 10:29:20 wiz Exp $");
 #endif /* not lint */
 
 /*
@@ -117,6 +117,7 @@
        int ch, iflag, rv;
        char *p;
 
+       setprogname(argv[0]);
        opterr = iflag = 0;
        interval = -1;
        openlog(getprogname(), 0, LOG_USER);
@@ -546,7 +547,7 @@
 usage(void)
 {
 
-       syslog(LOG_ERR, "uid %u: Usage: %s [-id] [-a alias] [-t A|D] [-f F|R|S]"
+       syslog(LOG_ERR, "uid %u: Usage: %s [-di] [-a alias] [-f F|R|S] [-t A|D]"
            " login", getuid(), getprogname());
        exit(1);
 }



Home | Main Index | Thread Index | Old Index