Blame SOURCES/autofs-5.1.3-remove-some-redundant-rpc-library-code.patch

9ddfc2
autofs-5.1.3 - remove some redundant rpc library code
9ddfc2
9ddfc2
From: Ian Kent <raven@themaw.net>
9ddfc2
9ddfc2
Remove some redundant code that was used long long ago for testing.
9ddfc2
9ddfc2
Signed-off-by: Ian Kent <raven@themaw.net>
9ddfc2
---
9ddfc2
 CHANGELOG          |    1 
9ddfc2
 include/rpc_subs.h |    1 
9ddfc2
 lib/rpc_subs.c     |   87 -----------------------------------------------------
9ddfc2
 3 files changed, 1 insertion(+), 88 deletions(-)
9ddfc2
9ddfc2
--- autofs-5.0.7.orig/CHANGELOG
9ddfc2
+++ autofs-5.0.7/CHANGELOG
9ddfc2
@@ -303,6 +303,7 @@
9ddfc2
 - use systemd sd_notify() at startup.
9ddfc2
 - fix update_negative_cache() map source usage.
9ddfc2
 - mark removed cache entry negative.
9ddfc2
+- remove some redundant rpc library code.
9ddfc2
 
9ddfc2
 25/07/2012 autofs-5.0.7
9ddfc2
 =======================
9ddfc2
--- autofs-5.0.7.orig/include/rpc_subs.h
9ddfc2
+++ autofs-5.0.7/include/rpc_subs.h
9ddfc2
@@ -71,7 +71,6 @@ int rpc_portmap_getport(struct conn_info
9ddfc2
 int rpc_ping_proto(struct conn_info *);
9ddfc2
 int rpc_ping(const char *, long, long, unsigned int);
9ddfc2
 double elapsed(struct timeval, struct timeval);
9ddfc2
-int rpc_time(const char *, unsigned int, unsigned int, long, long, unsigned int, double *);
9ddfc2
 const char *get_addr_string(struct sockaddr *, char *, socklen_t);
9ddfc2
 
9ddfc2
 #endif
9ddfc2
--- autofs-5.0.7.orig/lib/rpc_subs.c
9ddfc2
+++ autofs-5.0.7/lib/rpc_subs.c
9ddfc2
@@ -1090,32 +1090,6 @@ double elapsed(struct timeval start, str
9ddfc2
 	return t2-t1;
9ddfc2
 }
9ddfc2
 
9ddfc2
-int rpc_time(const char *host,
9ddfc2
-	     unsigned int ping_vers, unsigned int ping_proto,
9ddfc2
-	     long seconds, long micros, unsigned int option, double *result)
9ddfc2
-{
9ddfc2
-	int status;
9ddfc2
-	double taken;
9ddfc2
-	struct timeval start, end;
9ddfc2
-	struct timezone tz;
9ddfc2
-	int proto = (ping_proto & RPC_PING_UDP) ? IPPROTO_UDP : IPPROTO_TCP;
9ddfc2
-	unsigned long vers = ping_vers;
9ddfc2
-
9ddfc2
-	gettimeofday(&start, &tz;;
9ddfc2
-	status = __rpc_ping(host, vers, proto, seconds, micros, option);
9ddfc2
-	gettimeofday(&end, &tz;;
9ddfc2
-
9ddfc2
-	if (status == RPC_PING_FAIL || status < 0)
9ddfc2
-		return status;
9ddfc2
-
9ddfc2
-	taken = elapsed(start, end);
9ddfc2
-
9ddfc2
-	if (result != NULL)
9ddfc2
-		*result = taken;
9ddfc2
-
9ddfc2
-	return status;
9ddfc2
-}
9ddfc2
-
9ddfc2
 static int rpc_get_exports_proto(struct conn_info *info, exports *exp)
9ddfc2
 {
9ddfc2
 	CLIENT *client;
9ddfc2
@@ -1288,64 +1262,3 @@ const char *get_addr_string(struct socka
9ddfc2
 
9ddfc2
 	return inet_ntop(sa->sa_family, addr, name, len);
9ddfc2
 }
9ddfc2
-
9ddfc2
-#if 0
9ddfc2
-#include <stdio.h>
9ddfc2
-
9ddfc2
-int main(int argc, char **argv)
9ddfc2
-{
9ddfc2
-	int ret;
9ddfc2
-	double res = 0.0;
9ddfc2
-	exports exportlist, tmp;
9ddfc2
-	groups grouplist;
9ddfc2
-	int n, maxlen;
9ddfc2
-
9ddfc2
-/*
9ddfc2
-	ret = rpc_ping("budgie", 10, 0, RPC_CLOSE_DEFAULT);
9ddfc2
-	printf("ret = %d\n", ret);
9ddfc2
-
9ddfc2
-	res = 0.0;
9ddfc2
-	ret = rpc_time("budgie", NFS2_VERSION, RPC_PING_TCP, 10, 0, RPC_CLOSE_DEFAULT, &res;;
9ddfc2
-	printf("v2 tcp ret = %d, res = %f\n", ret, res);
9ddfc2
-
9ddfc2
-	res = 0.0;
9ddfc2
-	ret = rpc_time("budgie", NFS3_VERSION, RPC_PING_TCP, 10, 0, RPC_CLOSE_DEFAULT, &res;;
9ddfc2
-	printf("v3 tcp ret = %d, res = %f\n", ret, res);
9ddfc2
-
9ddfc2
-	res = 0.0;
9ddfc2
-	ret = rpc_time("budgie", NFS2_VERSION, RPC_PING_UDP, 10, 0, RPC_CLOSE_DEFAULT, &res;;
9ddfc2
-	printf("v2 udp ret = %d, res = %f\n", ret, res);
9ddfc2
-
9ddfc2
-	res = 0.0;
9ddfc2
-	ret = rpc_time("budgie", NFS3_VERSION, RPC_PING_UDP, 10, 0, RPC_CLOSE_DEFAULT, &res;;
9ddfc2
-	printf("v3 udp ret = %d, res = %f\n", ret, res);
9ddfc2
-*/
9ddfc2
-	exportlist = rpc_get_exports("budgie", 10, 0, RPC_CLOSE_NOLINGER);
9ddfc2
-	exportlist = rpc_exports_prune(exportlist);
9ddfc2
-
9ddfc2
-	maxlen = 0;
9ddfc2
-	for (tmp = exportlist; tmp; tmp = tmp->ex_next) {
9ddfc2
-		if ((n = strlen(tmp->ex_dir)) > maxlen)
9ddfc2
-			maxlen = n;
9ddfc2
-	}
9ddfc2
-
9ddfc2
-	if (exportlist) {
9ddfc2
-		while (exportlist) {
9ddfc2
-			printf("%-*s ", maxlen, exportlist->ex_dir);
9ddfc2
-			grouplist = exportlist->ex_groups;
9ddfc2
-			if (grouplist) {
9ddfc2
-				while (grouplist) {
9ddfc2
-					printf("%s%s", grouplist->gr_name,
9ddfc2
-						grouplist->gr_next ? "," : "");
9ddfc2
-					grouplist = grouplist->gr_next;
9ddfc2
-				}
9ddfc2
-			}
9ddfc2
-			printf("\n");
9ddfc2
-			exportlist = exportlist->ex_next;
9ddfc2
-		}
9ddfc2
-	}
9ddfc2
-	rpc_exports_free(exportlist);
9ddfc2
-
9ddfc2
-	exit(0);
9ddfc2
-}
9ddfc2
-#endif