Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/mount_nfs declare the variables that getnfsargs need in...



details:   https://anonhg.NetBSD.org/src/rev/f78c0d09c7ac
branches:  trunk
changeset: 787729:f78c0d09c7ac
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jun 29 22:56:26 2013 +0000

description:
declare the variables that getnfsargs need in getnfsargs so that they can
easily be used from other programs.

diffstat:

 sbin/mount_nfs/getnfsargs.c       |  11 +++++++++--
 sbin/mount_nfs/getnfsargs_small.c |  11 +++++++++--
 sbin/mount_nfs/mount_nfs.c        |  13 ++-----------
 sbin/mount_nfs/mount_nfs.h        |   4 +++-
 4 files changed, 23 insertions(+), 16 deletions(-)

diffs (116 lines):

diff -r 76d4de4131ce -r f78c0d09c7ac sbin/mount_nfs/getnfsargs.c
--- a/sbin/mount_nfs/getnfsargs.c       Sat Jun 29 22:53:04 2013 +0000
+++ b/sbin/mount_nfs/getnfsargs.c       Sat Jun 29 22:56:26 2013 +0000
@@ -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 @@
 #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 @@
 
 #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;
diff -r 76d4de4131ce -r f78c0d09c7ac sbin/mount_nfs/getnfsargs_small.c
--- a/sbin/mount_nfs/getnfsargs_small.c Sat Jun 29 22:53:04 2013 +0000
+++ b/sbin/mount_nfs/getnfsargs_small.c Sat Jun 29 22:56:26 2013 +0000
@@ -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 @@
        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)
diff -r 76d4de4131ce -r f78c0d09c7ac sbin/mount_nfs/mount_nfs.c
--- a/sbin/mount_nfs/mount_nfs.c        Sat Jun 29 22:53:04 2013 +0000
+++ b/sbin/mount_nfs/mount_nfs.c        Sat Jun 29 22:56:26 2013 +0000
@@ -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 @@
 #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 @@
        .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); */
diff -r 76d4de4131ce -r f78c0d09c7ac sbin/mount_nfs/mount_nfs.h
--- a/sbin/mount_nfs/mount_nfs.h        Sat Jun 29 22:53:04 2013 +0000
+++ b/sbin/mount_nfs/mount_nfs.h        Sat Jun 29 22:56:26 2013 +0000
@@ -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 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 *,



Home | Main Index | Thread Index | Old Index