Module Name: src
Committed By: pooka
Date: Mon Nov 30 17:17:55 UTC 2009
Modified Files:
src/sbin/mount_nfs: getnfsargs.c mount_nfs.c
Log Message:
Use getprogname() instead of hardcoding "mount_nfs" to get the
right info in rump_nfs.
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sbin/mount_nfs/getnfsargs.c
cvs rdiff -u -r1.67 -r1.68 src/sbin/mount_nfs/mount_nfs.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/mount_nfs/getnfsargs.c
diff -u src/sbin/mount_nfs/getnfsargs.c:1.12 src/sbin/mount_nfs/getnfsargs.c:1.13
--- src/sbin/mount_nfs/getnfsargs.c:1.12 Wed Oct 15 19:06:45 2008
+++ src/sbin/mount_nfs/getnfsargs.c Mon Nov 30 17:17:55 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: getnfsargs.c,v 1.12 2008/10/15 19:06:45 pooka Exp $ */
+/* $NetBSD: getnfsargs.c,v 1.13 2009/11/30 17:17:55 pooka Exp $ */
/*
* Copyright (c) 1992, 1993, 1994
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)mount_nfs.c 8.11 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: getnfsargs.c,v 1.12 2008/10/15 19:06:45 pooka Exp $");
+__RCSID("$NetBSD: getnfsargs.c,v 1.13 2009/11/30 17:17:55 pooka Exp $");
#endif
#endif /* not lint */
@@ -214,9 +214,14 @@
nfhret.stat = EPROTONOSUPPORT;
break;
}
- if ((opflags & ISBGRND) == 0)
- clnt_pcreateerror(
- "mount_nfs: rpcbind to nfs on server");
+ if ((opflags & ISBGRND) == 0) {
+ char buf[64];
+
+ snprintf(buf, sizeof(buf),
+ "%s: rpcbind to nfs on server",
+ getprogname());
+ clnt_pcreateerror(buf);
+ }
} else {
pertry.tv_sec = 30;
pertry.tv_usec = 0;
Index: src/sbin/mount_nfs/mount_nfs.c
diff -u src/sbin/mount_nfs/mount_nfs.c:1.67 src/sbin/mount_nfs/mount_nfs.c:1.68
--- src/sbin/mount_nfs/mount_nfs.c:1.67 Fri Apr 3 07:26:07 2009
+++ src/sbin/mount_nfs/mount_nfs.c Mon Nov 30 17:17:55 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: mount_nfs.c,v 1.67 2009/04/03 07:26:07 pooka Exp $ */
+/* $NetBSD: mount_nfs.c,v 1.68 2009/11/30 17:17:55 pooka Exp $ */
/*
* Copyright (c) 1992, 1993, 1994
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)mount_nfs.c 8.11 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: mount_nfs.c,v 1.67 2009/04/03 07:26:07 pooka Exp $");
+__RCSID("$NetBSD: mount_nfs.c,v 1.68 2009/11/30 17:17:55 pooka Exp $");
#endif
#endif /* not lint */
@@ -527,7 +527,7 @@
static void
usage(void)
{
- (void)fprintf(stderr, "usage: mount_nfs %s\n%s\n%s\n%s\n%s\n",
+ (void)fprintf(stderr, "usage: %s %s\n%s\n%s\n%s\n%s\n", getprogname(),
"[-23bCcdilPpqsTUX] [-a maxreadahead] [-D deadthresh]",
"\t[-g maxgroups] [-I readdirsize] [-L leaseterm]",
"\t[-o options] [-R retrycnt] [-r readsize] [-t timeout]",