Module Name:    src
Committed By:   christos
Date:           Mon Mar 12 01:15:00 UTC 2018

Modified Files:
        src/usr.sbin/vnconfig: vnconfig.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/usr.sbin/vnconfig/vnconfig.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/vnconfig/vnconfig.c
diff -u src/usr.sbin/vnconfig/vnconfig.c:1.45 src/usr.sbin/vnconfig/vnconfig.c:1.46
--- src/usr.sbin/vnconfig/vnconfig.c:1.45	Sun Mar 11 21:10:25 2018
+++ src/usr.sbin/vnconfig/vnconfig.c	Sun Mar 11 21:15:00 2018
@@ -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 @@ getgeom(struct vndgeom *vng, char *cp)
 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);
 }

Reply via email to