Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/vnconfig improve previous, use getprogname() to get...



details:   https://anonhg.NetBSD.org/src/rev/7b968c9f4053
branches:  trunk
changeset: 831105:7b968c9f4053
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Mar 12 01:15:00 2018 +0000

description:
improve previous, use getprogname() to get the invocation name.

diffstat:

 usr.sbin/vnconfig/vnconfig.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (27 lines):

diff -r 2d208d3acb0c -r 7b968c9f4053 usr.sbin/vnconfig/vnconfig.c
--- a/usr.sbin/vnconfig/vnconfig.c      Mon Mar 12 01:10:25 2018 +0000
+++ b/usr.sbin/vnconfig/vnconfig.c      Mon Mar 12 01:15:00 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vnconfig.c,v 1.45 2018/03/12 01:10:25 khorben Exp $    */
+/*     $NetBSD: vnconfig.c,v 1.46 2018/03/12 01:15:00 christos Exp $   */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -423,11 +423,11 @@
 static void
 usage(void)
 {
-
-       (void)fprintf(stderr, "%s%s",
-           "usage: vndconfig [-crvz] [-f dsktab] [-t type] vnode_disk"
-               " reg-file [geomspec]\n",
-           "       vndconfig -u [-Fv] vnode_disk\n"
-           "       vndconfig -l [-m num | vnode_disk...]\n");
+       const char *p = getprogname();
+       (void)fprintf(stderr, 
+           "Usage: %s [-crvz] [-f dsktab] [-t type] vnode_disk"
+               " reg-file [geomspec]\n"
+           "       %s -u [-Fv] vnode_disk\n"
+           "       %s -l [-m num | vnode_disk...]\n", p, p, p);
        exit(1);
 }



Home | Main Index | Thread Index | Old Index