Skip to contentSkip to conversation

libnfs.a: eliminate conn.c and conn.h

PATCH In review Chuck Lever 1 participant 1 message Jul 29, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 21/23 libnfs.a: eliminate conn.c and conn.h

conn.[ch] are now no longer needed. Clean them out and delete them.

---

 support/include/Makefile.am |    1 -
 support/include/conn.h      |   32 --------------------------------
 support/nfs/Makefile.am     |    2 +-
 support/nfs/conn.c          |   21 ---------------------
 utils/mount/network.c       |    1 -
 utils/mount/network.h       |   21 ++++++++++++++++++++-
 utils/mount/nfs4mount.c     |    1 -
 utils/mount/nfsmount.c      |    1 -
 utils/mount/nfsumount.c     |    1 -
 9 files changed, 21 insertions(+), 60 deletions(-)
support/include/Makefile.am +0 -1
index a99882c..69c4503 100644
@@ -3,7 +3,6 @@
 SUBDIRS = nfs rpcsvc sys
 
 noinst_HEADERS = \
-	conn.h \
 	exportfs.h \
 	fstab.h \
 	ha-callout.h \
support/include/conn.h deleted +0 -32
deleted file mode 100644
index 2b1f07d..0000000
@@ -1,32 +0,0 @@
-/* 
- * conn.h -- Connection routines for NFS mount / umount code.
- *
- * 2006-06-06 Amit Gud <[email protected]>
- * - Moved code snippets here from util-linux/mount
- */
-
-#ifndef _CONN_H
-#define _CONN_H
-
-#ifdef HAVE_RPCSVC_NFS_PROT_H
-#include <rpcsvc/nfs_prot.h>
-#else
-#include <linux/nfs.h>
-#define nfsstat nfs_stat
-#endif
-
-#include <rpc/pmap_prot.h>
-#include <rpc/clnt.h>
-
-typedef struct {
-	char **hostname;
-	struct sockaddr_in saddr;
-	struct pmap pmap;
-} clnt_addr_t;
-
-/* RPC call timeout values */
-static const struct timeval TIMEOUT = { 20, 0 };
-static const struct timeval RETRY_TIMEOUT = { 3, 0 };
-
-#endif /* _CONN_H */
-
support/nfs/Makefile.am +1 -1
index 6006df6..82353a9 100644
@@ -4,7 +4,7 @@ noinst_LIBRARIES = libnfs.a
 libnfs_a_SOURCES = exports.c rmtab.c xio.c rpcmisc.c rpcdispatch.c \
 		   xlog.c xcommon.c wildmat.c nfssvc.c nfsclient.c \
 		   nfsexport.c getfh.c nfsctl.c \
-		   svc_socket.c cacheio.c closeall.c conn.c fstab.c nfs_mntent.c
+		   svc_socket.c cacheio.c closeall.c fstab.c nfs_mntent.c
 
 MAINTAINERCLEANFILES = Makefile.in
 
support/nfs/conn.c deleted +0 -21
deleted file mode 100644
index db9185d..0000000
@@ -1,21 +0,0 @@
-/*
- * conn.c -- NFS client mount / umount connection code support functions
- *
- * 2006-06-06 Amit Gud <[email protected]>
- * - Moved code snippets to nfs-utils/support/nfs from util-linux/mount/nfsmount.c
- *
- */
-
-#include "config.h"
-#include <errno.h>
-#include <unistd.h>
-#include <rpc/rpc.h>
-#include <rpc/pmap_prot.h>
-#include <rpc/pmap_clnt.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include "conn.h"
-
utils/mount/network.c +0 -1
index af37ef6..efedf25 100644
@@ -34,7 +34,6 @@
 #include <rpc/pmap_clnt.h>
 #include <sys/socket.h>
 
-#include "conn.h"
 #include "xcommon.h"
 #include "mount.h"
 #include "nls.h"
utils/mount/network.h +20 -1
index 0f24a32..2e4dbbc 100644
@@ -21,12 +21,31 @@
  *
  */
 
-#include "conn.h"
+#include <rpc/pmap_prot.h>
+#include <rpc/clnt.h>
+
 #include "mount.h"
 
+#ifdef HAVE_RPCSVC_NFS_PROT_H
+#include <rpcsvc/nfs_prot.h>
+#else
+#include <linux/nfs.h>
+#define nfsstat nfs_stat
+#endif
+
 #define MNT_SENDBUFSIZE (2048U)
 #define MNT_RECVBUFSIZE (1024U)
 
+typedef struct {
+	char **hostname;
+	struct sockaddr_in saddr;
+	struct pmap pmap;
+} clnt_addr_t;
+
+/* RPC call timeout values */
+static const struct timeval TIMEOUT = { 20, 0 };
+static const struct timeval RETRY_TIMEOUT = { 3, 0 };
+
 int probe_bothports(clnt_addr_t *, clnt_addr_t *);
 int nfs_gethostbyname(const char *, struct sockaddr_in *);
 int nfs_call_umount(clnt_addr_t *, dirpath *);
utils/mount/nfs4mount.c +0 -1
index de97bd6..a4e2dc3 100644
@@ -39,7 +39,6 @@
 
 #include "pseudoflavors.h"
 #include "nls.h"
-#include "conn.h"
 #include "xcommon.h"
 
 #include "mount_constants.h"
utils/mount/nfsmount.c +0 -1
index f1d3885..e137fe5 100644
@@ -56,7 +56,6 @@
 #include <paths.h>
 #include <syslog.h>
 
-#include "conn.h"
 #include "xcommon.h"
 #include "mount.h"
 #include "nfs_mount.h"
utils/mount/nfsumount.c +0 -1
index e67a204..c7ec84e 100644
@@ -29,7 +29,6 @@
 #include "xcommon.h"
 #include "fstab.h"
 #include "nls.h"
-#include "conn.h"
 
 #include "mount_constants.h"
 #include "mount.h"

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs