You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/11/25 13:12:04 UTC

[incubator-nuttx] 27/35: fs/nfs/rpc_clnt.c: Appease nxstyle

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 0a146273bf13b861722af309b3a4055b66d84f74
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 19:49:19 2020 +0900

    fs/nfs/rpc_clnt.c: Appease nxstyle
    
    The following nxstyle errors are intentionally left
    because they are parts of the copyright notices.
    
    fs/nfs/rpc_clnt.c:46:80: error: Long line found
    fs/nfs/rpc_clnt.c:63:78: error: Long line found
---
 fs/nfs/rpc_clnt.c | 39 +++++++++++++++++++++++++--------------
 1 file changed, 25 insertions(+), 14 deletions(-)

diff --git a/fs/nfs/rpc_clnt.c b/fs/nfs/rpc_clnt.c
index b219732..5d7b180 100644
--- a/fs/nfs/rpc_clnt.c
+++ b/fs/nfs/rpc_clnt.c
@@ -248,7 +248,8 @@ static int rpcclnt_socket(FAR struct rpcclnt *rpc, in_port_t rport)
   do
     {
       *lport = htons(--port);
-      error = psock_bind(&rpc->rc_so, (FAR struct sockaddr *)&laddr, addrlen);
+      error = psock_bind(&rpc->rc_so, (FAR struct sockaddr *)&laddr,
+                         addrlen);
       if (error < 0)
         {
           ferr("ERROR: psock_bind failed: %d\n", error);
@@ -393,6 +394,7 @@ static int rpcclnt_reply(FAR struct rpcclnt *rpc, uint32_t xid,
   int error;
 
 retry:
+
   /* Get the next RPC reply from the socket */
 
   error = rpcclnt_receive(rpc, reply, resplen);
@@ -536,15 +538,18 @@ int rpcclnt_connect(FAR struct rpcclnt *rpc)
   request.sdata.pmap.port = 0;
 
   error = rpcclnt_request(rpc, PMAPPROC_GETPORT, PMAPPROG, PMAPVERS,
-                          (FAR void *)&request.sdata, sizeof(struct call_args_pmap),
-                          (FAR void *)&response.rdata, sizeof(struct rpc_reply_pmap));
+                          (FAR void *)&request.sdata,
+                          sizeof(struct call_args_pmap),
+                          (FAR void *)&response.rdata,
+                          sizeof(struct rpc_reply_pmap));
   if (error != 0)
     {
       ferr("ERROR: rpcclnt_request failed: %d\n", error);
       goto bad;
     }
 
-  error = rpcclnt_socket(rpc, fxdr_unsigned(uint32_t, response.rdata.pmap.port));
+  error = rpcclnt_socket(rpc,
+                         fxdr_unsigned(uint32_t, response.rdata.pmap.port));
   if (error < 0)
     {
       ferr("ERROR: rpcclnt_socket MOUNTD port failed: %d\n", error);
@@ -554,7 +559,8 @@ int rpcclnt_connect(FAR struct rpcclnt *rpc)
   /* Do RPC to mountd. */
 
   strncpy(request.mountd.mount.rpath, rpc->rc_path, 90);
-  request.mountd.mount.len = txdr_unsigned(sizeof(request.mountd.mount.rpath));
+  request.mountd.mount.len =
+    txdr_unsigned(sizeof(request.mountd.mount.rpath));
 
   error = rpcclnt_request(rpc, RPCMNT_MOUNT, RPCPROG_MNT, RPCMNT_VER3,
                           (FAR void *)&request.mountd,
@@ -574,7 +580,8 @@ int rpcclnt_connect(FAR struct rpcclnt *rpc)
       goto bad;
     }
 
-  rpc->rc_fhsize = fxdr_unsigned(uint32_t, response.mdata.mount.fhandle.length);
+  rpc->rc_fhsize = fxdr_unsigned(uint32_t,
+                                 response.mdata.mount.fhandle.length);
   memcpy(&rpc->rc_fh, &response.mdata.mount.fhandle.handle, rpc->rc_fhsize);
 
   /* Do the RPC to get a dynamic bounding with the server using PMAP.
@@ -604,7 +611,8 @@ int rpcclnt_connect(FAR struct rpcclnt *rpc)
       goto bad;
     }
 
-  error = rpcclnt_socket(rpc, fxdr_unsigned(uint32_t, response.rdata.pmap.port));
+  error = rpcclnt_socket(rpc,
+                         fxdr_unsigned(uint32_t, response.rdata.pmap.port));
   if (error < 0)
     {
       ferr("ERROR: rpcclnt_socket NFS port returns %d\n", error);
@@ -668,7 +676,8 @@ void rpcclnt_disconnect(FAR struct rpcclnt *rpc)
       goto bad;
     }
 
-  error = rpcclnt_socket(rpc, fxdr_unsigned(uint32_t, response.rdata.pmap.port));
+  error = rpcclnt_socket(rpc,
+                         fxdr_unsigned(uint32_t, response.rdata.pmap.port));
   if (error < 0)
     {
       ferr("ERROR: rpcclnt_socket failed: %d\n", error);
@@ -678,7 +687,8 @@ void rpcclnt_disconnect(FAR struct rpcclnt *rpc)
   /* Do RPC to umountd. */
 
   strncpy(request.mountd.umount.rpath, rpc->rc_path, 90);
-  request.mountd.umount.len = txdr_unsigned(sizeof(request.mountd.umount.rpath));
+  request.mountd.umount.len =
+    txdr_unsigned(sizeof(request.mountd.umount.rpath));
 
   error = rpcclnt_request(rpc, RPCMNT_UMOUNT, RPCPROG_MNT, RPCMNT_VER3,
                           (FAR void *)&request.mountd,
@@ -700,9 +710,9 @@ bad:
  *
  * Description:
  *   Perform the RPC request.  Logic formats the RPC CALL message and calls
- *   rpcclnt_send to send the RPC CALL message.  It then calls rpcclnt_reply()
- *   to get the response.  It may attempt to re-send the CALL message on
- *   certain errors.
+ *   rpcclnt_send to send the RPC CALL message.  It then calls
+ *   rpcclnt_reply() to get the response.  It may attempt to re-send the
+ *   CALL message on certain errors.
  *
  *   On successful receipt, it verifies the RPC level of the returned values.
  *   (There may still be be NFS layer errors that will be detected by calling
@@ -729,8 +739,8 @@ int rpcclnt_request(FAR struct rpcclnt *rpc, int procnum, int prog,
   rpcclnt_fmtheader((FAR struct rpc_call_header *)request,
                     xid, prog, version, procnum);
 
-  /* Get the full size of the message (the size of variable data plus the size of
-   * the messages header).
+  /* Get the full size of the message (the size of variable data plus the
+   * size of the messages header).
    */
 
   reqlen += sizeof(struct rpc_call_header);
@@ -779,6 +789,7 @@ int rpcclnt_request(FAR struct rpcclnt *rpc, int procnum, int prog,
         {
           break;
         }
+
       rpc_statistics(rpcretries);
     }