diff mbox

[1/5] libadmin: Remove rpcgen'd client and server stubs

Message ID 20131122003939.54630.31160.stgit@seurat.1015granger.net
State Accepted
Headers show

Commit Message

Chuck Lever Nov. 22, 2013, 12:39 a.m. UTC
We don't actually use these.  The reference versions remain in
doc/rpcl.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 src/libadmin/Makefile.am        |    2 
 src/libadmin/fedfs_admin_clnt.c |  162 ---------------------------------------
 src/libadmin/fedfs_admin_svc.c  |  149 ------------------------------------
 3 files changed, 1 insertion(+), 312 deletions(-)
 delete mode 100644 src/libadmin/fedfs_admin_clnt.c
 delete mode 100644 src/libadmin/fedfs_admin_svc.c
diff mbox

Patch

diff --git a/src/libadmin/Makefile.am b/src/libadmin/Makefile.am
index 731bfff..271549c 100644
--- a/src/libadmin/Makefile.am
+++ b/src/libadmin/Makefile.am
@@ -24,7 +24,7 @@ 
 ##
 
 noinst_LTLIBRARIES	= libadmin.la
-libadmin_la_SOURCES	= fedfs_admin_clnt.c fedfs_admin_svc.c fedfs_admin_xdr.c
+libadmin_la_SOURCES	= fedfs_admin_xdr.c
 
 CLEANFILES		= cscope.in.out cscope.out cscope.po.out *~
 DISTCLEANFILES		= Makefile.in
diff --git a/src/libadmin/fedfs_admin_clnt.c b/src/libadmin/fedfs_admin_clnt.c
deleted file mode 100644
index b14d09f..0000000
--- a/src/libadmin/fedfs_admin_clnt.c
+++ /dev/null
@@ -1,162 +0,0 @@ 
-/*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
-
-#include <memory.h> /* for memset */
-#include "fedfs_admin.h"
-#include <string.h>
-#define FEDFS_ADMIN_X
-
-/* Default timeout can be changed using clnt_control() */
-static struct timeval TIMEOUT = { 25, 0 };
-
-void *
-fedfs_null_1(void *argp, CLIENT *clnt)
-{
-	static char clnt_res;
-
-	memset((char *)&clnt_res, 0, sizeof(clnt_res));
-	if (clnt_call (clnt, FEDFS_NULL,
-		(xdrproc_t) xdr_void, (caddr_t) argp,
-		(xdrproc_t) xdr_void, (caddr_t) &clnt_res,
-		TIMEOUT) != RPC_SUCCESS) {
-		return (NULL);
-	}
-	return ((void *)&clnt_res);
-}
-
-FedFsStatus *
-fedfs_create_junction_1(FedFsCreateArgs *argp, CLIENT *clnt)
-{
-	static FedFsStatus clnt_res;
-
-	memset((char *)&clnt_res, 0, sizeof(clnt_res));
-	if (clnt_call (clnt, FEDFS_CREATE_JUNCTION,
-		(xdrproc_t) xdr_FedFsCreateArgs, (caddr_t) argp,
-		(xdrproc_t) xdr_FedFsStatus, (caddr_t) &clnt_res,
-		TIMEOUT) != RPC_SUCCESS) {
-		return (NULL);
-	}
-	return (&clnt_res);
-}
-
-FedFsStatus *
-fedfs_delete_junction_1(FedFsPath *argp, CLIENT *clnt)
-{
-	static FedFsStatus clnt_res;
-
-	memset((char *)&clnt_res, 0, sizeof(clnt_res));
-	if (clnt_call (clnt, FEDFS_DELETE_JUNCTION,
-		(xdrproc_t) xdr_FedFsPath, (caddr_t) argp,
-		(xdrproc_t) xdr_FedFsStatus, (caddr_t) &clnt_res,
-		TIMEOUT) != RPC_SUCCESS) {
-		return (NULL);
-	}
-	return (&clnt_res);
-}
-
-FedFsLookupRes *
-fedfs_lookup_junction_1(FedFsLookupArgs *argp, CLIENT *clnt)
-{
-	static FedFsLookupRes clnt_res;
-
-	memset((char *)&clnt_res, 0, sizeof(clnt_res));
-	if (clnt_call (clnt, FEDFS_LOOKUP_JUNCTION,
-		(xdrproc_t) xdr_FedFsLookupArgs, (caddr_t) argp,
-		(xdrproc_t) xdr_FedFsLookupRes, (caddr_t) &clnt_res,
-		TIMEOUT) != RPC_SUCCESS) {
-		return (NULL);
-	}
-	return (&clnt_res);
-}
-
-FedFsStatus *
-fedfs_create_replication_1(FedFsCreateArgs *argp, CLIENT *clnt)
-{
-	static FedFsStatus clnt_res;
-
-	memset((char *)&clnt_res, 0, sizeof(clnt_res));
-	if (clnt_call (clnt, FEDFS_CREATE_REPLICATION,
-		(xdrproc_t) xdr_FedFsCreateArgs, (caddr_t) argp,
-		(xdrproc_t) xdr_FedFsStatus, (caddr_t) &clnt_res,
-		TIMEOUT) != RPC_SUCCESS) {
-		return (NULL);
-	}
-	return (&clnt_res);
-}
-
-FedFsStatus *
-fedfs_delete_replication_1(FedFsPath *argp, CLIENT *clnt)
-{
-	static FedFsStatus clnt_res;
-
-	memset((char *)&clnt_res, 0, sizeof(clnt_res));
-	if (clnt_call (clnt, FEDFS_DELETE_REPLICATION,
-		(xdrproc_t) xdr_FedFsPath, (caddr_t) argp,
-		(xdrproc_t) xdr_FedFsStatus, (caddr_t) &clnt_res,
-		TIMEOUT) != RPC_SUCCESS) {
-		return (NULL);
-	}
-	return (&clnt_res);
-}
-
-FedFsLookupRes *
-fedfs_lookup_replication_1(FedFsLookupArgs *argp, CLIENT *clnt)
-{
-	static FedFsLookupRes clnt_res;
-
-	memset((char *)&clnt_res, 0, sizeof(clnt_res));
-	if (clnt_call (clnt, FEDFS_LOOKUP_REPLICATION,
-		(xdrproc_t) xdr_FedFsLookupArgs, (caddr_t) argp,
-		(xdrproc_t) xdr_FedFsLookupRes, (caddr_t) &clnt_res,
-		TIMEOUT) != RPC_SUCCESS) {
-		return (NULL);
-	}
-	return (&clnt_res);
-}
-
-FedFsStatus *
-fedfs_set_nsdb_params_1(FedFsSetNsdbParamsArgs *argp, CLIENT *clnt)
-{
-	static FedFsStatus clnt_res;
-
-	memset((char *)&clnt_res, 0, sizeof(clnt_res));
-	if (clnt_call (clnt, FEDFS_SET_NSDB_PARAMS,
-		(xdrproc_t) xdr_FedFsSetNsdbParamsArgs, (caddr_t) argp,
-		(xdrproc_t) xdr_FedFsStatus, (caddr_t) &clnt_res,
-		TIMEOUT) != RPC_SUCCESS) {
-		return (NULL);
-	}
-	return (&clnt_res);
-}
-
-FedFsGetNsdbParamsRes *
-fedfs_get_nsdb_params_1(FedFsNsdbName *argp, CLIENT *clnt)
-{
-	static FedFsGetNsdbParamsRes clnt_res;
-
-	memset((char *)&clnt_res, 0, sizeof(clnt_res));
-	if (clnt_call (clnt, FEDFS_GET_NSDB_PARAMS,
-		(xdrproc_t) xdr_FedFsNsdbName, (caddr_t) argp,
-		(xdrproc_t) xdr_FedFsGetNsdbParamsRes, (caddr_t) &clnt_res,
-		TIMEOUT) != RPC_SUCCESS) {
-		return (NULL);
-	}
-	return (&clnt_res);
-}
-
-FedFsGetLimitedNsdbParamsRes *
-fedfs_get_limited_nsdb_params_1(FedFsNsdbName *argp, CLIENT *clnt)
-{
-	static FedFsGetLimitedNsdbParamsRes clnt_res;
-
-	memset((char *)&clnt_res, 0, sizeof(clnt_res));
-	if (clnt_call (clnt, FEDFS_GET_LIMITED_NSDB_PARAMS,
-		(xdrproc_t) xdr_FedFsNsdbName, (caddr_t) argp,
-		(xdrproc_t) xdr_FedFsGetLimitedNsdbParamsRes, (caddr_t) &clnt_res,
-		TIMEOUT) != RPC_SUCCESS) {
-		return (NULL);
-	}
-	return (&clnt_res);
-}
diff --git a/src/libadmin/fedfs_admin_svc.c b/src/libadmin/fedfs_admin_svc.c
deleted file mode 100644
index 542f756..0000000
--- a/src/libadmin/fedfs_admin_svc.c
+++ /dev/null
@@ -1,149 +0,0 @@ 
-/*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
-
-#include "fedfs_admin.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <rpc/pmap_clnt.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/types.h> /* open */
-#include <sys/stat.h> /* open */
-#include <fcntl.h> /* open */
-#include <unistd.h> /* getdtablesize */
-#include <memory.h>
-#include <sys/resource.h> /* rlimit */
-#include <syslog.h>
-
-#ifndef SIG_PF
-#define SIG_PF void(*)(int)
-#endif
-
-#define _RPCSVC_CLOSEDOWN 120
-#define FEDFS_ADMIN_X
-extern int _rpcpmstart;		/* Started by a port monitor ? */
- /* States a server can be in wrt request */
-
-#define	_IDLE 0
-#define	_SERVED 1
-#define	_SERVING 2
-
-static int _rpcsvcstate = _IDLE;	 /* Set when a request is serviced */
-
-static
-void _msgout (char* msg)
-{
-#ifdef RPC_SVC_FG
-	if (_rpcpmstart)
-		syslog (LOG_ERR, "%s", msg);
-	else
-		fprintf (stderr, "%s\n", msg);
-#else
-	syslog (LOG_ERR, "%s", msg);
-#endif
-}
-
-void
-fedfs_prog_1(struct svc_req *rqstp, register SVCXPRT *transp)
-{
-	union {
-		FedFsCreateArgs fedfs_create_junction_1_arg;
-		FedFsPath fedfs_delete_junction_1_arg;
-		FedFsLookupArgs fedfs_lookup_junction_1_arg;
-		FedFsCreateArgs fedfs_create_replication_1_arg;
-		FedFsPath fedfs_delete_replication_1_arg;
-		FedFsLookupArgs fedfs_lookup_replication_1_arg;
-		FedFsSetNsdbParamsArgs fedfs_set_nsdb_params_1_arg;
-		FedFsNsdbName fedfs_get_nsdb_params_1_arg;
-		FedFsNsdbName fedfs_get_limited_nsdb_params_1_arg;
-	} argument;
-	char *result;
-	xdrproc_t _xdr_argument, _xdr_result;
-	char *(*local)(char *, struct svc_req *);
-
-	_rpcsvcstate = _SERVING;
-	switch (rqstp->rq_proc) {
-	case FEDFS_NULL:
-		_xdr_argument = (xdrproc_t) xdr_void;
-		_xdr_result = (xdrproc_t) xdr_void;
-		local = (char *(*)(char *, struct svc_req *)) fedfs_null_1_svc;
-		break;
-
-	case FEDFS_CREATE_JUNCTION:
-		_xdr_argument = (xdrproc_t) xdr_FedFsCreateArgs;
-		_xdr_result = (xdrproc_t) xdr_FedFsStatus;
-		local = (char *(*)(char *, struct svc_req *)) fedfs_create_junction_1_svc;
-		break;
-
-	case FEDFS_DELETE_JUNCTION:
-		_xdr_argument = (xdrproc_t) xdr_FedFsPath;
-		_xdr_result = (xdrproc_t) xdr_FedFsStatus;
-		local = (char *(*)(char *, struct svc_req *)) fedfs_delete_junction_1_svc;
-		break;
-
-	case FEDFS_LOOKUP_JUNCTION:
-		_xdr_argument = (xdrproc_t) xdr_FedFsLookupArgs;
-		_xdr_result = (xdrproc_t) xdr_FedFsLookupRes;
-		local = (char *(*)(char *, struct svc_req *)) fedfs_lookup_junction_1_svc;
-		break;
-
-	case FEDFS_CREATE_REPLICATION:
-		_xdr_argument = (xdrproc_t) xdr_FedFsCreateArgs;
-		_xdr_result = (xdrproc_t) xdr_FedFsStatus;
-		local = (char *(*)(char *, struct svc_req *)) fedfs_create_replication_1_svc;
-		break;
-
-	case FEDFS_DELETE_REPLICATION:
-		_xdr_argument = (xdrproc_t) xdr_FedFsPath;
-		_xdr_result = (xdrproc_t) xdr_FedFsStatus;
-		local = (char *(*)(char *, struct svc_req *)) fedfs_delete_replication_1_svc;
-		break;
-
-	case FEDFS_LOOKUP_REPLICATION:
-		_xdr_argument = (xdrproc_t) xdr_FedFsLookupArgs;
-		_xdr_result = (xdrproc_t) xdr_FedFsLookupRes;
-		local = (char *(*)(char *, struct svc_req *)) fedfs_lookup_replication_1_svc;
-		break;
-
-	case FEDFS_SET_NSDB_PARAMS:
-		_xdr_argument = (xdrproc_t) xdr_FedFsSetNsdbParamsArgs;
-		_xdr_result = (xdrproc_t) xdr_FedFsStatus;
-		local = (char *(*)(char *, struct svc_req *)) fedfs_set_nsdb_params_1_svc;
-		break;
-
-	case FEDFS_GET_NSDB_PARAMS:
-		_xdr_argument = (xdrproc_t) xdr_FedFsNsdbName;
-		_xdr_result = (xdrproc_t) xdr_FedFsGetNsdbParamsRes;
-		local = (char *(*)(char *, struct svc_req *)) fedfs_get_nsdb_params_1_svc;
-		break;
-
-	case FEDFS_GET_LIMITED_NSDB_PARAMS:
-		_xdr_argument = (xdrproc_t) xdr_FedFsNsdbName;
-		_xdr_result = (xdrproc_t) xdr_FedFsGetLimitedNsdbParamsRes;
-		local = (char *(*)(char *, struct svc_req *)) fedfs_get_limited_nsdb_params_1_svc;
-		break;
-
-	default:
-		svcerr_noproc (transp);
-		_rpcsvcstate = _SERVED;
-		return;
-	}
-	memset ((char *)&argument, 0, sizeof (argument));
-	if (!svc_getargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) {
-		svcerr_decode (transp);
-		_rpcsvcstate = _SERVED;
-		return;
-	}
-	result = (*local)((char *)&argument, rqstp);
-	if (result != NULL && !svc_sendreply(transp, (xdrproc_t) _xdr_result, result)) {
-		svcerr_systemerr (transp);
-	}
-	if (!svc_freeargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) {
-		_msgout ("unable to free arguments");
-		exit (1);
-	}
-	_rpcsvcstate = _SERVED;
-	return;
-}