]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
nfs-utils: Remove unused function rpc_svcrun()
authorChuck Lever <chuck.lever@oracle.com>
Fri, 26 Sep 2008 17:27:23 +0000 (13:27 -0400)
committerSteve Dickson <steved@redhat.com>
Fri, 26 Sep 2008 17:27:23 +0000 (13:27 -0400)
Clean up: remove function that has been disabled (via #if 0) for almost a
decade.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
support/include/rpcmisc.h
support/nfs/rpcdispatch.c

index 665df8ecfd702bd2098486c8bbb7ff28845ccd26..35c5011934183d222c8f1332e44cbbeb5ffdb29d 100644 (file)
@@ -46,7 +46,6 @@ int           makesock(int port, int proto);
 void           rpc_init(char *name, int prog, int vers,
                                void (*dispatch)(struct svc_req *, SVCXPRT *),
                                int defport);
-void           rpc_svcrun(void);
 void           rpc_dispatch(struct svc_req *rq, SVCXPRT *xprt,
                                struct rpc_dtable *dtable, int nvers,
                                void *argp, void *resp);
index 3d3477422cf85ab9ee0ff733d0efb6ccb65e05ac..502fc5fe948c9238246e4741dc96d82eb942a089 100644 (file)
@@ -61,54 +61,3 @@ rpc_dispatch(struct svc_req *rqstp, SVCXPRT *transp,
                exit (2);
        }
 }
-
-#if 0
-/*
- * This is our replacement for svc_run. It turns off some signals while
- * executing the server procedures to avoid nasty race conditions.
- */
-void
-rpc_svcrun(fd_set *morefds, void (*func)(int fd))
-{
-       sigset_t        block, current;
-       fd_set          readfds;
-
-       for (;;) {
-               readfds = svc_fdset;
-               if (morefds) {
-                       int     i;
-
-                       /* most efficient */
-                       for (i = 0; i < FD_SETSIZE; i++)
-                               if (FD_ISSET(i, morefds))
-                                       FD_SET(i, &readfs);
-               }
-               switch (select(FD_SETSIZE, &readfds, NULL, NULL, NULL)) {
-               case -1:
-                       if (errno == EINTR)
-                               continue;
-                       xlog(L_ERROR, "svc_run: - select failed");
-                       break;
-               case 0:
-                       continue;
-               default:
-                       if (morefds) {
-                               int     i;
-
-                               /* most efficient */
-                               for (i = 0; i < FD_SETSIZE; i++)
-                                       if (FD_ISSET(i, morefds) &&
-                                           FD_ISSET(i, &readfds))
-                                               func(i);
-                       }
-                       sigemptyset(&block);
-                       sigaddset(&block, SIGALRM);
-                       sigaddset(&block, SIGVTALRM);
-                       sigaddset(&block, SIGIO);
-                       sigprocmask(SIG_BLOCK, &block, &current);
-                       svc_getreqset(&readfds);
-                       sigprocmask(SIG_SETMASK, &current, NULL);
-               }
-       }
-}
-#endif