Module Name: src
Committed By: christos
Date: Sat Jun 29 22:56:26 UTC 2013
Modified Files:
src/sbin/mount_nfs: getnfsargs.c getnfsargs_small.c mount_nfs.c
mount_nfs.h
Log Message:
declare the variables that getnfsargs need in getnfsargs so that they can
easily be used from other programs.
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sbin/mount_nfs/getnfsargs.c
cvs rdiff -u -r1.9 -r1.10 src/sbin/mount_nfs/getnfsargs_small.c
cvs rdiff -u -r1.70 -r1.71 src/sbin/mount_nfs/mount_nfs.c
cvs rdiff -u -r1.2 -r1.3 src/sbin/mount_nfs/mount_nfs.h
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.15 src/sbin/mount_nfs/getnfsargs.c:1.16
--- src/sbin/mount_nfs/getnfsargs.c:1.15 Fri Mar 1 13:25:17 2013
+++ src/sbin/mount_nfs/getnfsargs.c Sat Jun 29 18:56:26 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: getnfsargs.c,v 1.15 2013/03/01 18:25:17 joerg Exp $ */
+/* $NetBSD: getnfsargs.c,v 1.16 2013/06/29 22:56:26 christos Exp $ */
/*
* Copyright (c) 1992, 1993, 1994
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 19
#if 0
static char sccsid[] = "@(#)mount_nfs.c 8.11 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: getnfsargs.c,v 1.15 2013/03/01 18:25:17 joerg Exp $");
+__RCSID("$NetBSD: getnfsargs.c,v 1.16 2013/06/29 22:56:26 christos Exp $");
#endif
#endif /* not lint */
@@ -76,6 +76,13 @@ __RCSID("$NetBSD: getnfsargs.c,v 1.15 20
#include "mount_nfs.h"
+int retrycnt = DEF_RETRY;
+int opflags = 0;
+int force2 = 0;
+int force3 = 0;
+int mnttcp_ok = 1;
+int port = 0;
+
struct nfhret {
u_long stat;
long vers;
Index: src/sbin/mount_nfs/getnfsargs_small.c
diff -u src/sbin/mount_nfs/getnfsargs_small.c:1.9 src/sbin/mount_nfs/getnfsargs_small.c:1.10
--- src/sbin/mount_nfs/getnfsargs_small.c:1.9 Wed Jul 6 05:02:54 2011
+++ src/sbin/mount_nfs/getnfsargs_small.c Sat Jun 29 18:56:26 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: getnfsargs_small.c,v 1.9 2011/07/06 09:02:54 mrg Exp $ */
+/* $NetBSD: getnfsargs_small.c,v 1.10 2013/06/29 22:56:26 christos Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: getnfsargs_small.c,v 1.9 2011/07/06 09:02:54 mrg Exp $");
+__RCSID("$NetBSD: getnfsargs_small.c,v 1.10 2013/06/29 22:56:26 christos Exp $");
#include <sys/param.h>
#include <sys/mount.h>
@@ -130,6 +130,13 @@ struct nfhret {
u_char nfh[NFSX_V3FHMAX];
};
+int retrycnt = DEF_RETRY;
+int opflags = 0;
+int force2 = 0;
+int force3 = 0;
+int mnttcp_ok = 1;
+int port = 0;
+
/* Ripped from src/sys/arch/i386/stand/libsa/nfs.c */
static int
nfs_getrootfh(struct iodesc *d, const char *path, int mntvers, struct nfhret *nfhret)
Index: src/sbin/mount_nfs/mount_nfs.c
diff -u src/sbin/mount_nfs/mount_nfs.c:1.70 src/sbin/mount_nfs/mount_nfs.c:1.71
--- src/sbin/mount_nfs/mount_nfs.c:1.70 Fri Mar 1 13:25:17 2013
+++ src/sbin/mount_nfs/mount_nfs.c Sat Jun 29 18:56:26 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: mount_nfs.c,v 1.70 2013/03/01 18:25:17 joerg Exp $ */
+/* $NetBSD: mount_nfs.c,v 1.71 2013/06/29 22:56:26 christos Exp $ */
/*
* Copyright (c) 1992, 1993, 1994
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 19
#if 0
static char sccsid[] = "@(#)mount_nfs.c 8.11 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: mount_nfs.c,v 1.70 2013/03/01 18:25:17 joerg Exp $");
+__RCSID("$NetBSD: mount_nfs.c,v 1.71 2013/06/29 22:56:26 christos Exp $");
#endif
#endif /* not lint */
@@ -150,15 +150,6 @@ struct nfs_args nfsdefargs = {
.hostname = NULL,
};
-#define DEF_RETRY 10000
-
-int retrycnt = DEF_RETRY;
-int opflags = 0;
-int force2 = 0;
-int force3 = 0;
-int mnttcp_ok = 1;
-int port = 0;
-
static void shownfsargs(const struct nfs_args *);
int mount_nfs(int argc, char **argv);
/* void set_rpc_maxgrouplist(int); */
Index: src/sbin/mount_nfs/mount_nfs.h
diff -u src/sbin/mount_nfs/mount_nfs.h:1.2 src/sbin/mount_nfs/mount_nfs.h:1.3
--- src/sbin/mount_nfs/mount_nfs.h:1.2 Thu Oct 16 05:12:54 2008
+++ src/sbin/mount_nfs/mount_nfs.h Sat Jun 29 18:56:26 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: mount_nfs.h,v 1.2 2008/10/16 09:12:54 pooka Exp $ */
+/* $NetBSD: mount_nfs.h,v 1.3 2013/06/29 22:56:26 christos Exp $ */
/*
* Copyright (c) 1992, 1993, 1994
@@ -48,6 +48,8 @@ extern int opflags;
extern int mnttcp_ok;
extern int port;
+#define DEF_RETRY 10000
+
int getnfsargs(char *, struct nfs_args *);
void mount_nfs_dogetargs(struct nfs_args *, int, const char *);
void mount_nfs_parseargs(int, char **, struct nfs_args *, int *,