]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sunrpc/rpcb_clnt.c
svc: Add /proc/sys/sunrpc/transport files
[linux-2.6-omap-h63xx.git] / net / sunrpc / rpcb_clnt.c
index 8962ac6b4c11958482edfdf995593ccb4525a0f8..3164a0871cf039ca7c2f9ebb80ad2dc1eba7b180 100644 (file)
@@ -120,8 +120,7 @@ static struct rpc_clnt *rpcb_create(char *hostname, struct sockaddr *srvaddr,
                .program        = &rpcb_program,
                .version        = version,
                .authflavor     = RPC_AUTH_UNIX,
-               .flags          = (RPC_CLNT_CREATE_NOPING |
-                                  RPC_CLNT_CREATE_INTR),
+               .flags          = RPC_CLNT_CREATE_NOPING,
        };
 
        switch (srvaddr->sa_family) {
@@ -200,13 +199,15 @@ int rpcb_register(u32 prog, u32 vers, int prot, unsigned short port, int *okay)
  * @vers: RPC version number to bind
  * @prot: transport protocol to use to make this request
  *
+ * Return value is the requested advertised port number,
+ * or a negative errno value.
+ *
  * Called from outside the RPC client in a synchronous task context.
  * Uses default timeout parameters specified by underlying transport.
  *
- * XXX: Needs to support IPv6, and rpcbind versions 3 and 4
+ * XXX: Needs to support IPv6
  */
-int rpcb_getport_sync(struct sockaddr_in *sin, __u32 prog,
-                     __u32 vers, int prot)
+int rpcb_getport_sync(struct sockaddr_in *sin, u32 prog, u32 vers, int prot)
 {
        struct rpcbind_args map = {
                .r_prog         = prog,
@@ -226,7 +227,7 @@ int rpcb_getport_sync(struct sockaddr_in *sin, __u32 prog,
                __FUNCTION__, NIPQUAD(sin->sin_addr.s_addr), prog, vers, prot);
 
        rpcb_clnt = rpcb_create(NULL, (struct sockaddr *)sin,
-                               sizeof(sin), prot, 2, 0);
+                               sizeof(*sin), prot, 2, 0);
        if (IS_ERR(rpcb_clnt))
                return PTR_ERR(rpcb_clnt);