aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorRick Macklem <rmacklem@FreeBSD.org>2019-12-31 22:19:33 +0000
committerRick Macklem <rmacklem@FreeBSD.org>2019-12-31 22:19:33 +0000
commit28a04da3d70b0b84a7ed80f91cf092d5c8117295 (patch)
tree39e84e8eae30693829e628fc52ae8f911d2d9fba /usr.bin
parentcc5033301104d9dd0fad02be54b4a2c31f9857a0 (diff)
downloadsrc-28a04da3d70b0b84a7ed80f91cf092d5c8117295.tar.gz
src-28a04da3d70b0b84a7ed80f91cf092d5c8117295.zip
Get rid of old nfsstat options no longer used.
The "-M" and "-N" options for nfsstat were used by the old NFS code and have never done anything for the new NFS code. This patch replaces code that assigns values to variables that are never used with printf()s noting the options are ignored. This has the side effect that it gets rid of warnings w.r.t. these variables being assigned but never used, that occur for some builds. Noticed during integration of the NFSv4.2 code.
Notes
Notes: svn path=/head/; revision=356242
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/nfsstat/nfsstat.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/usr.bin/nfsstat/nfsstat.c b/usr.bin/nfsstat/nfsstat.c
index eee812fd201a..6c671ccc1b80 100644
--- a/usr.bin/nfsstat/nfsstat.c
+++ b/usr.bin/nfsstat/nfsstat.c
@@ -149,14 +149,12 @@ main(int argc, char **argv)
int serverOnly = -1;
int newStats = 0;
int ch;
- char *memf, *nlistf;
int mntlen, i;
char buf[1024];
struct statfs *mntbuf;
struct nfscl_dumpmntopts dumpmntopts;
interval = 0;
- memf = nlistf = NULL;
argc = xo_parse_args(argc, argv);
if (argc < 0)
@@ -167,7 +165,7 @@ main(int argc, char **argv)
while ((ch = getopt(argc, argv, "cdEesWM:mN:w:zq")) != -1)
switch(ch) {
case 'M':
- memf = optarg;
+ printf("*** -M option deprecated, ignored\n\n");
break;
case 'm':
/* Display mount options for NFS mount points. */
@@ -191,7 +189,7 @@ main(int argc, char **argv)
}
exit(0);
case 'N':
- nlistf = optarg;
+ printf("*** -N option deprecated, ignored\n\n");
break;
case 'W':
widemode = 1;
@@ -239,14 +237,8 @@ main(int argc, char **argv)
#define BACKWARD_COMPATIBILITY
#ifdef BACKWARD_COMPATIBILITY
- if (*argv) {
+ if (*argv)
interval = atoi(*argv);
- if (*++argv) {
- nlistf = *argv;
- if (*++argv)
- memf = *argv;
- }
- }
#endif
if (modfind("nfscommon") < 0)
xo_err(1, "NFS client/server not loaded");
@@ -529,7 +521,7 @@ static void
usage(void)
{
(void)fprintf(stderr,
- "usage: nfsstat [-cdemszW] [-M core] [-N system] [-w wait]\n");
+ "usage: nfsstat [-cdemszW] [-w wait]\n");
exit(1);
}