Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/mount_nfs Use getprogname() instead of hardcoding "moun...
details: https://anonhg.NetBSD.org/src/rev/5dc06011db23
branches: trunk
changeset: 749482:5dc06011db23
user: pooka <pooka%NetBSD.org@localhost>
date: Mon Nov 30 17:17:55 2009 +0000
description:
Use getprogname() instead of hardcoding "mount_nfs" to get the
right info in rump_nfs.
diffstat:
sbin/mount_nfs/getnfsargs.c | 15 ++++++++++-----
sbin/mount_nfs/mount_nfs.c | 6 +++---
2 files changed, 13 insertions(+), 8 deletions(-)
diffs (63 lines):
diff -r 67a11ca677b1 -r 5dc06011db23 sbin/mount_nfs/getnfsargs.c
--- a/sbin/mount_nfs/getnfsargs.c Mon Nov 30 16:58:40 2009 +0000
+++ b/sbin/mount_nfs/getnfsargs.c Mon Nov 30 17:17:55 2009 +0000
@@ -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;
diff -r 67a11ca677b1 -r 5dc06011db23 sbin/mount_nfs/mount_nfs.c
--- a/sbin/mount_nfs/mount_nfs.c Mon Nov 30 16:58:40 2009 +0000
+++ b/sbin/mount_nfs/mount_nfs.c Mon Nov 30 17:17:55 2009 +0000
@@ -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]",
Home |
Main Index |
Thread Index |
Old Index