Browse Source

[compoenets] auto & manual formatted

Meco Man 4 years ago
parent
commit
3c05a4e719
100 changed files with 3162 additions and 3159 deletions
  1. 1 1
      components/cplusplus/Lock.h
  2. 1 1
      components/cplusplus/Mail.h
  3. 1 1
      components/cplusplus/Mutex.h
  4. 1 1
      components/cplusplus/Queue.h
  5. 1 1
      components/cplusplus/Semaphore.h
  6. 1 1
      components/cplusplus/Thread.h
  7. 1 1
      components/cplusplus/crt.h
  8. 8 8
      components/cplusplus/crt_init.c
  9. 2 1
      components/cplusplus/cxx_Mutex.cpp
  10. 2 1
      components/cplusplus/cxx_Semaphore.cpp
  11. 2 1
      components/cplusplus/cxx_Thread.cpp
  12. 5 5
      components/cplusplus/cxx_crt.cpp
  13. 2 2
      components/dfs/filesystems/devfs/devfs.c
  14. 1 1
      components/dfs/filesystems/devfs/devfs.h
  15. 1 1
      components/dfs/filesystems/elmfat/dfs_elm.c
  16. 1 1
      components/dfs/filesystems/elmfat/dfs_elm.h
  17. 29 29
      components/dfs/filesystems/elmfat/diskio.h
  18. 1 1
      components/dfs/filesystems/jffs2/dfs_jffs2.c
  19. 2 2
      components/dfs/filesystems/jffs2/dfs_jffs2.h
  20. 1 1
      components/dfs/filesystems/nfs/dfs_nfs.c
  21. 1 1
      components/dfs/filesystems/nfs/dfs_nfs.h
  22. 42 42
      components/dfs/filesystems/nfs/mount.h
  23. 31 31
      components/dfs/filesystems/nfs/mount_clnt.c
  24. 63 63
      components/dfs/filesystems/nfs/mount_xdr.c
  25. 433 433
      components/dfs/filesystems/nfs/nfs.h
  26. 1 1
      components/dfs/filesystems/nfs/nfs_auth.c
  27. 111 111
      components/dfs/filesystems/nfs/nfs_clnt.c
  28. 950 950
      components/dfs/filesystems/nfs/nfs_xdr.c
  29. 51 51
      components/dfs/filesystems/nfs/rpc/auth.h
  30. 49 49
      components/dfs/filesystems/nfs/rpc/auth_none.c
  31. 120 120
      components/dfs/filesystems/nfs/rpc/clnt.h
  32. 1 1
      components/dfs/filesystems/nfs/rpc/clnt_generic.c
  33. 272 272
      components/dfs/filesystems/nfs/rpc/clnt_udp.c
  34. 35 35
      components/dfs/filesystems/nfs/rpc/pmap.c
  35. 29 29
      components/dfs/filesystems/nfs/rpc/pmap.h
  36. 6 6
      components/dfs/filesystems/nfs/rpc/rpc.h
  37. 76 76
      components/dfs/filesystems/nfs/rpc/rpc_msg.h
  38. 132 132
      components/dfs/filesystems/nfs/rpc/rpc_prot.c
  39. 1 1
      components/dfs/filesystems/nfs/rpc/types.h
  40. 404 404
      components/dfs/filesystems/nfs/rpc/xdr.c
  41. 87 87
      components/dfs/filesystems/nfs/rpc/xdr.h
  42. 34 34
      components/dfs/filesystems/nfs/rpc/xdr_mem.c
  43. 1 1
      components/dfs/filesystems/ramfs/dfs_ramfs.c
  44. 1 1
      components/dfs/filesystems/ramfs/dfs_ramfs.h
  45. 1 1
      components/dfs/filesystems/romfs/dfs_romfs.c
  46. 1 1
      components/dfs/filesystems/romfs/dfs_romfs.h
  47. 1 1
      components/dfs/filesystems/romfs/romfs.c
  48. 1 1
      components/dfs/filesystems/skeleton/skeleton.c
  49. 1 1
      components/dfs/filesystems/skeleton/skeleton.h
  50. 1 1
      components/dfs/filesystems/uffs/dfs_uffs.c
  51. 1 1
      components/dfs/filesystems/uffs/dfs_uffs.h
  52. 50 50
      components/dfs/filesystems/uffs/uffs_rtthread.c
  53. 1 1
      components/dfs/include/dfs.h
  54. 1 1
      components/dfs/include/dfs_file.h
  55. 1 1
      components/dfs/include/dfs_fs.h
  56. 1 1
      components/dfs/include/dfs_poll.h
  57. 1 1
      components/dfs/include/dfs_posix.h
  58. 1 1
      components/dfs/include/dfs_private.h
  59. 1 1
      components/dfs/include/dfs_select.h
  60. 1 1
      components/dfs/src/dfs.c
  61. 1 1
      components/dfs/src/dfs_file.c
  62. 6 6
      components/dfs/src/dfs_fs.c
  63. 1 1
      components/dfs/src/dfs_posix.c
  64. 3 3
      components/dfs/src/poll.c
  65. 2 2
      components/dfs/src/select.c
  66. 1 1
      components/drivers/audio/audio.c
  67. 1 1
      components/drivers/audio/audio_pipe.c
  68. 1 1
      components/drivers/audio/audio_pipe.h
  69. 1 1
      components/drivers/can/can.c
  70. 5 5
      components/drivers/cputime/cputime.c
  71. 6 6
      components/drivers/cputime/cputime_cortexm.c
  72. 18 18
      components/drivers/hwcrypto/hw_bignum.c
  73. 17 17
      components/drivers/hwcrypto/hw_bignum.h
  74. 5 5
      components/drivers/hwcrypto/hw_crc.c
  75. 3 3
      components/drivers/hwcrypto/hw_crc.h
  76. 1 1
      components/drivers/hwcrypto/hw_gcm.c
  77. 1 1
      components/drivers/hwcrypto/hw_gcm.h
  78. 1 1
      components/drivers/hwcrypto/hw_hash.c
  79. 1 1
      components/drivers/hwcrypto/hw_hash.h
  80. 2 2
      components/drivers/hwcrypto/hw_rng.c
  81. 2 2
      components/drivers/hwcrypto/hw_rng.h
  82. 2 2
      components/drivers/hwcrypto/hw_symmetric.c
  83. 1 1
      components/drivers/hwcrypto/hw_symmetric.h
  84. 1 1
      components/drivers/hwcrypto/hwcrypto.c
  85. 1 1
      components/drivers/hwcrypto/hwcrypto.h
  86. 2 2
      components/drivers/hwtimer/hwtimer.c
  87. 1 1
      components/drivers/i2c/i2c-bit-ops.c
  88. 1 1
      components/drivers/i2c/i2c_core.c
  89. 3 3
      components/drivers/i2c/i2c_dev.c
  90. 1 1
      components/drivers/include/drivers/adc.h
  91. 1 1
      components/drivers/include/drivers/alarm.h
  92. 1 1
      components/drivers/include/drivers/audio.h
  93. 1 1
      components/drivers/include/drivers/can.h
  94. 1 1
      components/drivers/include/drivers/cputime.h
  95. 1 1
      components/drivers/include/drivers/crypto.h
  96. 1 1
      components/drivers/include/drivers/dac.h
  97. 1 1
      components/drivers/include/drivers/hwtimer.h
  98. 1 1
      components/drivers/include/drivers/i2c-bit-ops.h
  99. 1 1
      components/drivers/include/drivers/i2c.h
  100. 1 1
      components/drivers/include/drivers/i2c_dev.h

+ 1 - 1
components/cplusplus/Lock.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/cplusplus/Mail.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/cplusplus/Mutex.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/cplusplus/Queue.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/cplusplus/Semaphore.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/cplusplus/Thread.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/cplusplus/crt.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 8 - 8
components/cplusplus/crt_init.c

@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
-* Change Logs:
-* Date           Author       Notes
-* 2014-12-03     Bernard      Add copyright header.
-* 2014-12-29     Bernard      Add cplusplus initialization for ARMCC.
-* 2016-06-28     Bernard      Add _init/_fini routines for GCC.
-* 2016-10-02     Bernard      Add WEAK for cplusplus_system_init routine.
-*/
+ * Change Logs:
+ * Date           Author       Notes
+ * 2014-12-03     Bernard      Add copyright header.
+ * 2014-12-29     Bernard      Add cplusplus initialization for ARMCC.
+ * 2016-06-28     Bernard      Add _init/_fini routines for GCC.
+ * 2016-10-02     Bernard      Add WEAK for cplusplus_system_init routine.
+ */
 
 #include <rtthread.h>
 

+ 2 - 1
components/cplusplus/cxx_Mutex.cpp

@@ -1,11 +1,12 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
  */
+
 #include "Mutex.h"
 
 using namespace rtthread;

+ 2 - 1
components/cplusplus/cxx_Semaphore.cpp

@@ -1,11 +1,12 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
  */
+
 #include "Semaphore.h"
 
 using namespace rtthread;

+ 2 - 1
components/cplusplus/cxx_Thread.cpp

@@ -1,11 +1,12 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
  */
+
 #include "Thread.h"
 
 using namespace rtthread;

+ 5 - 5
components/cplusplus/cxx_crt.cpp

@@ -1,12 +1,12 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
-* Change Logs:
-* Date           Author       Notes
-* 2015-03-07     Bernard      Add copyright header.
-*/
+ * Change Logs:
+ * Date           Author       Notes
+ * 2015-03-07     Bernard      Add copyright header.
+ */
 
 #include <rtthread.h>
 #include "crt.h"

+ 2 - 2
components/dfs/filesystems/devfs/devfs.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -271,7 +271,7 @@ int dfs_device_fs_getdents(struct dfs_fd *file, struct dirent *dirp, uint32_t co
     if (count == 0)
         return -EINVAL;
 
-    for (index = 0; index < count && index + root_dirent->read_index < root_dirent->device_count; 
+    for (index = 0; index < count && index + root_dirent->read_index < root_dirent->device_count;
         index ++)
     {
         object = (rt_object_t)root_dirent->devices[root_dirent->read_index + index];

+ 1 - 1
components/dfs/filesystems/devfs/devfs.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/dfs/filesystems/elmfat/dfs_elm.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/dfs/filesystems/elmfat/dfs_elm.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 29 - 29
components/dfs/filesystems/elmfat/diskio.h

@@ -10,15 +10,15 @@ extern "C" {
 #endif
 
 /* Status of Disk Functions */
-typedef BYTE	DSTATUS;
+typedef BYTE    DSTATUS;
 
 /* Results of Disk Functions */
 typedef enum {
-	RES_OK = 0,		/* 0: Successful */
-	RES_ERROR,		/* 1: R/W Error */
-	RES_WRPRT,		/* 2: Write Protected */
-	RES_NOTRDY,		/* 3: Not Ready */
-	RES_PARERR		/* 4: Invalid Parameter */
+    RES_OK = 0,     /* 0: Successful */
+    RES_ERROR,      /* 1: R/W Error */
+    RES_WRPRT,      /* 2: Write Protected */
+    RES_NOTRDY,     /* 3: Not Ready */
+    RES_PARERR      /* 4: Invalid Parameter */
 } DRESULT;
 
 
@@ -35,40 +35,40 @@ DRESULT disk_ioctl (BYTE pdrv, BYTE cmd, void* buff);
 
 /* Disk Status Bits (DSTATUS) */
 
-#define STA_NOINIT		0x01	/* Drive not initialized */
-#define STA_NODISK		0x02	/* No medium in the drive */
-#define STA_PROTECT		0x04	/* Write protected */
+#define STA_NOINIT      0x01    /* Drive not initialized */
+#define STA_NODISK      0x02    /* No medium in the drive */
+#define STA_PROTECT     0x04    /* Write protected */
 
 
 /* Command code for disk_ioctrl fucntion */
 
 /* Generic command (Used by FatFs) */
-#define CTRL_SYNC			0	/* Complete pending write process (needed at FF_FS_READONLY == 0) */
-#define GET_SECTOR_COUNT	1	/* Get media size (needed at FF_USE_MKFS == 1) */
-#define GET_SECTOR_SIZE		2	/* Get sector size (needed at FF_MAX_SS != FF_MIN_SS) */
-#define GET_BLOCK_SIZE		3	/* Get erase block size (needed at FF_USE_MKFS == 1) */
-#define CTRL_TRIM			4	/* Inform device that the data on the block of sectors is no longer used (needed at FF_USE_TRIM == 1) */
+#define CTRL_SYNC           0   /* Complete pending write process (needed at FF_FS_READONLY == 0) */
+#define GET_SECTOR_COUNT    1   /* Get media size (needed at FF_USE_MKFS == 1) */
+#define GET_SECTOR_SIZE     2   /* Get sector size (needed at FF_MAX_SS != FF_MIN_SS) */
+#define GET_BLOCK_SIZE      3   /* Get erase block size (needed at FF_USE_MKFS == 1) */
+#define CTRL_TRIM           4   /* Inform device that the data on the block of sectors is no longer used (needed at FF_USE_TRIM == 1) */
 
 /* Generic command (Not used by FatFs) */
-#define CTRL_POWER			5	/* Get/Set power status */
-#define CTRL_LOCK			6	/* Lock/Unlock media removal */
-#define CTRL_EJECT			7	/* Eject media */
-#define CTRL_FORMAT			8	/* Create physical format on the media */
+#define CTRL_POWER          5   /* Get/Set power status */
+#define CTRL_LOCK           6   /* Lock/Unlock media removal */
+#define CTRL_EJECT          7   /* Eject media */
+#define CTRL_FORMAT         8   /* Create physical format on the media */
 
 /* MMC/SDC specific ioctl command */
-#define MMC_GET_TYPE		10	/* Get card type */
-#define MMC_GET_CSD			11	/* Get CSD */
-#define MMC_GET_CID			12	/* Get CID */
-#define MMC_GET_OCR			13	/* Get OCR */
-#define MMC_GET_SDSTAT		14	/* Get SD status */
-#define ISDIO_READ			55	/* Read data form SD iSDIO register */
-#define ISDIO_WRITE			56	/* Write data to SD iSDIO register */
-#define ISDIO_MRITE			57	/* Masked write data to SD iSDIO register */
+#define MMC_GET_TYPE        10  /* Get card type */
+#define MMC_GET_CSD         11  /* Get CSD */
+#define MMC_GET_CID         12  /* Get CID */
+#define MMC_GET_OCR         13  /* Get OCR */
+#define MMC_GET_SDSTAT      14  /* Get SD status */
+#define ISDIO_READ          55  /* Read data form SD iSDIO register */
+#define ISDIO_WRITE         56  /* Write data to SD iSDIO register */
+#define ISDIO_MRITE         57  /* Masked write data to SD iSDIO register */
 
 /* ATA/CF specific ioctl command */
-#define ATA_GET_REV			20	/* Get F/W revision */
-#define ATA_GET_MODEL		21	/* Get model name */
-#define ATA_GET_SN			22	/* Get serial number */
+#define ATA_GET_REV         20  /* Get F/W revision */
+#define ATA_GET_MODEL       21  /* Get model name */
+#define ATA_GET_SN          22  /* Get serial number */
 
 #ifdef __cplusplus
 }

+ 1 - 1
components/dfs/filesystems/jffs2/dfs_jffs2.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 2 - 2
components/dfs/filesystems/jffs2/dfs_jffs2.h

@@ -1,12 +1,12 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
  */
-#ifndef __DFS_JFFS2_H__ 
+#ifndef __DFS_JFFS2_H__
 #define __DFS_JFFS2_H__
 
 int dfs_jffs2_init(void);

+ 1 - 1
components/dfs/filesystems/nfs/dfs_nfs.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/dfs/filesystems/nfs/dfs_nfs.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 42 - 42
components/dfs/filesystems/nfs/mount.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -12,7 +12,7 @@
  */
 
 #ifndef _MOUNT_H_RPCGEN
-#define	_MOUNT_H_RPCGEN
+#define _MOUNT_H_RPCGEN
 
 #include <rpc/rpc.h>
 
@@ -23,13 +23,13 @@ extern "C" {
 /* This file is copied from RFC1813
  * Copyright 1995 Sun Micrososystems (I assume)
  */
-#define	MNTPATHLEN 1024
-#define	MNTNAMLEN 255
-#define	FHSIZE3 64
+#define MNTPATHLEN 1024
+#define MNTNAMLEN 255
+#define FHSIZE3 64
 
 typedef struct {
-	unsigned int fhandle3_len;
-	char *fhandle3_val;
+    unsigned int fhandle3_len;
+    char *fhandle3_val;
 } fhandle3;
 
 typedef char *dirpath;
@@ -43,70 +43,70 @@ typedef struct groupnode *groups;
 typedef struct mountbody *mountlist;
 
 enum mountstat3 {
-	MNT3_OK = 0,
-	MNT3ERR_PERM = 1,
-	MNT3ERR_NOENT = 2,
-	MNT3ERR_IO = 5,
-	MNT3ERR_ACCES = 13,
-	MNT3ERR_NOTDIR = 20,
-	MNT3ERR_INVAL = 22,
-	MNT3ERR_NAMETOOLONG = 63,
-	MNT3ERR_NOTSUPP = 10004,
-	MNT3ERR_SERVERFAULT = 10006
+    MNT3_OK = 0,
+    MNT3ERR_PERM = 1,
+    MNT3ERR_NOENT = 2,
+    MNT3ERR_IO = 5,
+    MNT3ERR_ACCES = 13,
+    MNT3ERR_NOTDIR = 20,
+    MNT3ERR_INVAL = 22,
+    MNT3ERR_NAMETOOLONG = 63,
+    MNT3ERR_NOTSUPP = 10004,
+    MNT3ERR_SERVERFAULT = 10006
 };
 typedef enum mountstat3 mountstat3;
 
 struct mountres3_ok {
-	fhandle3 fhandle;
-	struct {
-		unsigned int auth_flavors_len;
-		int *auth_flavors_val;
-	} auth_flavors;
+    fhandle3 fhandle;
+    struct {
+        unsigned int auth_flavors_len;
+        int *auth_flavors_val;
+    } auth_flavors;
 };
 typedef struct mountres3_ok mountres3_ok;
 
 struct mountres3 {
-	mountstat3 fhs_status;
-	union {
-		mountres3_ok mountinfo;
-	} mountres3_u;
+    mountstat3 fhs_status;
+    union {
+        mountres3_ok mountinfo;
+    } mountres3_u;
 };
 typedef struct mountres3 mountres3;
 
 struct mountbody {
-	name ml_hostname;
-	dirpath ml_directory;
-	mountlist ml_next;
+    name ml_hostname;
+    dirpath ml_directory;
+    mountlist ml_next;
 };
 typedef struct mountbody mountbody;
 
 struct groupnode {
-	name gr_name;
-	groups gr_next;
+    name gr_name;
+    groups gr_next;
 };
 typedef struct groupnode groupnode;
 
 struct exportnode {
-	dirpath ex_dir;
-	groups ex_groups;
-	exports ex_next;
+    dirpath ex_dir;
+    groups ex_groups;
+    exports ex_next;
 };
 typedef struct exportnode exportnode;
 
-#define	MOUNT_PROGRAM	100005
-#define	MOUNT_V3	3
+#define MOUNT_PROGRAM   100005
+#define MOUNT_V3    3
 
-#define	MOUNTPROC3_NULL	0
+#define MOUNTPROC3_NULL 0
 extern  enum clnt_stat mountproc3_null_3(void *, CLIENT *);
-#define	MOUNTPROC3_MNT	1
+#define MOUNTPROC3_MNT  1
 extern  enum clnt_stat mountproc3_mnt_3(dirpath , mountres3 *, CLIENT *);
-#define	MOUNTPROC3_DUMP	2
+#define MOUNTPROC3_DUMP 2
 extern  enum clnt_stat mountproc3_dump_3(mountlist *, CLIENT *);
-#define	MOUNTPROC3_UMNT	3
+#define MOUNTPROC3_UMNT 3
 extern  enum clnt_stat mountproc3_umnt_3(dirpath , void *, CLIENT *);
-#define	MOUNTPROC3_UMNTALL	4
+#define MOUNTPROC3_UMNTALL  4
 extern  enum clnt_stat mountproc3_umntall_3(void *, CLIENT *);
-#define	MOUNTPROC3_EXPORT	5
+#define MOUNTPROC3_EXPORT   5
 extern  enum clnt_stat mountproc3_export_3(exports *, CLIENT *);
 
 /* the xdr functions */

+ 31 - 31
components/dfs/filesystems/nfs/mount_clnt.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -23,56 +23,56 @@ typedef char* caddr_t;
 /* Default timeout can be changed using clnt_control() */
 static struct timeval TIMEOUT = { 25, 0 };
 
-enum clnt_stat 
+enum clnt_stat
 mountproc3_null_3(void *clnt_res, CLIENT *clnt)
 {
-	 return (clnt_call(clnt, MOUNTPROC3_NULL,
-		(xdrproc_t) xdr_void, (caddr_t) NULL,
-		(xdrproc_t) xdr_void, (caddr_t) clnt_res,
-		TIMEOUT));
+     return (clnt_call(clnt, MOUNTPROC3_NULL,
+        (xdrproc_t) xdr_void, (caddr_t) NULL,
+        (xdrproc_t) xdr_void, (caddr_t) clnt_res,
+        TIMEOUT));
 }
 
-enum clnt_stat 
+enum clnt_stat
 mountproc3_mnt_3(dirpath arg1, mountres3 *clnt_res, CLIENT *clnt)
 {
-	return (clnt_call(clnt, MOUNTPROC3_MNT,
-		(xdrproc_t) xdr_dirpath, (caddr_t) &arg1,
-		(xdrproc_t) xdr_mountres3, (caddr_t) clnt_res,
-		TIMEOUT));
+    return (clnt_call(clnt, MOUNTPROC3_MNT,
+        (xdrproc_t) xdr_dirpath, (caddr_t) &arg1,
+        (xdrproc_t) xdr_mountres3, (caddr_t) clnt_res,
+        TIMEOUT));
 }
 
-enum clnt_stat 
+enum clnt_stat
 mountproc3_dump_3(mountlist *clnt_res, CLIENT *clnt)
 {
-	 return (clnt_call(clnt, MOUNTPROC3_DUMP,
-		(xdrproc_t) xdr_void, (caddr_t) NULL,
-		(xdrproc_t) xdr_mountlist, (caddr_t) clnt_res,
-		TIMEOUT));
+     return (clnt_call(clnt, MOUNTPROC3_DUMP,
+        (xdrproc_t) xdr_void, (caddr_t) NULL,
+        (xdrproc_t) xdr_mountlist, (caddr_t) clnt_res,
+        TIMEOUT));
 }
 
-enum clnt_stat 
+enum clnt_stat
 mountproc3_umnt_3(dirpath arg1, void *clnt_res, CLIENT *clnt)
 {
-	return (clnt_call(clnt, MOUNTPROC3_UMNT,
-		(xdrproc_t) xdr_dirpath, (caddr_t) &arg1,
-		(xdrproc_t) xdr_void, (caddr_t) clnt_res,
-		TIMEOUT));
+    return (clnt_call(clnt, MOUNTPROC3_UMNT,
+        (xdrproc_t) xdr_dirpath, (caddr_t) &arg1,
+        (xdrproc_t) xdr_void, (caddr_t) clnt_res,
+        TIMEOUT));
 }
 
-enum clnt_stat 
+enum clnt_stat
 mountproc3_umntall_3(void *clnt_res, CLIENT *clnt)
 {
-	 return (clnt_call(clnt, MOUNTPROC3_UMNTALL,
-		(xdrproc_t) xdr_void, (caddr_t) NULL,
-		(xdrproc_t) xdr_void, (caddr_t) clnt_res,
-		TIMEOUT));
+     return (clnt_call(clnt, MOUNTPROC3_UMNTALL,
+        (xdrproc_t) xdr_void, (caddr_t) NULL,
+        (xdrproc_t) xdr_void, (caddr_t) clnt_res,
+        TIMEOUT));
 }
 
-enum clnt_stat 
+enum clnt_stat
 mountproc3_export_3(exports *clnt_res, CLIENT *clnt)
 {
-	 return (clnt_call(clnt, MOUNTPROC3_EXPORT,
-		(xdrproc_t) xdr_void, (caddr_t) NULL,
-		(xdrproc_t) xdr_exports, (caddr_t) clnt_res,
-		TIMEOUT));
+     return (clnt_call(clnt, MOUNTPROC3_EXPORT,
+        (xdrproc_t) xdr_void, (caddr_t) NULL,
+        (xdrproc_t) xdr_exports, (caddr_t) clnt_res,
+        TIMEOUT));
 }

+ 63 - 63
components/dfs/filesystems/nfs/mount_xdr.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -19,124 +19,124 @@
 bool_t
 xdr_fhandle3(register XDR *xdrs, fhandle3 *objp)
 {
-	if (!xdr_bytes(xdrs, (char **)&objp->fhandle3_val, (unsigned int *) &objp->fhandle3_len, FHSIZE3))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_bytes(xdrs, (char **)&objp->fhandle3_val, (unsigned int *) &objp->fhandle3_len, FHSIZE3))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_dirpath(register XDR *xdrs, dirpath *objp)
 {
-	if (!xdr_string(xdrs, objp, MNTPATHLEN))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_string(xdrs, objp, MNTPATHLEN))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_name(register XDR *xdrs, name *objp)
 {
-	if (!xdr_string(xdrs, objp, MNTNAMLEN))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_string(xdrs, objp, MNTNAMLEN))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_exports(register XDR *xdrs, exports *objp)
 {
-	if (!xdr_pointer(xdrs, (char **)objp, sizeof (struct exportnode), (xdrproc_t) xdr_exportnode))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_pointer(xdrs, (char **)objp, sizeof (struct exportnode), (xdrproc_t) xdr_exportnode))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_groups(register XDR *xdrs, groups *objp)
 {
-	if (!xdr_pointer(xdrs, (char **)objp, sizeof (struct groupnode), (xdrproc_t) xdr_groupnode))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_pointer(xdrs, (char **)objp, sizeof (struct groupnode), (xdrproc_t) xdr_groupnode))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_mountlist(register XDR *xdrs, mountlist *objp)
 {
-	if (!xdr_pointer(xdrs, (char **)objp, sizeof (struct mountbody), (xdrproc_t) xdr_mountbody))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_pointer(xdrs, (char **)objp, sizeof (struct mountbody), (xdrproc_t) xdr_mountbody))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_mountstat3(register XDR *xdrs, mountstat3 *objp)
 {
-	int enum_objp;
+    int enum_objp;
 
-	enum_objp = *objp;
+    enum_objp = *objp;
 
-	if (!xdr_enum(xdrs, (enum_t *)&enum_objp))
-	{
-		*objp = (mountstat3)enum_objp;
-		return (FALSE);
-	}
+    if (!xdr_enum(xdrs, (enum_t *)&enum_objp))
+    {
+        *objp = (mountstat3)enum_objp;
+        return (FALSE);
+    }
 
-	return (TRUE);
+    return (TRUE);
 }
 
 bool_t
 xdr_mountres3_ok(register XDR *xdrs, mountres3_ok *objp)
 {
-	if (!xdr_fhandle3(xdrs, &objp->fhandle))
-		return (FALSE);
-	if (!xdr_array(xdrs, (char **)&objp->auth_flavors.auth_flavors_val, (unsigned int *) &objp->auth_flavors.auth_flavors_len, ~0,
-		sizeof (int), (xdrproc_t) xdr_int))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_fhandle3(xdrs, &objp->fhandle))
+        return (FALSE);
+    if (!xdr_array(xdrs, (char **)&objp->auth_flavors.auth_flavors_val, (unsigned int *) &objp->auth_flavors.auth_flavors_len, ~0,
+        sizeof (int), (xdrproc_t) xdr_int))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_mountres3(register XDR *xdrs, mountres3 *objp)
 {
-	if (!xdr_mountstat3(xdrs, &objp->fhs_status))
-		return (FALSE);
-	switch (objp->fhs_status) {
-	case MNT3_OK:
-		if (!xdr_mountres3_ok(xdrs, &objp->mountres3_u.mountinfo))
-			return (FALSE);
-		break;
-	default :
-		return (FALSE);
-	}
-	return (TRUE);
+    if (!xdr_mountstat3(xdrs, &objp->fhs_status))
+        return (FALSE);
+    switch (objp->fhs_status) {
+    case MNT3_OK:
+        if (!xdr_mountres3_ok(xdrs, &objp->mountres3_u.mountinfo))
+            return (FALSE);
+        break;
+    default :
+        return (FALSE);
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_mountbody(register XDR *xdrs, mountbody *objp)
 {
-	if (!xdr_name(xdrs, &objp->ml_hostname))
-		return (FALSE);
-	if (!xdr_dirpath(xdrs, &objp->ml_directory))
-		return (FALSE);
-	if (!xdr_mountlist(xdrs, &objp->ml_next))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_name(xdrs, &objp->ml_hostname))
+        return (FALSE);
+    if (!xdr_dirpath(xdrs, &objp->ml_directory))
+        return (FALSE);
+    if (!xdr_mountlist(xdrs, &objp->ml_next))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_groupnode(register XDR *xdrs, groupnode *objp)
 {
-	if (!xdr_name(xdrs, &objp->gr_name))
-		return (FALSE);
-	if (!xdr_groups(xdrs, &objp->gr_next))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_name(xdrs, &objp->gr_name))
+        return (FALSE);
+    if (!xdr_groups(xdrs, &objp->gr_next))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_exportnode(register XDR *xdrs, exportnode *objp)
 {
-	if (!xdr_dirpath(xdrs, &objp->ex_dir))
-		return (FALSE);
-	if (!xdr_groups(xdrs, &objp->ex_groups))
-		return (FALSE);
-	if (!xdr_exports(xdrs, &objp->ex_next))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_dirpath(xdrs, &objp->ex_dir))
+        return (FALSE);
+    if (!xdr_groups(xdrs, &objp->ex_groups))
+        return (FALSE);
+    if (!xdr_exports(xdrs, &objp->ex_next))
+        return (FALSE);
+    return (TRUE);
 }

+ 433 - 433
components/dfs/filesystems/nfs/nfs.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -12,7 +12,7 @@
  */
 
 #ifndef _NFS_H_RPCGEN
-#define	_NFS_H_RPCGEN
+#define _NFS_H_RPCGEN
 
 #include <rpc/rpc.h>
 
@@ -23,20 +23,20 @@ extern "C" {
 /* This file is copied from RFC1813
  * Copyright 1995 Sun Micrososystems (I assume)
  */
-#define	NFS3_FHSIZE 64
-#define	NFS3_COOKIEVERFSIZE 8
-#define	NFS3_CREATEVERFSIZE 8
-#define	NFS3_WRITEVERFSIZE 8
-#define	ACCESS3_READ 0x0001
-#define	ACCESS3_LOOKUP 0x0002
-#define	ACCESS3_MODIFY 0x0004
-#define	ACCESS3_EXTEND 0x0008
-#define	ACCESS3_DELETE 0x0010
-#define	ACCESS3_EXECUTE 0x0020
-#define	FSF3_LINK 0x0001
-#define	FSF3_SYMLINK 0x0002
-#define	FSF3_HOMOGENEOUS 0x0008
-#define	FSF3_CANSETTIME 0x0010
+#define NFS3_FHSIZE 64
+#define NFS3_COOKIEVERFSIZE 8
+#define NFS3_CREATEVERFSIZE 8
+#define NFS3_WRITEVERFSIZE 8
+#define ACCESS3_READ 0x0001
+#define ACCESS3_LOOKUP 0x0002
+#define ACCESS3_MODIFY 0x0004
+#define ACCESS3_EXTEND 0x0008
+#define ACCESS3_DELETE 0x0010
+#define ACCESS3_EXECUTE 0x0020
+#define FSF3_LINK 0x0001
+#define FSF3_SYMLINK 0x0002
+#define FSF3_HOMOGENEOUS 0x0008
+#define FSF3_CANSETTIME 0x0010
 
 typedef unsigned long long uint64;
 
@@ -73,900 +73,900 @@ typedef uint32 mode3;
 typedef uint32 count3;
 
 enum nfsstat3 {
-	NFS3_OK = 0,
-	NFS3ERR_PERM = 1,
-	NFS3ERR_NOENT = 2,
-	NFS3ERR_IO = 5,
-	NFS3ERR_NXIO = 6,
-	NFS3ERR_ACCES = 13,
-	NFS3ERR_EXIST = 17,
-	NFS3ERR_XDEV = 18,
-	NFS3ERR_NODEV = 19,
-	NFS3ERR_NOTDIR = 20,
-	NFS3ERR_ISDIR = 21,
-	NFS3ERR_INVAL = 22,
-	NFS3ERR_FBIG = 27,
-	NFS3ERR_NOSPC = 28,
-	NFS3ERR_ROFS = 30,
-	NFS3ERR_MLINK = 31,
-	NFS3ERR_NAMETOOLONG = 63,
-	NFS3ERR_NOTEMPTY = 66,
-	NFS3ERR_DQUOT = 69,
-	NFS3ERR_STALE = 70,
-	NFS3ERR_REMOTE = 71,
-	NFS3ERR_BADHANDLE = 10001,
-	NFS3ERR_NOT_SYNC = 10002,
-	NFS3ERR_BAD_COOKIE = 10003,
-	NFS3ERR_NOTSUPP = 10004,
-	NFS3ERR_TOOSMALL = 10005,
-	NFS3ERR_SERVERFAULT = 10006,
-	NFS3ERR_BADTYPE = 10007,
-	NFS3ERR_JUKEBOX = 10008
+    NFS3_OK = 0,
+    NFS3ERR_PERM = 1,
+    NFS3ERR_NOENT = 2,
+    NFS3ERR_IO = 5,
+    NFS3ERR_NXIO = 6,
+    NFS3ERR_ACCES = 13,
+    NFS3ERR_EXIST = 17,
+    NFS3ERR_XDEV = 18,
+    NFS3ERR_NODEV = 19,
+    NFS3ERR_NOTDIR = 20,
+    NFS3ERR_ISDIR = 21,
+    NFS3ERR_INVAL = 22,
+    NFS3ERR_FBIG = 27,
+    NFS3ERR_NOSPC = 28,
+    NFS3ERR_ROFS = 30,
+    NFS3ERR_MLINK = 31,
+    NFS3ERR_NAMETOOLONG = 63,
+    NFS3ERR_NOTEMPTY = 66,
+    NFS3ERR_DQUOT = 69,
+    NFS3ERR_STALE = 70,
+    NFS3ERR_REMOTE = 71,
+    NFS3ERR_BADHANDLE = 10001,
+    NFS3ERR_NOT_SYNC = 10002,
+    NFS3ERR_BAD_COOKIE = 10003,
+    NFS3ERR_NOTSUPP = 10004,
+    NFS3ERR_TOOSMALL = 10005,
+    NFS3ERR_SERVERFAULT = 10006,
+    NFS3ERR_BADTYPE = 10007,
+    NFS3ERR_JUKEBOX = 10008
 };
 typedef enum nfsstat3 nfsstat3;
 
 enum ftype3 {
-	NFS3REG = 1,
-	NFS3DIR = 2,
-	NFS3BLK = 3,
-	NFS3CHR = 4,
-	NFS3LNK = 5,
-	NFS3SOCK = 6,
-	NFS3FIFO = 7
+    NFS3REG = 1,
+    NFS3DIR = 2,
+    NFS3BLK = 3,
+    NFS3CHR = 4,
+    NFS3LNK = 5,
+    NFS3SOCK = 6,
+    NFS3FIFO = 7
 };
 typedef enum ftype3 ftype3;
 
 enum stable_how {
-	UNSTABLE = 0,
-	DATA_SYNC = 1,
-	FILE_SYNC = 2
+    UNSTABLE = 0,
+    DATA_SYNC = 1,
+    FILE_SYNC = 2
 };
 typedef enum stable_how stable_how;
 
 enum createmode3 {
-	UNCHECKED = 0,
-	GUARDED = 1,
-	EXCLUSIVE = 2
+    UNCHECKED = 0,
+    GUARDED = 1,
+    EXCLUSIVE = 2
 };
 typedef enum createmode3 createmode3;
 
 struct specdata3 {
-	uint32 specdata1;
-	uint32 specdata2;
+    uint32 specdata1;
+    uint32 specdata2;
 };
 typedef struct specdata3 specdata3;
 
 struct nfs_fh3 {
-	struct {
-		unsigned int data_len;
-		char *data_val;
-	} data;
+    struct {
+        unsigned int data_len;
+        char *data_val;
+    } data;
 };
 typedef struct nfs_fh3 nfs_fh3;
 
 struct nfstime3 {
-	uint32 seconds;
-	uint32 nseconds;
+    uint32 seconds;
+    uint32 nseconds;
 };
 typedef struct nfstime3 nfstime3;
 
 struct fattr3 {
-	ftype3 type;
-	mode3 mode;
-	uint32 nlink;
-	uid3 uid;
-	gid3 gid;
-	size3 size;
-	size3 used;
-	specdata3 rdev;
-	uint64 fsid;
-	fileid3 fileid;
-	nfstime3 atime;
-	nfstime3 mtime;
-	nfstime3 ctime;
+    ftype3 type;
+    mode3 mode;
+    uint32 nlink;
+    uid3 uid;
+    gid3 gid;
+    size3 size;
+    size3 used;
+    specdata3 rdev;
+    uint64 fsid;
+    fileid3 fileid;
+    nfstime3 atime;
+    nfstime3 mtime;
+    nfstime3 ctime;
 };
 typedef struct fattr3 fattr3;
 
 struct post_op_attr {
-	bool_t attributes_follow;
-	union {
-		fattr3 attributes;
-	} post_op_attr_u;
+    bool_t attributes_follow;
+    union {
+        fattr3 attributes;
+    } post_op_attr_u;
 };
 typedef struct post_op_attr post_op_attr;
 
 struct wcc_attr {
-	size3 size;
-	nfstime3 mtime;
-	nfstime3 ctime;
+    size3 size;
+    nfstime3 mtime;
+    nfstime3 ctime;
 };
 typedef struct wcc_attr wcc_attr;
 
 struct pre_op_attr {
-	bool_t attributes_follow;
-	union {
-		wcc_attr attributes;
-	} pre_op_attr_u;
+    bool_t attributes_follow;
+    union {
+        wcc_attr attributes;
+    } pre_op_attr_u;
 };
 typedef struct pre_op_attr pre_op_attr;
 
 struct wcc_data {
-	pre_op_attr before;
-	post_op_attr after;
+    pre_op_attr before;
+    post_op_attr after;
 };
 typedef struct wcc_data wcc_data;
 
 struct post_op_fh3 {
-	bool_t handle_follows;
-	union {
-		nfs_fh3 handle;
-	} post_op_fh3_u;
+    bool_t handle_follows;
+    union {
+        nfs_fh3 handle;
+    } post_op_fh3_u;
 };
 typedef struct post_op_fh3 post_op_fh3;
 
 enum time_how {
-	DONT_CHANGE = 0,
-	SET_TO_SERVER_TIME = 1,
-	SET_TO_CLIENT_TIME = 2
+    DONT_CHANGE = 0,
+    SET_TO_SERVER_TIME = 1,
+    SET_TO_CLIENT_TIME = 2
 };
 typedef enum time_how time_how;
 
 struct set_mode3 {
-	bool_t set_it;
-	union {
-		mode3 mode;
-	} set_mode3_u;
+    bool_t set_it;
+    union {
+        mode3 mode;
+    } set_mode3_u;
 };
 typedef struct set_mode3 set_mode3;
 
 struct set_uid3 {
-	bool_t set_it;
-	union {
-		uid3 uid;
-	} set_uid3_u;
+    bool_t set_it;
+    union {
+        uid3 uid;
+    } set_uid3_u;
 };
 typedef struct set_uid3 set_uid3;
 
 struct set_gid3 {
-	bool_t set_it;
-	union {
-		gid3 gid;
-	} set_gid3_u;
+    bool_t set_it;
+    union {
+        gid3 gid;
+    } set_gid3_u;
 };
 typedef struct set_gid3 set_gid3;
 
 struct set_size3 {
-	bool_t set_it;
-	union {
-		size3 size;
-	} set_size3_u;
+    bool_t set_it;
+    union {
+        size3 size;
+    } set_size3_u;
 };
 typedef struct set_size3 set_size3;
 
 struct set_atime {
-	time_how set_it;
-	union {
-		nfstime3 atime;
-	} set_atime_u;
+    time_how set_it;
+    union {
+        nfstime3 atime;
+    } set_atime_u;
 };
 typedef struct set_atime set_atime;
 
 struct set_mtime {
-	time_how set_it;
-	union {
-		nfstime3 mtime;
-	} set_mtime_u;
+    time_how set_it;
+    union {
+        nfstime3 mtime;
+    } set_mtime_u;
 };
 typedef struct set_mtime set_mtime;
 
 struct sattr3 {
-	set_mode3 mode;
-	set_uid3 uid;
-	set_gid3 gid;
-	set_size3 size;
-	set_atime atime;
-	set_mtime mtime;
+    set_mode3 mode;
+    set_uid3 uid;
+    set_gid3 gid;
+    set_size3 size;
+    set_atime atime;
+    set_mtime mtime;
 };
 typedef struct sattr3 sattr3;
 
 struct diropargs3 {
-	nfs_fh3 dir;
-	filename3 name;
+    nfs_fh3 dir;
+    filename3 name;
 };
 typedef struct diropargs3 diropargs3;
 
 struct GETATTR3args {
-	nfs_fh3 object;
+    nfs_fh3 object;
 };
 typedef struct GETATTR3args GETATTR3args;
 
 struct GETATTR3resok {
-	fattr3 obj_attributes;
+    fattr3 obj_attributes;
 };
 typedef struct GETATTR3resok GETATTR3resok;
 
 struct GETATTR3res {
-	nfsstat3 status;
-	union {
-		GETATTR3resok resok;
-	} GETATTR3res_u;
+    nfsstat3 status;
+    union {
+        GETATTR3resok resok;
+    } GETATTR3res_u;
 };
 typedef struct GETATTR3res GETATTR3res;
 
 struct sattrguard3 {
-	bool_t check;
-	union {
-		nfstime3 obj_ctime;
-	} sattrguard3_u;
+    bool_t check;
+    union {
+        nfstime3 obj_ctime;
+    } sattrguard3_u;
 };
 typedef struct sattrguard3 sattrguard3;
 
 struct SETATTR3args {
-	nfs_fh3 object;
-	sattr3 new_attributes;
-	sattrguard3 guard;
+    nfs_fh3 object;
+    sattr3 new_attributes;
+    sattrguard3 guard;
 };
 typedef struct SETATTR3args SETATTR3args;
 
 struct SETATTR3resok {
-	wcc_data obj_wcc;
+    wcc_data obj_wcc;
 };
 typedef struct SETATTR3resok SETATTR3resok;
 
 struct SETATTR3resfail {
-	wcc_data obj_wcc;
+    wcc_data obj_wcc;
 };
 typedef struct SETATTR3resfail SETATTR3resfail;
 
 struct SETATTR3res {
-	nfsstat3 status;
-	union {
-		SETATTR3resok resok;
-		SETATTR3resfail resfail;
-	} SETATTR3res_u;
+    nfsstat3 status;
+    union {
+        SETATTR3resok resok;
+        SETATTR3resfail resfail;
+    } SETATTR3res_u;
 };
 typedef struct SETATTR3res SETATTR3res;
 
 struct LOOKUP3args {
-	diropargs3 what;
+    diropargs3 what;
 };
 typedef struct LOOKUP3args LOOKUP3args;
 
 struct LOOKUP3resok {
-	nfs_fh3 object;
-	post_op_attr obj_attributes;
-	post_op_attr dir_attributes;
+    nfs_fh3 object;
+    post_op_attr obj_attributes;
+    post_op_attr dir_attributes;
 };
 typedef struct LOOKUP3resok LOOKUP3resok;
 
 struct LOOKUP3resfail {
-	post_op_attr dir_attributes;
+    post_op_attr dir_attributes;
 };
 typedef struct LOOKUP3resfail LOOKUP3resfail;
 
 struct LOOKUP3res {
-	nfsstat3 status;
-	union {
-		LOOKUP3resok resok;
-		LOOKUP3resfail resfail;
-	} LOOKUP3res_u;
+    nfsstat3 status;
+    union {
+        LOOKUP3resok resok;
+        LOOKUP3resfail resfail;
+    } LOOKUP3res_u;
 };
 typedef struct LOOKUP3res LOOKUP3res;
 
 struct ACCESS3args {
-	nfs_fh3 object;
-	uint32 access;
+    nfs_fh3 object;
+    uint32 access;
 };
 typedef struct ACCESS3args ACCESS3args;
 
 struct ACCESS3resok {
-	post_op_attr obj_attributes;
-	uint32 access;
+    post_op_attr obj_attributes;
+    uint32 access;
 };
 typedef struct ACCESS3resok ACCESS3resok;
 
 struct ACCESS3resfail {
-	post_op_attr obj_attributes;
+    post_op_attr obj_attributes;
 };
 typedef struct ACCESS3resfail ACCESS3resfail;
 
 struct ACCESS3res {
-	nfsstat3 status;
-	union {
-		ACCESS3resok resok;
-		ACCESS3resfail resfail;
-	} ACCESS3res_u;
+    nfsstat3 status;
+    union {
+        ACCESS3resok resok;
+        ACCESS3resfail resfail;
+    } ACCESS3res_u;
 };
 typedef struct ACCESS3res ACCESS3res;
 
 struct READLINK3args {
-	nfs_fh3 symlink;
+    nfs_fh3 symlink;
 };
 typedef struct READLINK3args READLINK3args;
 
 struct READLINK3resok {
-	post_op_attr symlink_attributes;
-	nfspath3 data;
+    post_op_attr symlink_attributes;
+    nfspath3 data;
 };
 typedef struct READLINK3resok READLINK3resok;
 
 struct READLINK3resfail {
-	post_op_attr symlink_attributes;
+    post_op_attr symlink_attributes;
 };
 typedef struct READLINK3resfail READLINK3resfail;
 
 struct READLINK3res {
-	nfsstat3 status;
-	union {
-		READLINK3resok resok;
-		READLINK3resfail resfail;
-	} READLINK3res_u;
+    nfsstat3 status;
+    union {
+        READLINK3resok resok;
+        READLINK3resfail resfail;
+    } READLINK3res_u;
 };
 typedef struct READLINK3res READLINK3res;
 
 struct READ3args {
-	nfs_fh3 file;
-	offset3 offset;
-	count3 count;
+    nfs_fh3 file;
+    offset3 offset;
+    count3 count;
 };
 typedef struct READ3args READ3args;
 
 struct READ3resok {
-	post_op_attr file_attributes;
-	count3 count;
-	bool_t eof;
-	struct {
-		unsigned int data_len;
-		char *data_val;
-	} data;
+    post_op_attr file_attributes;
+    count3 count;
+    bool_t eof;
+    struct {
+        unsigned int data_len;
+        char *data_val;
+    } data;
 };
 typedef struct READ3resok READ3resok;
 
 struct READ3resfail {
-	post_op_attr file_attributes;
+    post_op_attr file_attributes;
 };
 typedef struct READ3resfail READ3resfail;
 
 struct READ3res {
-	nfsstat3 status;
-	union {
-		READ3resok resok;
-		READ3resfail resfail;
-	} READ3res_u;
+    nfsstat3 status;
+    union {
+        READ3resok resok;
+        READ3resfail resfail;
+    } READ3res_u;
 };
 typedef struct READ3res READ3res;
 
 struct WRITE3args {
-	nfs_fh3 file;
-	offset3 offset;
-	count3 count;
-	stable_how stable;
-	struct {
-		unsigned int data_len;
-		char *data_val;
-	} data;
+    nfs_fh3 file;
+    offset3 offset;
+    count3 count;
+    stable_how stable;
+    struct {
+        unsigned int data_len;
+        char *data_val;
+    } data;
 };
 typedef struct WRITE3args WRITE3args;
 
 struct WRITE3resok {
-	wcc_data file_wcc;
-	count3 count;
-	stable_how committed;
-	writeverf3 verf;
+    wcc_data file_wcc;
+    count3 count;
+    stable_how committed;
+    writeverf3 verf;
 };
 typedef struct WRITE3resok WRITE3resok;
 
 struct WRITE3resfail {
-	wcc_data file_wcc;
+    wcc_data file_wcc;
 };
 typedef struct WRITE3resfail WRITE3resfail;
 
 struct WRITE3res {
-	nfsstat3 status;
-	union {
-		WRITE3resok resok;
-		WRITE3resfail resfail;
-	} WRITE3res_u;
+    nfsstat3 status;
+    union {
+        WRITE3resok resok;
+        WRITE3resfail resfail;
+    } WRITE3res_u;
 };
 typedef struct WRITE3res WRITE3res;
 
 struct createhow3 {
-	createmode3 mode;
-	union {
-		sattr3 obj_attributes;
-		createverf3 verf;
-	} createhow3_u;
+    createmode3 mode;
+    union {
+        sattr3 obj_attributes;
+        createverf3 verf;
+    } createhow3_u;
 };
 typedef struct createhow3 createhow3;
 
 struct CREATE3args {
-	diropargs3 where;
-	createhow3 how;
+    diropargs3 where;
+    createhow3 how;
 };
 typedef struct CREATE3args CREATE3args;
 
 struct CREATE3resok {
-	post_op_fh3 obj;
-	post_op_attr obj_attributes;
-	wcc_data dir_wcc;
+    post_op_fh3 obj;
+    post_op_attr obj_attributes;
+    wcc_data dir_wcc;
 };
 typedef struct CREATE3resok CREATE3resok;
 
 struct CREATE3resfail {
-	wcc_data dir_wcc;
+    wcc_data dir_wcc;
 };
 typedef struct CREATE3resfail CREATE3resfail;
 
 struct CREATE3res {
-	nfsstat3 status;
-	union {
-		CREATE3resok resok;
-		CREATE3resfail resfail;
-	} CREATE3res_u;
+    nfsstat3 status;
+    union {
+        CREATE3resok resok;
+        CREATE3resfail resfail;
+    } CREATE3res_u;
 };
 typedef struct CREATE3res CREATE3res;
 
 struct MKDIR3args {
-	diropargs3 where;
-	sattr3 attributes;
+    diropargs3 where;
+    sattr3 attributes;
 };
 typedef struct MKDIR3args MKDIR3args;
 
 struct MKDIR3resok {
-	post_op_fh3 obj;
-	post_op_attr obj_attributes;
-	wcc_data dir_wcc;
+    post_op_fh3 obj;
+    post_op_attr obj_attributes;
+    wcc_data dir_wcc;
 };
 typedef struct MKDIR3resok MKDIR3resok;
 
 struct MKDIR3resfail {
-	wcc_data dir_wcc;
+    wcc_data dir_wcc;
 };
 typedef struct MKDIR3resfail MKDIR3resfail;
 
 struct MKDIR3res {
-	nfsstat3 status;
-	union {
-		MKDIR3resok resok;
-		MKDIR3resfail resfail;
-	} MKDIR3res_u;
+    nfsstat3 status;
+    union {
+        MKDIR3resok resok;
+        MKDIR3resfail resfail;
+    } MKDIR3res_u;
 };
 typedef struct MKDIR3res MKDIR3res;
 
 struct symlinkdata3 {
-	sattr3 symlink_attributes;
-	nfspath3 symlink_data;
+    sattr3 symlink_attributes;
+    nfspath3 symlink_data;
 };
 typedef struct symlinkdata3 symlinkdata3;
 
 struct SYMLINK3args {
-	diropargs3 where;
-	symlinkdata3 symlink;
+    diropargs3 where;
+    symlinkdata3 symlink;
 };
 typedef struct SYMLINK3args SYMLINK3args;
 
 struct SYMLINK3resok {
-	post_op_fh3 obj;
-	post_op_attr obj_attributes;
-	wcc_data dir_wcc;
+    post_op_fh3 obj;
+    post_op_attr obj_attributes;
+    wcc_data dir_wcc;
 };
 typedef struct SYMLINK3resok SYMLINK3resok;
 
 struct SYMLINK3resfail {
-	wcc_data dir_wcc;
+    wcc_data dir_wcc;
 };
 typedef struct SYMLINK3resfail SYMLINK3resfail;
 
 struct SYMLINK3res {
-	nfsstat3 status;
-	union {
-		SYMLINK3resok resok;
-		SYMLINK3resfail resfail;
-	} SYMLINK3res_u;
+    nfsstat3 status;
+    union {
+        SYMLINK3resok resok;
+        SYMLINK3resfail resfail;
+    } SYMLINK3res_u;
 };
 typedef struct SYMLINK3res SYMLINK3res;
 
 struct devicedata3 {
-	sattr3 dev_attributes;
-	specdata3 spec;
+    sattr3 dev_attributes;
+    specdata3 spec;
 };
 typedef struct devicedata3 devicedata3;
 
 struct mknoddata3 {
-	ftype3 type;
-	union {
-		devicedata3 device;
-		sattr3 pipe_attributes;
-	} mknoddata3_u;
+    ftype3 type;
+    union {
+        devicedata3 device;
+        sattr3 pipe_attributes;
+    } mknoddata3_u;
 };
 typedef struct mknoddata3 mknoddata3;
 
 struct MKNOD3args {
-	diropargs3 where;
-	mknoddata3 what;
+    diropargs3 where;
+    mknoddata3 what;
 };
 typedef struct MKNOD3args MKNOD3args;
 
 struct MKNOD3resok {
-	post_op_fh3 obj;
-	post_op_attr obj_attributes;
-	wcc_data dir_wcc;
+    post_op_fh3 obj;
+    post_op_attr obj_attributes;
+    wcc_data dir_wcc;
 };
 typedef struct MKNOD3resok MKNOD3resok;
 
 struct MKNOD3resfail {
-	wcc_data dir_wcc;
+    wcc_data dir_wcc;
 };
 typedef struct MKNOD3resfail MKNOD3resfail;
 
 struct MKNOD3res {
-	nfsstat3 status;
-	union {
-		MKNOD3resok resok;
-		MKNOD3resfail resfail;
-	} MKNOD3res_u;
+    nfsstat3 status;
+    union {
+        MKNOD3resok resok;
+        MKNOD3resfail resfail;
+    } MKNOD3res_u;
 };
 typedef struct MKNOD3res MKNOD3res;
 
 struct REMOVE3args {
-	diropargs3 object;
+    diropargs3 object;
 };
 typedef struct REMOVE3args REMOVE3args;
 
 struct REMOVE3resok {
-	wcc_data dir_wcc;
+    wcc_data dir_wcc;
 };
 typedef struct REMOVE3resok REMOVE3resok;
 
 struct REMOVE3resfail {
-	wcc_data dir_wcc;
+    wcc_data dir_wcc;
 };
 typedef struct REMOVE3resfail REMOVE3resfail;
 
 struct REMOVE3res {
-	nfsstat3 status;
-	union {
-		REMOVE3resok resok;
-		REMOVE3resfail resfail;
-	} REMOVE3res_u;
+    nfsstat3 status;
+    union {
+        REMOVE3resok resok;
+        REMOVE3resfail resfail;
+    } REMOVE3res_u;
 };
 typedef struct REMOVE3res REMOVE3res;
 
 struct RMDIR3args {
-	diropargs3 object;
+    diropargs3 object;
 };
 typedef struct RMDIR3args RMDIR3args;
 
 struct RMDIR3resok {
-	wcc_data dir_wcc;
+    wcc_data dir_wcc;
 };
 typedef struct RMDIR3resok RMDIR3resok;
 
 struct RMDIR3resfail {
-	wcc_data dir_wcc;
+    wcc_data dir_wcc;
 };
 typedef struct RMDIR3resfail RMDIR3resfail;
 
 struct RMDIR3res {
-	nfsstat3 status;
-	union {
-		RMDIR3resok resok;
-		RMDIR3resfail resfail;
-	} RMDIR3res_u;
+    nfsstat3 status;
+    union {
+        RMDIR3resok resok;
+        RMDIR3resfail resfail;
+    } RMDIR3res_u;
 };
 typedef struct RMDIR3res RMDIR3res;
 
 struct RENAME3args {
-	diropargs3 from;
-	diropargs3 to;
+    diropargs3 from;
+    diropargs3 to;
 };
 typedef struct RENAME3args RENAME3args;
 
 struct RENAME3resok {
-	wcc_data fromdir_wcc;
-	wcc_data todir_wcc;
+    wcc_data fromdir_wcc;
+    wcc_data todir_wcc;
 };
 typedef struct RENAME3resok RENAME3resok;
 
 struct RENAME3resfail {
-	wcc_data fromdir_wcc;
-	wcc_data todir_wcc;
+    wcc_data fromdir_wcc;
+    wcc_data todir_wcc;
 };
 typedef struct RENAME3resfail RENAME3resfail;
 
 struct RENAME3res {
-	nfsstat3 status;
-	union {
-		RENAME3resok resok;
-		RENAME3resfail resfail;
-	} RENAME3res_u;
+    nfsstat3 status;
+    union {
+        RENAME3resok resok;
+        RENAME3resfail resfail;
+    } RENAME3res_u;
 };
 typedef struct RENAME3res RENAME3res;
 
 struct LINK3args {
-	nfs_fh3 file;
-	diropargs3 link;
+    nfs_fh3 file;
+    diropargs3 link;
 };
 typedef struct LINK3args LINK3args;
 
 struct LINK3resok {
-	post_op_attr file_attributes;
-	wcc_data linkdir_wcc;
+    post_op_attr file_attributes;
+    wcc_data linkdir_wcc;
 };
 typedef struct LINK3resok LINK3resok;
 
 struct LINK3resfail {
-	post_op_attr file_attributes;
-	wcc_data linkdir_wcc;
+    post_op_attr file_attributes;
+    wcc_data linkdir_wcc;
 };
 typedef struct LINK3resfail LINK3resfail;
 
 struct LINK3res {
-	nfsstat3 status;
-	union {
-		LINK3resok resok;
-		LINK3resfail resfail;
-	} LINK3res_u;
+    nfsstat3 status;
+    union {
+        LINK3resok resok;
+        LINK3resfail resfail;
+    } LINK3res_u;
 };
 typedef struct LINK3res LINK3res;
 
 struct READDIR3args {
-	nfs_fh3 dir;
-	cookie3 cookie;
-	cookieverf3 cookieverf;
-	count3 count;
+    nfs_fh3 dir;
+    cookie3 cookie;
+    cookieverf3 cookieverf;
+    count3 count;
 };
 typedef struct READDIR3args READDIR3args;
 
 struct entry3 {
-	fileid3 fileid;
-	filename3 name;
-	cookie3 cookie;
-	struct entry3 *nextentry;
+    fileid3 fileid;
+    filename3 name;
+    cookie3 cookie;
+    struct entry3 *nextentry;
 };
 typedef struct entry3 entry3;
 
 struct dirlist3 {
-	entry3 *entries;
-	bool_t eof;
+    entry3 *entries;
+    bool_t eof;
 };
 typedef struct dirlist3 dirlist3;
 
 struct READDIR3resok {
-	post_op_attr dir_attributes;
-	cookieverf3 cookieverf;
-	dirlist3 reply;
+    post_op_attr dir_attributes;
+    cookieverf3 cookieverf;
+    dirlist3 reply;
 };
 typedef struct READDIR3resok READDIR3resok;
 
 struct READDIR3resfail {
-	post_op_attr dir_attributes;
+    post_op_attr dir_attributes;
 };
 typedef struct READDIR3resfail READDIR3resfail;
 
 struct READDIR3res {
-	nfsstat3 status;
-	union {
-		READDIR3resok resok;
-		READDIR3resfail resfail;
-	} READDIR3res_u;
+    nfsstat3 status;
+    union {
+        READDIR3resok resok;
+        READDIR3resfail resfail;
+    } READDIR3res_u;
 };
 typedef struct READDIR3res READDIR3res;
 
 struct READDIRPLUS3args {
-	nfs_fh3 dir;
-	cookie3 cookie;
-	cookieverf3 cookieverf;
-	count3 dircount;
-	count3 maxcount;
+    nfs_fh3 dir;
+    cookie3 cookie;
+    cookieverf3 cookieverf;
+    count3 dircount;
+    count3 maxcount;
 };
 typedef struct READDIRPLUS3args READDIRPLUS3args;
 
 struct entryplus3 {
-	fileid3 fileid;
-	filename3 name;
-	cookie3 cookie;
-	post_op_attr name_attributes;
-	post_op_fh3 name_handle;
-	struct entryplus3 *nextentry;
+    fileid3 fileid;
+    filename3 name;
+    cookie3 cookie;
+    post_op_attr name_attributes;
+    post_op_fh3 name_handle;
+    struct entryplus3 *nextentry;
 };
 typedef struct entryplus3 entryplus3;
 
 struct dirlistplus3 {
-	entryplus3 *entries;
-	bool_t eof;
+    entryplus3 *entries;
+    bool_t eof;
 };
 typedef struct dirlistplus3 dirlistplus3;
 
 struct READDIRPLUS3resok {
-	post_op_attr dir_attributes;
-	cookieverf3 cookieverf;
-	dirlistplus3 reply;
+    post_op_attr dir_attributes;
+    cookieverf3 cookieverf;
+    dirlistplus3 reply;
 };
 typedef struct READDIRPLUS3resok READDIRPLUS3resok;
 
 struct READDIRPLUS3resfail {
-	post_op_attr dir_attributes;
+    post_op_attr dir_attributes;
 };
 typedef struct READDIRPLUS3resfail READDIRPLUS3resfail;
 
 struct READDIRPLUS3res {
-	nfsstat3 status;
-	union {
-		READDIRPLUS3resok resok;
-		READDIRPLUS3resfail resfail;
-	} READDIRPLUS3res_u;
+    nfsstat3 status;
+    union {
+        READDIRPLUS3resok resok;
+        READDIRPLUS3resfail resfail;
+    } READDIRPLUS3res_u;
 };
 typedef struct READDIRPLUS3res READDIRPLUS3res;
 
 struct FSSTAT3args {
-	nfs_fh3 fsroot;
+    nfs_fh3 fsroot;
 };
 typedef struct FSSTAT3args FSSTAT3args;
 
 struct FSSTAT3resok {
-	post_op_attr obj_attributes;
-	size3 tbytes;
-	size3 fbytes;
-	size3 abytes;
-	size3 tfiles;
-	size3 ffiles;
-	size3 afiles;
-	uint32 invarsec;
+    post_op_attr obj_attributes;
+    size3 tbytes;
+    size3 fbytes;
+    size3 abytes;
+    size3 tfiles;
+    size3 ffiles;
+    size3 afiles;
+    uint32 invarsec;
 };
 typedef struct FSSTAT3resok FSSTAT3resok;
 
 struct FSSTAT3resfail {
-	post_op_attr obj_attributes;
+    post_op_attr obj_attributes;
 };
 typedef struct FSSTAT3resfail FSSTAT3resfail;
 
 struct FSSTAT3res {
-	nfsstat3 status;
-	union {
-		FSSTAT3resok resok;
-		FSSTAT3resfail resfail;
-	} FSSTAT3res_u;
+    nfsstat3 status;
+    union {
+        FSSTAT3resok resok;
+        FSSTAT3resfail resfail;
+    } FSSTAT3res_u;
 };
 typedef struct FSSTAT3res FSSTAT3res;
 
 struct FSINFO3args {
-	nfs_fh3 fsroot;
+    nfs_fh3 fsroot;
 };
 typedef struct FSINFO3args FSINFO3args;
 
 struct FSINFO3resok {
-	post_op_attr obj_attributes;
-	uint32 rtmax;
-	uint32 rtpref;
-	uint32 rtmult;
-	uint32 wtmax;
-	uint32 wtpref;
-	uint32 wtmult;
-	uint32 dtpref;
-	size3 maxfilesize;
-	nfstime3 time_delta;
-	uint32 properties;
+    post_op_attr obj_attributes;
+    uint32 rtmax;
+    uint32 rtpref;
+    uint32 rtmult;
+    uint32 wtmax;
+    uint32 wtpref;
+    uint32 wtmult;
+    uint32 dtpref;
+    size3 maxfilesize;
+    nfstime3 time_delta;
+    uint32 properties;
 };
 typedef struct FSINFO3resok FSINFO3resok;
 
 struct FSINFO3resfail {
-	post_op_attr obj_attributes;
+    post_op_attr obj_attributes;
 };
 typedef struct FSINFO3resfail FSINFO3resfail;
 
 struct FSINFO3res {
-	nfsstat3 status;
-	union {
-		FSINFO3resok resok;
-		FSINFO3resfail resfail;
-	} FSINFO3res_u;
+    nfsstat3 status;
+    union {
+        FSINFO3resok resok;
+        FSINFO3resfail resfail;
+    } FSINFO3res_u;
 };
 typedef struct FSINFO3res FSINFO3res;
 
 struct PATHCONF3args {
-	nfs_fh3 object;
+    nfs_fh3 object;
 };
 typedef struct PATHCONF3args PATHCONF3args;
 
 struct PATHCONF3resok {
-	post_op_attr obj_attributes;
-	uint32 linkmax;
-	uint32 name_max;
-	bool_t no_trunc;
-	bool_t chown_restricted;
-	bool_t case_insensitive;
-	bool_t case_preserving;
+    post_op_attr obj_attributes;
+    uint32 linkmax;
+    uint32 name_max;
+    bool_t no_trunc;
+    bool_t chown_restricted;
+    bool_t case_insensitive;
+    bool_t case_preserving;
 };
 typedef struct PATHCONF3resok PATHCONF3resok;
 
 struct PATHCONF3resfail {
-	post_op_attr obj_attributes;
+    post_op_attr obj_attributes;
 };
 typedef struct PATHCONF3resfail PATHCONF3resfail;
 
 struct PATHCONF3res {
-	nfsstat3 status;
-	union {
-		PATHCONF3resok resok;
-		PATHCONF3resfail resfail;
-	} PATHCONF3res_u;
+    nfsstat3 status;
+    union {
+        PATHCONF3resok resok;
+        PATHCONF3resfail resfail;
+    } PATHCONF3res_u;
 };
 typedef struct PATHCONF3res PATHCONF3res;
 
 struct COMMIT3args {
-	nfs_fh3 file;
-	offset3 offset;
-	count3 count;
+    nfs_fh3 file;
+    offset3 offset;
+    count3 count;
 };
 typedef struct COMMIT3args COMMIT3args;
 
 struct COMMIT3resok {
-	wcc_data file_wcc;
-	writeverf3 verf;
+    wcc_data file_wcc;
+    writeverf3 verf;
 };
 typedef struct COMMIT3resok COMMIT3resok;
 
 struct COMMIT3resfail {
-	wcc_data file_wcc;
+    wcc_data file_wcc;
 };
 typedef struct COMMIT3resfail COMMIT3resfail;
 
 struct COMMIT3res {
-	nfsstat3 status;
-	union {
-		COMMIT3resok resok;
-		COMMIT3resfail resfail;
-	} COMMIT3res_u;
+    nfsstat3 status;
+    union {
+        COMMIT3resok resok;
+        COMMIT3resfail resfail;
+    } COMMIT3res_u;
 };
 typedef struct COMMIT3res COMMIT3res;
 
-#define	NFS_PROGRAM	100003
-#define	NFS_V3	3
+#define NFS_PROGRAM 100003
+#define NFS_V3  3
 
-#define	NFSPROC3_NULL	0
+#define NFSPROC3_NULL   0
 extern  enum clnt_stat nfsproc3_null_3(void *, CLIENT *);
-#define	NFSPROC3_GETATTR	1
+#define NFSPROC3_GETATTR    1
 extern  enum clnt_stat nfsproc3_getattr_3(GETATTR3args , GETATTR3res *, CLIENT *);
-#define	NFSPROC3_SETATTR	2
+#define NFSPROC3_SETATTR    2
 extern  enum clnt_stat nfsproc3_setattr_3(SETATTR3args , SETATTR3res *, CLIENT *);
-#define	NFSPROC3_LOOKUP	3
+#define NFSPROC3_LOOKUP 3
 extern  enum clnt_stat nfsproc3_lookup_3(LOOKUP3args , LOOKUP3res *, CLIENT *);
-#define	NFSPROC3_ACCESS	4
+#define NFSPROC3_ACCESS 4
 extern  enum clnt_stat nfsproc3_access_3(ACCESS3args , ACCESS3res *, CLIENT *);
-#define	NFSPROC3_READLINK	5
+#define NFSPROC3_READLINK   5
 extern  enum clnt_stat nfsproc3_readlink_3(READLINK3args , READLINK3res *, CLIENT *);
-#define	NFSPROC3_READ	6
+#define NFSPROC3_READ   6
 extern  enum clnt_stat nfsproc3_read_3(READ3args , READ3res *, CLIENT *);
-#define	NFSPROC3_WRITE	7
+#define NFSPROC3_WRITE  7
 extern  enum clnt_stat nfsproc3_write_3(WRITE3args , WRITE3res *, CLIENT *);
-#define	NFSPROC3_CREATE	8
+#define NFSPROC3_CREATE 8
 extern  enum clnt_stat nfsproc3_create_3(CREATE3args , CREATE3res *, CLIENT *);
-#define	NFSPROC3_MKDIR	9
+#define NFSPROC3_MKDIR  9
 extern  enum clnt_stat nfsproc3_mkdir_3(MKDIR3args , MKDIR3res *, CLIENT *);
-#define	NFSPROC3_SYMLINK	10
+#define NFSPROC3_SYMLINK    10
 extern  enum clnt_stat nfsproc3_symlink_3(SYMLINK3args , SYMLINK3res *, CLIENT *);
-#define	NFSPROC3_MKNOD	11
+#define NFSPROC3_MKNOD  11
 extern  enum clnt_stat nfsproc3_mknod_3(MKNOD3args , MKNOD3res *, CLIENT *);
-#define	NFSPROC3_REMOVE	12
+#define NFSPROC3_REMOVE 12
 extern  enum clnt_stat nfsproc3_remove_3(REMOVE3args , REMOVE3res *, CLIENT *);
-#define	NFSPROC3_RMDIR	13
+#define NFSPROC3_RMDIR  13
 extern  enum clnt_stat nfsproc3_rmdir_3(RMDIR3args , RMDIR3res *, CLIENT *);
-#define	NFSPROC3_RENAME	14
+#define NFSPROC3_RENAME 14
 extern  enum clnt_stat nfsproc3_rename_3(RENAME3args , RENAME3res *, CLIENT *);
-#define	NFSPROC3_LINK	15
+#define NFSPROC3_LINK   15
 extern  enum clnt_stat nfsproc3_link_3(LINK3args , LINK3res *, CLIENT *);
-#define	NFSPROC3_READDIR	16
+#define NFSPROC3_READDIR    16
 extern  enum clnt_stat nfsproc3_readdir_3(READDIR3args , READDIR3res *, CLIENT *);
-#define	NFSPROC3_READDIRPLUS	17
+#define NFSPROC3_READDIRPLUS    17
 extern  enum clnt_stat nfsproc3_readdirplus_3(READDIRPLUS3args , READDIRPLUS3res *, CLIENT *);
-#define	NFSPROC3_FSSTAT	18
+#define NFSPROC3_FSSTAT 18
 extern  enum clnt_stat nfsproc3_fsstat_3(FSSTAT3args , FSSTAT3res *, CLIENT *);
-#define	NFSPROC3_FSINFO	19
+#define NFSPROC3_FSINFO 19
 extern  enum clnt_stat nfsproc3_fsinfo_3(FSINFO3args , FSINFO3res *, CLIENT *);
-#define	NFSPROC3_PATHCONF	20
+#define NFSPROC3_PATHCONF   20
 extern  enum clnt_stat nfsproc3_pathconf_3(PATHCONF3args , PATHCONF3res *, CLIENT *);
-#define	NFSPROC3_COMMIT	21
+#define NFSPROC3_COMMIT 21
 extern  enum clnt_stat nfsproc3_commit_3(COMMIT3args , COMMIT3res *, CLIENT *);
 
 /* the xdr functions */

+ 1 - 1
components/dfs/filesystems/nfs/nfs_auth.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 111 - 111
components/dfs/filesystems/nfs/nfs_clnt.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -23,200 +23,200 @@ typedef char* caddr_t;
 /* Default timeout can be changed using clnt_control() */
 static struct timeval TIMEOUT = { 25, 0 };
 
-enum clnt_stat 
+enum clnt_stat
 nfsproc3_null_3(void *clnt_res, CLIENT *clnt)
 {
-	 return (clnt_call(clnt, NFSPROC3_NULL,
-		(xdrproc_t) xdr_void, (caddr_t) NULL,
-		(xdrproc_t) xdr_void, (caddr_t) clnt_res,
-		TIMEOUT));
+     return (clnt_call(clnt, NFSPROC3_NULL,
+        (xdrproc_t) xdr_void, (caddr_t) NULL,
+        (xdrproc_t) xdr_void, (caddr_t) clnt_res,
+        TIMEOUT));
 }
 
-enum clnt_stat 
+enum clnt_stat
 nfsproc3_getattr_3(GETATTR3args arg1, GETATTR3res *clnt_res, CLIENT *clnt)
 {
-	return (clnt_call(clnt, NFSPROC3_GETATTR,
-		(xdrproc_t) xdr_GETATTR3args, (caddr_t) &arg1,
-		(xdrproc_t) xdr_GETATTR3res, (caddr_t) clnt_res,
-		TIMEOUT));
+    return (clnt_call(clnt, NFSPROC3_GETATTR,
+        (xdrproc_t) xdr_GETATTR3args, (caddr_t) &arg1,
+        (xdrproc_t) xdr_GETATTR3res, (caddr_t) clnt_res,
+        TIMEOUT));
 }
 
-enum clnt_stat 
+enum clnt_stat
 nfsproc3_setattr_3(SETATTR3args arg1, SETATTR3res *clnt_res, CLIENT *clnt)
 {
-	return (clnt_call(clnt, NFSPROC3_SETATTR,
-		(xdrproc_t) xdr_SETATTR3args, (caddr_t) &arg1,
-		(xdrproc_t) xdr_SETATTR3res, (caddr_t) clnt_res,
-		TIMEOUT));
+    return (clnt_call(clnt, NFSPROC3_SETATTR,
+        (xdrproc_t) xdr_SETATTR3args, (caddr_t) &arg1,
+        (xdrproc_t) xdr_SETATTR3res, (caddr_t) clnt_res,
+        TIMEOUT));
 }
 
-enum clnt_stat 
+enum clnt_stat
 nfsproc3_lookup_3(LOOKUP3args arg1, LOOKUP3res *clnt_res, CLIENT *clnt)
 {
-	return (clnt_call(clnt, NFSPROC3_LOOKUP,
-		(xdrproc_t) xdr_LOOKUP3args, (caddr_t) &arg1,
-		(xdrproc_t) xdr_LOOKUP3res, (caddr_t) clnt_res,
-		TIMEOUT));
+    return (clnt_call(clnt, NFSPROC3_LOOKUP,
+        (xdrproc_t) xdr_LOOKUP3args, (caddr_t) &arg1,
+        (xdrproc_t) xdr_LOOKUP3res, (caddr_t) clnt_res,
+        TIMEOUT));
 }
 
-enum clnt_stat 
+enum clnt_stat
 nfsproc3_access_3(ACCESS3args arg1, ACCESS3res *clnt_res, CLIENT *clnt)
 {
-	return (clnt_call(clnt, NFSPROC3_ACCESS,
-		(xdrproc_t) xdr_ACCESS3args, (caddr_t) &arg1,
-		(xdrproc_t) xdr_ACCESS3res, (caddr_t) clnt_res,
-		TIMEOUT));
+    return (clnt_call(clnt, NFSPROC3_ACCESS,
+        (xdrproc_t) xdr_ACCESS3args, (caddr_t) &arg1,
+        (xdrproc_t) xdr_ACCESS3res, (caddr_t) clnt_res,
+        TIMEOUT));
 }
 
-enum clnt_stat 
+enum clnt_stat
 nfsproc3_readlink_3(READLINK3args arg1, READLINK3res *clnt_res, CLIENT *clnt)
 {
-	return (clnt_call(clnt, NFSPROC3_READLINK,
-		(xdrproc_t) xdr_READLINK3args, (caddr_t) &arg1,
-		(xdrproc_t) xdr_READLINK3res, (caddr_t) clnt_res,
-		TIMEOUT));
+    return (clnt_call(clnt, NFSPROC3_READLINK,
+        (xdrproc_t) xdr_READLINK3args, (caddr_t) &arg1,
+        (xdrproc_t) xdr_READLINK3res, (caddr_t) clnt_res,
+        TIMEOUT));
 }
 
-enum clnt_stat 
+enum clnt_stat
 nfsproc3_read_3(READ3args arg1, READ3res *clnt_res, CLIENT *clnt)
 {
-	return (clnt_call(clnt, NFSPROC3_READ,
-		(xdrproc_t) xdr_READ3args, (caddr_t) &arg1,
-		(xdrproc_t) xdr_READ3res, (caddr_t) clnt_res,
-		TIMEOUT));
+    return (clnt_call(clnt, NFSPROC3_READ,
+        (xdrproc_t) xdr_READ3args, (caddr_t) &arg1,
+        (xdrproc_t) xdr_READ3res, (caddr_t) clnt_res,
+        TIMEOUT));
 }
 
-enum clnt_stat 
+enum clnt_stat
 nfsproc3_write_3(WRITE3args arg1, WRITE3res *clnt_res, CLIENT *clnt)
 {
-	return (clnt_call(clnt, NFSPROC3_WRITE,
-		(xdrproc_t) xdr_WRITE3args, (caddr_t) &arg1,
-		(xdrproc_t) xdr_WRITE3res, (caddr_t) clnt_res,
-		TIMEOUT));
+    return (clnt_call(clnt, NFSPROC3_WRITE,
+        (xdrproc_t) xdr_WRITE3args, (caddr_t) &arg1,
+        (xdrproc_t) xdr_WRITE3res, (caddr_t) clnt_res,
+        TIMEOUT));
 }
 
-enum clnt_stat 
+enum clnt_stat
 nfsproc3_create_3(CREATE3args arg1, CREATE3res *clnt_res, CLIENT *clnt)
 {
-	return (clnt_call(clnt, NFSPROC3_CREATE,
-		(xdrproc_t) xdr_CREATE3args, (caddr_t) &arg1,
-		(xdrproc_t) xdr_CREATE3res, (caddr_t) clnt_res,
-		TIMEOUT));
+    return (clnt_call(clnt, NFSPROC3_CREATE,
+        (xdrproc_t) xdr_CREATE3args, (caddr_t) &arg1,
+        (xdrproc_t) xdr_CREATE3res, (caddr_t) clnt_res,
+        TIMEOUT));
 }
 
-enum clnt_stat 
+enum clnt_stat
 nfsproc3_mkdir_3(MKDIR3args arg1, MKDIR3res *clnt_res, CLIENT *clnt)
 {
-	return (clnt_call(clnt, NFSPROC3_MKDIR,
-		(xdrproc_t) xdr_MKDIR3args, (caddr_t) &arg1,
-		(xdrproc_t) xdr_MKDIR3res, (caddr_t) clnt_res,
-		TIMEOUT));
+    return (clnt_call(clnt, NFSPROC3_MKDIR,
+        (xdrproc_t) xdr_MKDIR3args, (caddr_t) &arg1,
+        (xdrproc_t) xdr_MKDIR3res, (caddr_t) clnt_res,
+        TIMEOUT));
 }
 
-enum clnt_stat 
+enum clnt_stat
 nfsproc3_symlink_3(SYMLINK3args arg1, SYMLINK3res *clnt_res, CLIENT *clnt)
 {
-	return (clnt_call(clnt, NFSPROC3_SYMLINK,
-		(xdrproc_t) xdr_SYMLINK3args, (caddr_t) &arg1,
-		(xdrproc_t) xdr_SYMLINK3res, (caddr_t) clnt_res,
-		TIMEOUT));
+    return (clnt_call(clnt, NFSPROC3_SYMLINK,
+        (xdrproc_t) xdr_SYMLINK3args, (caddr_t) &arg1,
+        (xdrproc_t) xdr_SYMLINK3res, (caddr_t) clnt_res,
+        TIMEOUT));
 }
 
-enum clnt_stat 
+enum clnt_stat
 nfsproc3_mknod_3(MKNOD3args arg1, MKNOD3res *clnt_res, CLIENT *clnt)
 {
-	return (clnt_call(clnt, NFSPROC3_MKNOD,
-		(xdrproc_t) xdr_MKNOD3args, (caddr_t) &arg1,
-		(xdrproc_t) xdr_MKNOD3res, (caddr_t) clnt_res,
-		TIMEOUT));
+    return (clnt_call(clnt, NFSPROC3_MKNOD,
+        (xdrproc_t) xdr_MKNOD3args, (caddr_t) &arg1,
+        (xdrproc_t) xdr_MKNOD3res, (caddr_t) clnt_res,
+        TIMEOUT));
 }
 
-enum clnt_stat 
+enum clnt_stat
 nfsproc3_remove_3(REMOVE3args arg1, REMOVE3res *clnt_res, CLIENT *clnt)
 {
-	return (clnt_call(clnt, NFSPROC3_REMOVE,
-		(xdrproc_t) xdr_REMOVE3args, (caddr_t) &arg1,
-		(xdrproc_t) xdr_REMOVE3res, (caddr_t) clnt_res,
-		TIMEOUT));
+    return (clnt_call(clnt, NFSPROC3_REMOVE,
+        (xdrproc_t) xdr_REMOVE3args, (caddr_t) &arg1,
+        (xdrproc_t) xdr_REMOVE3res, (caddr_t) clnt_res,
+        TIMEOUT));
 }
 
-enum clnt_stat 
+enum clnt_stat
 nfsproc3_rmdir_3(RMDIR3args arg1, RMDIR3res *clnt_res, CLIENT *clnt)
 {
-	return (clnt_call(clnt, NFSPROC3_RMDIR,
-		(xdrproc_t) xdr_RMDIR3args, (caddr_t) &arg1,
-		(xdrproc_t) xdr_RMDIR3res, (caddr_t) clnt_res,
-		TIMEOUT));
+    return (clnt_call(clnt, NFSPROC3_RMDIR,
+        (xdrproc_t) xdr_RMDIR3args, (caddr_t) &arg1,
+        (xdrproc_t) xdr_RMDIR3res, (caddr_t) clnt_res,
+        TIMEOUT));
 }
 
-enum clnt_stat 
+enum clnt_stat
 nfsproc3_rename_3(RENAME3args arg1, RENAME3res *clnt_res, CLIENT *clnt)
 {
-	return (clnt_call(clnt, NFSPROC3_RENAME,
-		(xdrproc_t) xdr_RENAME3args, (caddr_t) &arg1,
-		(xdrproc_t) xdr_RENAME3res, (caddr_t) clnt_res,
-		TIMEOUT));
+    return (clnt_call(clnt, NFSPROC3_RENAME,
+        (xdrproc_t) xdr_RENAME3args, (caddr_t) &arg1,
+        (xdrproc_t) xdr_RENAME3res, (caddr_t) clnt_res,
+        TIMEOUT));
 }
 
-enum clnt_stat 
+enum clnt_stat
 nfsproc3_link_3(LINK3args arg1, LINK3res *clnt_res, CLIENT *clnt)
 {
-	return (clnt_call(clnt, NFSPROC3_LINK,
-		(xdrproc_t) xdr_LINK3args, (caddr_t) &arg1,
-		(xdrproc_t) xdr_LINK3res, (caddr_t) clnt_res,
-		TIMEOUT));
+    return (clnt_call(clnt, NFSPROC3_LINK,
+        (xdrproc_t) xdr_LINK3args, (caddr_t) &arg1,
+        (xdrproc_t) xdr_LINK3res, (caddr_t) clnt_res,
+        TIMEOUT));
 }
 
-enum clnt_stat 
+enum clnt_stat
 nfsproc3_readdir_3(READDIR3args arg1, READDIR3res *clnt_res, CLIENT *clnt)
 {
-	return (clnt_call(clnt, NFSPROC3_READDIR,
-		(xdrproc_t) xdr_READDIR3args, (caddr_t) &arg1,
-		(xdrproc_t) xdr_READDIR3res, (caddr_t) clnt_res,
-		TIMEOUT));
+    return (clnt_call(clnt, NFSPROC3_READDIR,
+        (xdrproc_t) xdr_READDIR3args, (caddr_t) &arg1,
+        (xdrproc_t) xdr_READDIR3res, (caddr_t) clnt_res,
+        TIMEOUT));
 }
 
-enum clnt_stat 
+enum clnt_stat
 nfsproc3_readdirplus_3(READDIRPLUS3args arg1, READDIRPLUS3res *clnt_res, CLIENT *clnt)
 {
-	return (clnt_call(clnt, NFSPROC3_READDIRPLUS,
-		(xdrproc_t) xdr_READDIRPLUS3args, (caddr_t) &arg1,
-		(xdrproc_t) xdr_READDIRPLUS3res, (caddr_t) clnt_res,
-		TIMEOUT));
+    return (clnt_call(clnt, NFSPROC3_READDIRPLUS,
+        (xdrproc_t) xdr_READDIRPLUS3args, (caddr_t) &arg1,
+        (xdrproc_t) xdr_READDIRPLUS3res, (caddr_t) clnt_res,
+        TIMEOUT));
 }
 
-enum clnt_stat 
+enum clnt_stat
 nfsproc3_fsstat_3(FSSTAT3args arg1, FSSTAT3res *clnt_res, CLIENT *clnt)
 {
-	return (clnt_call(clnt, NFSPROC3_FSSTAT,
-		(xdrproc_t) xdr_FSSTAT3args, (caddr_t) &arg1,
-		(xdrproc_t) xdr_FSSTAT3res, (caddr_t) clnt_res,
-		TIMEOUT));
+    return (clnt_call(clnt, NFSPROC3_FSSTAT,
+        (xdrproc_t) xdr_FSSTAT3args, (caddr_t) &arg1,
+        (xdrproc_t) xdr_FSSTAT3res, (caddr_t) clnt_res,
+        TIMEOUT));
 }
 
-enum clnt_stat 
+enum clnt_stat
 nfsproc3_fsinfo_3(FSINFO3args arg1, FSINFO3res *clnt_res, CLIENT *clnt)
 {
-	return (clnt_call(clnt, NFSPROC3_FSINFO,
-		(xdrproc_t) xdr_FSINFO3args, (caddr_t) &arg1,
-		(xdrproc_t) xdr_FSINFO3res, (caddr_t) clnt_res,
-		TIMEOUT));
+    return (clnt_call(clnt, NFSPROC3_FSINFO,
+        (xdrproc_t) xdr_FSINFO3args, (caddr_t) &arg1,
+        (xdrproc_t) xdr_FSINFO3res, (caddr_t) clnt_res,
+        TIMEOUT));
 }
 
-enum clnt_stat 
+enum clnt_stat
 nfsproc3_pathconf_3(PATHCONF3args arg1, PATHCONF3res *clnt_res, CLIENT *clnt)
 {
-	return (clnt_call(clnt, NFSPROC3_PATHCONF,
-		(xdrproc_t) xdr_PATHCONF3args, (caddr_t) &arg1,
-		(xdrproc_t) xdr_PATHCONF3res, (caddr_t) clnt_res,
-		TIMEOUT));
+    return (clnt_call(clnt, NFSPROC3_PATHCONF,
+        (xdrproc_t) xdr_PATHCONF3args, (caddr_t) &arg1,
+        (xdrproc_t) xdr_PATHCONF3res, (caddr_t) clnt_res,
+        TIMEOUT));
 }
 
-enum clnt_stat 
+enum clnt_stat
 nfsproc3_commit_3(COMMIT3args arg1, COMMIT3res *clnt_res, CLIENT *clnt)
 {
-	return (clnt_call(clnt, NFSPROC3_COMMIT,
-		(xdrproc_t) xdr_COMMIT3args, (caddr_t) &arg1,
-		(xdrproc_t) xdr_COMMIT3res, (caddr_t) clnt_res,
-		TIMEOUT));
+    return (clnt_call(clnt, NFSPROC3_COMMIT,
+        (xdrproc_t) xdr_COMMIT3args, (caddr_t) &arg1,
+        (xdrproc_t) xdr_COMMIT3res, (caddr_t) clnt_res,
+        TIMEOUT));
 }

+ 950 - 950
components/dfs/filesystems/nfs/nfs_xdr.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -19,1604 +19,1604 @@
 bool_t
 xdr_uint64(register XDR *xdrs, uint64 *objp)
 {
-	if (!xdr_u_longlong_t(xdrs, objp))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_u_longlong_t(xdrs, objp))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_int64(register XDR *xdrs, int64 *objp)
 {
-	if (!xdr_longlong_t(xdrs, objp))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_longlong_t(xdrs, objp))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_uint32(register XDR *xdrs, uint32 *objp)
 {
-	if (!xdr_u_long(xdrs, objp))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_u_long(xdrs, objp))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_int32(register XDR *xdrs, int32 *objp)
 {
-	if (!xdr_long(xdrs, objp))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_long(xdrs, objp))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_filename3(register XDR *xdrs, filename3 *objp)
 {
-	if (!xdr_string(xdrs, objp, ~0))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_string(xdrs, objp, ~0))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_nfspath3(register XDR *xdrs, nfspath3 *objp)
 {
-	if (!xdr_string(xdrs, objp, ~0))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_string(xdrs, objp, ~0))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_fileid3(register XDR *xdrs, fileid3 *objp)
 {
-	if (!xdr_uint64(xdrs, objp))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_uint64(xdrs, objp))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_cookie3(register XDR *xdrs, cookie3 *objp)
 {
-	if (!xdr_uint64(xdrs, objp))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_uint64(xdrs, objp))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_cookieverf3(register XDR *xdrs, cookieverf3 objp)
 {
-	if (!xdr_opaque(xdrs, objp, NFS3_COOKIEVERFSIZE))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_opaque(xdrs, objp, NFS3_COOKIEVERFSIZE))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_createverf3(register XDR *xdrs, createverf3 objp)
 {
-	if (!xdr_opaque(xdrs, objp, NFS3_CREATEVERFSIZE))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_opaque(xdrs, objp, NFS3_CREATEVERFSIZE))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_writeverf3(register XDR *xdrs, writeverf3 objp)
 {
-	if (!xdr_opaque(xdrs, objp, NFS3_WRITEVERFSIZE))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_opaque(xdrs, objp, NFS3_WRITEVERFSIZE))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_uid3(register XDR *xdrs, uid3 *objp)
 {
-	if (!xdr_uint32(xdrs, objp))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_uint32(xdrs, objp))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_gid3(register XDR *xdrs, gid3 *objp)
 {
-	if (!xdr_uint32(xdrs, objp))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_uint32(xdrs, objp))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_size3(register XDR *xdrs, size3 *objp)
 {
-	if (!xdr_uint64(xdrs, objp))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_uint64(xdrs, objp))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_offset3(register XDR *xdrs, offset3 *objp)
 {
-	if (!xdr_uint64(xdrs, objp))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_uint64(xdrs, objp))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_mode3(register XDR *xdrs, mode3 *objp)
 {
-	if (!xdr_uint32(xdrs, objp))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_uint32(xdrs, objp))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_count3(register XDR *xdrs, count3 *objp)
 {
-	if (!xdr_uint32(xdrs, objp))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_uint32(xdrs, objp))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_nfsstat3(register XDR *xdrs, nfsstat3 *objp)
 {
-	int enum_objp;
-	enum_objp = *objp;
-	if (!xdr_enum(xdrs, (enum_t *)objp))
-	{
-		*objp = (nfsstat3)enum_objp;
-		return (FALSE);
-	}
+    int enum_objp;
+    enum_objp = *objp;
+    if (!xdr_enum(xdrs, (enum_t *)objp))
+    {
+        *objp = (nfsstat3)enum_objp;
+        return (FALSE);
+    }
 
-	return (TRUE);
+    return (TRUE);
 }
 
 bool_t
 xdr_ftype3(register XDR *xdrs, ftype3 *objp)
 {
-	int enum_objp;
-	enum_objp = *objp;
-	if (!xdr_enum(xdrs, (enum_t *)objp))
-	{
-		*objp = (ftype3)enum_objp;
-		return (FALSE);
-	}
-	
-	return (TRUE);
+    int enum_objp;
+    enum_objp = *objp;
+    if (!xdr_enum(xdrs, (enum_t *)objp))
+    {
+        *objp = (ftype3)enum_objp;
+        return (FALSE);
+    }
+
+    return (TRUE);
 }
 
 bool_t
 xdr_stable_how(register XDR *xdrs, stable_how *objp)
 {
-	int enum_objp;
-	enum_objp = *objp;
-	if (!xdr_enum(xdrs, (enum_t *)objp))
-	{
-		*objp = (stable_how)enum_objp;
-		return (FALSE);
-	}
-	
-	return (TRUE);
+    int enum_objp;
+    enum_objp = *objp;
+    if (!xdr_enum(xdrs, (enum_t *)objp))
+    {
+        *objp = (stable_how)enum_objp;
+        return (FALSE);
+    }
+
+    return (TRUE);
 }
 
 bool_t
 xdr_createmode3(register XDR *xdrs, createmode3 *objp)
 {
-	int enum_objp;
-	enum_objp = *objp;
-	if (!xdr_enum(xdrs, (enum_t *)objp))
-	{
-		*objp = (createmode3)enum_objp;
-		return (FALSE);
-	}
-	
-	return (TRUE);
+    int enum_objp;
+    enum_objp = *objp;
+    if (!xdr_enum(xdrs, (enum_t *)objp))
+    {
+        *objp = (createmode3)enum_objp;
+        return (FALSE);
+    }
+
+    return (TRUE);
 }
 
 bool_t
 xdr_specdata3(register XDR *xdrs, specdata3 *objp)
 {
-	if (!xdr_uint32(xdrs, &objp->specdata1))
-		return (FALSE);
-	if (!xdr_uint32(xdrs, &objp->specdata2))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_uint32(xdrs, &objp->specdata1))
+        return (FALSE);
+    if (!xdr_uint32(xdrs, &objp->specdata2))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_nfs_fh3(register XDR *xdrs, nfs_fh3 *objp)
 {
-	if (!xdr_bytes(xdrs, (char **)&objp->data.data_val, (unsigned int *) &objp->data.data_len, NFS3_FHSIZE))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_bytes(xdrs, (char **)&objp->data.data_val, (unsigned int *) &objp->data.data_len, NFS3_FHSIZE))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_nfstime3(register XDR *xdrs, nfstime3 *objp)
 {
-	if (!xdr_uint32(xdrs, &objp->seconds))
-		return (FALSE);
-	if (!xdr_uint32(xdrs, &objp->nseconds))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_uint32(xdrs, &objp->seconds))
+        return (FALSE);
+    if (!xdr_uint32(xdrs, &objp->nseconds))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_fattr3(register XDR *xdrs, fattr3 *objp)
 {
-	if (!xdr_ftype3(xdrs, &objp->type))
-		return (FALSE);
-	if (!xdr_mode3(xdrs, &objp->mode))
-		return (FALSE);
-	if (!xdr_uint32(xdrs, &objp->nlink))
-		return (FALSE);
-	if (!xdr_uid3(xdrs, &objp->uid))
-		return (FALSE);
-	if (!xdr_gid3(xdrs, &objp->gid))
-		return (FALSE);
-	if (!xdr_size3(xdrs, &objp->size))
-		return (FALSE);
-	if (!xdr_size3(xdrs, &objp->used))
-		return (FALSE);
-	if (!xdr_specdata3(xdrs, &objp->rdev))
-		return (FALSE);
-	if (!xdr_uint64(xdrs, &objp->fsid))
-		return (FALSE);
-	if (!xdr_fileid3(xdrs, &objp->fileid))
-		return (FALSE);
-	if (!xdr_nfstime3(xdrs, &objp->atime))
-		return (FALSE);
-	if (!xdr_nfstime3(xdrs, &objp->mtime))
-		return (FALSE);
-	if (!xdr_nfstime3(xdrs, &objp->ctime))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_ftype3(xdrs, &objp->type))
+        return (FALSE);
+    if (!xdr_mode3(xdrs, &objp->mode))
+        return (FALSE);
+    if (!xdr_uint32(xdrs, &objp->nlink))
+        return (FALSE);
+    if (!xdr_uid3(xdrs, &objp->uid))
+        return (FALSE);
+    if (!xdr_gid3(xdrs, &objp->gid))
+        return (FALSE);
+    if (!xdr_size3(xdrs, &objp->size))
+        return (FALSE);
+    if (!xdr_size3(xdrs, &objp->used))
+        return (FALSE);
+    if (!xdr_specdata3(xdrs, &objp->rdev))
+        return (FALSE);
+    if (!xdr_uint64(xdrs, &objp->fsid))
+        return (FALSE);
+    if (!xdr_fileid3(xdrs, &objp->fileid))
+        return (FALSE);
+    if (!xdr_nfstime3(xdrs, &objp->atime))
+        return (FALSE);
+    if (!xdr_nfstime3(xdrs, &objp->mtime))
+        return (FALSE);
+    if (!xdr_nfstime3(xdrs, &objp->ctime))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_post_op_attr(register XDR *xdrs, post_op_attr *objp)
 {
-	if (!xdr_bool(xdrs, &objp->attributes_follow))
-		return (FALSE);
-	switch (objp->attributes_follow) {
-	case TRUE:
-		if (!xdr_fattr3(xdrs, &objp->post_op_attr_u.attributes))
-			return (FALSE);
-		break;
-	case FALSE:
-		break;
-	default:
-		return (FALSE);
-	}
-	return (TRUE);
+    if (!xdr_bool(xdrs, &objp->attributes_follow))
+        return (FALSE);
+    switch (objp->attributes_follow) {
+    case TRUE:
+        if (!xdr_fattr3(xdrs, &objp->post_op_attr_u.attributes))
+            return (FALSE);
+        break;
+    case FALSE:
+        break;
+    default:
+        return (FALSE);
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_wcc_attr(register XDR *xdrs, wcc_attr *objp)
 {
-	if (!xdr_size3(xdrs, &objp->size))
-		return (FALSE);
-	if (!xdr_nfstime3(xdrs, &objp->mtime))
-		return (FALSE);
-	if (!xdr_nfstime3(xdrs, &objp->ctime))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_size3(xdrs, &objp->size))
+        return (FALSE);
+    if (!xdr_nfstime3(xdrs, &objp->mtime))
+        return (FALSE);
+    if (!xdr_nfstime3(xdrs, &objp->ctime))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_pre_op_attr(register XDR *xdrs, pre_op_attr *objp)
 {
-	if (!xdr_bool(xdrs, &objp->attributes_follow))
-		return (FALSE);
-	switch (objp->attributes_follow) {
-	case TRUE:
-		if (!xdr_wcc_attr(xdrs, &objp->pre_op_attr_u.attributes))
-			return (FALSE);
-		break;
-	case FALSE:
-		break;
-	default:
-		return (FALSE);
-	}
-	return (TRUE);
+    if (!xdr_bool(xdrs, &objp->attributes_follow))
+        return (FALSE);
+    switch (objp->attributes_follow) {
+    case TRUE:
+        if (!xdr_wcc_attr(xdrs, &objp->pre_op_attr_u.attributes))
+            return (FALSE);
+        break;
+    case FALSE:
+        break;
+    default:
+        return (FALSE);
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_wcc_data(register XDR *xdrs, wcc_data *objp)
 {
-	if (!xdr_pre_op_attr(xdrs, &objp->before))
-		return (FALSE);
-	if (!xdr_post_op_attr(xdrs, &objp->after))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_pre_op_attr(xdrs, &objp->before))
+        return (FALSE);
+    if (!xdr_post_op_attr(xdrs, &objp->after))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_post_op_fh3(register XDR *xdrs, post_op_fh3 *objp)
 {
-	if (!xdr_bool(xdrs, &objp->handle_follows))
-		return (FALSE);
-	switch (objp->handle_follows) {
-	case TRUE:
-		if (!xdr_nfs_fh3(xdrs, &objp->post_op_fh3_u.handle))
-			return (FALSE);
-		break;
-	case FALSE:
-		break;
-	default:
-		return (FALSE);
-	}
-	return (TRUE);
+    if (!xdr_bool(xdrs, &objp->handle_follows))
+        return (FALSE);
+    switch (objp->handle_follows) {
+    case TRUE:
+        if (!xdr_nfs_fh3(xdrs, &objp->post_op_fh3_u.handle))
+            return (FALSE);
+        break;
+    case FALSE:
+        break;
+    default:
+        return (FALSE);
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_time_how(register XDR *xdrs, time_how *objp)
 {
-	int enum_objp;
-	enum_objp = *objp;
-	if (!xdr_enum(xdrs, (enum_t *)objp))
-	{
-		*objp = (time_how)enum_objp;
-		return (FALSE);
-	}
-	
-	return (TRUE);
+    int enum_objp;
+    enum_objp = *objp;
+    if (!xdr_enum(xdrs, (enum_t *)objp))
+    {
+        *objp = (time_how)enum_objp;
+        return (FALSE);
+    }
+
+    return (TRUE);
 }
 
 bool_t
 xdr_set_mode3(register XDR *xdrs, set_mode3 *objp)
 {
-	if (!xdr_bool(xdrs, &objp->set_it))
-		return (FALSE);
-	switch (objp->set_it) {
-	case TRUE:
-		if (!xdr_mode3(xdrs, &objp->set_mode3_u.mode))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_bool(xdrs, &objp->set_it))
+        return (FALSE);
+    switch (objp->set_it) {
+    case TRUE:
+        if (!xdr_mode3(xdrs, &objp->set_mode3_u.mode))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_set_uid3(register XDR *xdrs, set_uid3 *objp)
 {
-	if (!xdr_bool(xdrs, &objp->set_it))
-		return (FALSE);
-	switch (objp->set_it) {
-	case TRUE:
-		if (!xdr_uid3(xdrs, &objp->set_uid3_u.uid))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_bool(xdrs, &objp->set_it))
+        return (FALSE);
+    switch (objp->set_it) {
+    case TRUE:
+        if (!xdr_uid3(xdrs, &objp->set_uid3_u.uid))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_set_gid3(register XDR *xdrs, set_gid3 *objp)
 {
-	if (!xdr_bool(xdrs, &objp->set_it))
-		return (FALSE);
-	switch (objp->set_it) {
-	case TRUE:
-		if (!xdr_gid3(xdrs, &objp->set_gid3_u.gid))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_bool(xdrs, &objp->set_it))
+        return (FALSE);
+    switch (objp->set_it) {
+    case TRUE:
+        if (!xdr_gid3(xdrs, &objp->set_gid3_u.gid))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_set_size3(register XDR *xdrs, set_size3 *objp)
 {
-	if (!xdr_bool(xdrs, &objp->set_it))
-		return (FALSE);
-	switch (objp->set_it) {
-	case TRUE:
-		if (!xdr_size3(xdrs, &objp->set_size3_u.size))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_bool(xdrs, &objp->set_it))
+        return (FALSE);
+    switch (objp->set_it) {
+    case TRUE:
+        if (!xdr_size3(xdrs, &objp->set_size3_u.size))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_set_atime(register XDR *xdrs, set_atime *objp)
 {
-	if (!xdr_time_how(xdrs, &objp->set_it))
-		return (FALSE);
-	switch (objp->set_it) {
-	case SET_TO_CLIENT_TIME:
-		if (!xdr_nfstime3(xdrs, &objp->set_atime_u.atime))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_time_how(xdrs, &objp->set_it))
+        return (FALSE);
+    switch (objp->set_it) {
+    case SET_TO_CLIENT_TIME:
+        if (!xdr_nfstime3(xdrs, &objp->set_atime_u.atime))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_set_mtime(register XDR *xdrs, set_mtime *objp)
 {
-	if (!xdr_time_how(xdrs, &objp->set_it))
-		return (FALSE);
-	switch (objp->set_it) {
-	case SET_TO_CLIENT_TIME:
-		if (!xdr_nfstime3(xdrs, &objp->set_mtime_u.mtime))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_time_how(xdrs, &objp->set_it))
+        return (FALSE);
+    switch (objp->set_it) {
+    case SET_TO_CLIENT_TIME:
+        if (!xdr_nfstime3(xdrs, &objp->set_mtime_u.mtime))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_sattr3(register XDR *xdrs, sattr3 *objp)
 {
-	if (!xdr_set_mode3(xdrs, &objp->mode))
-		return (FALSE);
-	if (!xdr_set_uid3(xdrs, &objp->uid))
-		return (FALSE);
-	if (!xdr_set_gid3(xdrs, &objp->gid))
-		return (FALSE);
-	if (!xdr_set_size3(xdrs, &objp->size))
-		return (FALSE);
-	if (!xdr_set_atime(xdrs, &objp->atime))
-		return (FALSE);
-	if (!xdr_set_mtime(xdrs, &objp->mtime))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_set_mode3(xdrs, &objp->mode))
+        return (FALSE);
+    if (!xdr_set_uid3(xdrs, &objp->uid))
+        return (FALSE);
+    if (!xdr_set_gid3(xdrs, &objp->gid))
+        return (FALSE);
+    if (!xdr_set_size3(xdrs, &objp->size))
+        return (FALSE);
+    if (!xdr_set_atime(xdrs, &objp->atime))
+        return (FALSE);
+    if (!xdr_set_mtime(xdrs, &objp->mtime))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_diropargs3(register XDR *xdrs, diropargs3 *objp)
 {
-	if (!xdr_nfs_fh3(xdrs, &objp->dir))
-		return (FALSE);
-	if (!xdr_filename3(xdrs, &objp->name))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_nfs_fh3(xdrs, &objp->dir))
+        return (FALSE);
+    if (!xdr_filename3(xdrs, &objp->name))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_GETATTR3args(register XDR *xdrs, GETATTR3args *objp)
 {
-	if (!xdr_nfs_fh3(xdrs, &objp->object))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_nfs_fh3(xdrs, &objp->object))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_GETATTR3resok(register XDR *xdrs, GETATTR3resok *objp)
 {
-	if (!xdr_fattr3(xdrs, &objp->obj_attributes))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_fattr3(xdrs, &objp->obj_attributes))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_GETATTR3res(register XDR *xdrs, GETATTR3res *objp)
 {
-	if (!xdr_nfsstat3(xdrs, &objp->status))
-		return (FALSE);
-	switch (objp->status) {
-	case NFS3_OK:
-		if (!xdr_GETATTR3resok(xdrs, &objp->GETATTR3res_u.resok))
-			return (FALSE);
-		break;
-	default :
-		return (FALSE);
-	}
-	return (TRUE);
+    if (!xdr_nfsstat3(xdrs, &objp->status))
+        return (FALSE);
+    switch (objp->status) {
+    case NFS3_OK:
+        if (!xdr_GETATTR3resok(xdrs, &objp->GETATTR3res_u.resok))
+            return (FALSE);
+        break;
+    default :
+        return (FALSE);
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_sattrguard3(register XDR *xdrs, sattrguard3 *objp)
 {
-	if (!xdr_bool(xdrs, &objp->check))
-		return (FALSE);
-	switch (objp->check) {
-	case TRUE:
-		if (!xdr_nfstime3(xdrs, &objp->sattrguard3_u.obj_ctime))
-			return (FALSE);
-		break;
-	case FALSE:
-		break;
-	default:
-		return (FALSE);
-	}
-	return (TRUE);
+    if (!xdr_bool(xdrs, &objp->check))
+        return (FALSE);
+    switch (objp->check) {
+    case TRUE:
+        if (!xdr_nfstime3(xdrs, &objp->sattrguard3_u.obj_ctime))
+            return (FALSE);
+        break;
+    case FALSE:
+        break;
+    default:
+        return (FALSE);
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_SETATTR3args(register XDR *xdrs, SETATTR3args *objp)
 {
-	if (!xdr_nfs_fh3(xdrs, &objp->object))
-		return (FALSE);
-	if (!xdr_sattr3(xdrs, &objp->new_attributes))
-		return (FALSE);
-	if (!xdr_sattrguard3(xdrs, &objp->guard))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_nfs_fh3(xdrs, &objp->object))
+        return (FALSE);
+    if (!xdr_sattr3(xdrs, &objp->new_attributes))
+        return (FALSE);
+    if (!xdr_sattrguard3(xdrs, &objp->guard))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_SETATTR3resok(register XDR *xdrs, SETATTR3resok *objp)
 {
-	if (!xdr_wcc_data(xdrs, &objp->obj_wcc))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_wcc_data(xdrs, &objp->obj_wcc))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_SETATTR3resfail(register XDR *xdrs, SETATTR3resfail *objp)
 {
-	if (!xdr_wcc_data(xdrs, &objp->obj_wcc))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_wcc_data(xdrs, &objp->obj_wcc))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_SETATTR3res(register XDR *xdrs, SETATTR3res *objp)
 {
-	if (!xdr_nfsstat3(xdrs, &objp->status))
-		return (FALSE);
-	switch (objp->status) {
-	case NFS3_OK:
-		if (!xdr_SETATTR3resok(xdrs, &objp->SETATTR3res_u.resok))
-			return (FALSE);
-		break;
-	default:
-		if (!xdr_SETATTR3resfail(xdrs, &objp->SETATTR3res_u.resfail))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_nfsstat3(xdrs, &objp->status))
+        return (FALSE);
+    switch (objp->status) {
+    case NFS3_OK:
+        if (!xdr_SETATTR3resok(xdrs, &objp->SETATTR3res_u.resok))
+            return (FALSE);
+        break;
+    default:
+        if (!xdr_SETATTR3resfail(xdrs, &objp->SETATTR3res_u.resfail))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_LOOKUP3args(register XDR *xdrs, LOOKUP3args *objp)
 {
-	if (!xdr_diropargs3(xdrs, &objp->what))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_diropargs3(xdrs, &objp->what))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_LOOKUP3resok(register XDR *xdrs, LOOKUP3resok *objp)
 {
-	if (!xdr_nfs_fh3(xdrs, &objp->object))
-		return (FALSE);
-	if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
-		return (FALSE);
-	if (!xdr_post_op_attr(xdrs, &objp->dir_attributes))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_nfs_fh3(xdrs, &objp->object))
+        return (FALSE);
+    if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
+        return (FALSE);
+    if (!xdr_post_op_attr(xdrs, &objp->dir_attributes))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_LOOKUP3resfail(register XDR *xdrs, LOOKUP3resfail *objp)
 {
-	if (!xdr_post_op_attr(xdrs, &objp->dir_attributes))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_post_op_attr(xdrs, &objp->dir_attributes))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_LOOKUP3res(register XDR *xdrs, LOOKUP3res *objp)
 {
-	if (!xdr_nfsstat3(xdrs, &objp->status))
-		return (FALSE);
-	switch (objp->status) {
-	case NFS3_OK:
-		if (!xdr_LOOKUP3resok(xdrs, &objp->LOOKUP3res_u.resok))
-			return (FALSE);
-		break;
-	default:
-		if (!xdr_LOOKUP3resfail(xdrs, &objp->LOOKUP3res_u.resfail))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_nfsstat3(xdrs, &objp->status))
+        return (FALSE);
+    switch (objp->status) {
+    case NFS3_OK:
+        if (!xdr_LOOKUP3resok(xdrs, &objp->LOOKUP3res_u.resok))
+            return (FALSE);
+        break;
+    default:
+        if (!xdr_LOOKUP3resfail(xdrs, &objp->LOOKUP3res_u.resfail))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_ACCESS3args(register XDR *xdrs, ACCESS3args *objp)
 {
-	if (!xdr_nfs_fh3(xdrs, &objp->object))
-		return (FALSE);
-	if (!xdr_uint32(xdrs, &objp->access))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_nfs_fh3(xdrs, &objp->object))
+        return (FALSE);
+    if (!xdr_uint32(xdrs, &objp->access))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_ACCESS3resok(register XDR *xdrs, ACCESS3resok *objp)
 {
-	if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
-		return (FALSE);
-	if (!xdr_uint32(xdrs, &objp->access))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
+        return (FALSE);
+    if (!xdr_uint32(xdrs, &objp->access))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_ACCESS3resfail(register XDR *xdrs, ACCESS3resfail *objp)
 {
-	if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_ACCESS3res(register XDR *xdrs, ACCESS3res *objp)
 {
-	if (!xdr_nfsstat3(xdrs, &objp->status))
-		return (FALSE);
-	switch (objp->status) {
-	case NFS3_OK:
-		if (!xdr_ACCESS3resok(xdrs, &objp->ACCESS3res_u.resok))
-			return (FALSE);
-		break;
-	default:
-		if (!xdr_ACCESS3resfail(xdrs, &objp->ACCESS3res_u.resfail))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_nfsstat3(xdrs, &objp->status))
+        return (FALSE);
+    switch (objp->status) {
+    case NFS3_OK:
+        if (!xdr_ACCESS3resok(xdrs, &objp->ACCESS3res_u.resok))
+            return (FALSE);
+        break;
+    default:
+        if (!xdr_ACCESS3resfail(xdrs, &objp->ACCESS3res_u.resfail))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_READLINK3args(register XDR *xdrs, READLINK3args *objp)
 {
-	if (!xdr_nfs_fh3(xdrs, &objp->symlink))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_nfs_fh3(xdrs, &objp->symlink))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_READLINK3resok(register XDR *xdrs, READLINK3resok *objp)
 {
-	if (!xdr_post_op_attr(xdrs, &objp->symlink_attributes))
-		return (FALSE);
-	if (!xdr_nfspath3(xdrs, &objp->data))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_post_op_attr(xdrs, &objp->symlink_attributes))
+        return (FALSE);
+    if (!xdr_nfspath3(xdrs, &objp->data))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_READLINK3resfail(register XDR *xdrs, READLINK3resfail *objp)
 {
-	if (!xdr_post_op_attr(xdrs, &objp->symlink_attributes))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_post_op_attr(xdrs, &objp->symlink_attributes))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_READLINK3res(register XDR *xdrs, READLINK3res *objp)
 {
-	if (!xdr_nfsstat3(xdrs, &objp->status))
-		return (FALSE);
-	switch (objp->status) {
-	case NFS3_OK:
-		if (!xdr_READLINK3resok(xdrs, &objp->READLINK3res_u.resok))
-			return (FALSE);
-		break;
-	default:
-		if (!xdr_READLINK3resfail(xdrs, &objp->READLINK3res_u.resfail))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_nfsstat3(xdrs, &objp->status))
+        return (FALSE);
+    switch (objp->status) {
+    case NFS3_OK:
+        if (!xdr_READLINK3resok(xdrs, &objp->READLINK3res_u.resok))
+            return (FALSE);
+        break;
+    default:
+        if (!xdr_READLINK3resfail(xdrs, &objp->READLINK3res_u.resfail))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_READ3args(register XDR *xdrs, READ3args *objp)
 {
-	if (!xdr_nfs_fh3(xdrs, &objp->file))
-		return (FALSE);
-	if (!xdr_offset3(xdrs, &objp->offset))
-		return (FALSE);
-	if (!xdr_count3(xdrs, &objp->count))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_nfs_fh3(xdrs, &objp->file))
+        return (FALSE);
+    if (!xdr_offset3(xdrs, &objp->offset))
+        return (FALSE);
+    if (!xdr_count3(xdrs, &objp->count))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_READ3resok(register XDR *xdrs, READ3resok *objp)
 {
-	if (!xdr_post_op_attr(xdrs, &objp->file_attributes))
-		return (FALSE);
-	if (!xdr_count3(xdrs, &objp->count))
-		return (FALSE);
-	if (!xdr_bool(xdrs, &objp->eof))
-		return (FALSE);
-	if (!xdr_bytes(xdrs, (char **)&objp->data.data_val, (unsigned int *) &objp->data.data_len, ~0))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_post_op_attr(xdrs, &objp->file_attributes))
+        return (FALSE);
+    if (!xdr_count3(xdrs, &objp->count))
+        return (FALSE);
+    if (!xdr_bool(xdrs, &objp->eof))
+        return (FALSE);
+    if (!xdr_bytes(xdrs, (char **)&objp->data.data_val, (unsigned int *) &objp->data.data_len, ~0))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_READ3resfail(register XDR *xdrs, READ3resfail *objp)
 {
-	if (!xdr_post_op_attr(xdrs, &objp->file_attributes))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_post_op_attr(xdrs, &objp->file_attributes))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_READ3res(register XDR *xdrs, READ3res *objp)
 {
-	if (!xdr_nfsstat3(xdrs, &objp->status))
-		return (FALSE);
-	switch (objp->status) {
-	case NFS3_OK:
-		if (!xdr_READ3resok(xdrs, &objp->READ3res_u.resok))
-			return (FALSE);
-		break;
-	default:
-		if (!xdr_READ3resfail(xdrs, &objp->READ3res_u.resfail))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_nfsstat3(xdrs, &objp->status))
+        return (FALSE);
+    switch (objp->status) {
+    case NFS3_OK:
+        if (!xdr_READ3resok(xdrs, &objp->READ3res_u.resok))
+            return (FALSE);
+        break;
+    default:
+        if (!xdr_READ3resfail(xdrs, &objp->READ3res_u.resfail))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_WRITE3args(register XDR *xdrs, WRITE3args *objp)
 {
-	if (!xdr_nfs_fh3(xdrs, &objp->file))
-		return (FALSE);
-	if (!xdr_offset3(xdrs, &objp->offset))
-		return (FALSE);
-	if (!xdr_count3(xdrs, &objp->count))
-		return (FALSE);
-	if (!xdr_stable_how(xdrs, &objp->stable))
-		return (FALSE);
-	if (!xdr_bytes(xdrs, (char **)&objp->data.data_val, (unsigned int *) &objp->data.data_len, ~0))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_nfs_fh3(xdrs, &objp->file))
+        return (FALSE);
+    if (!xdr_offset3(xdrs, &objp->offset))
+        return (FALSE);
+    if (!xdr_count3(xdrs, &objp->count))
+        return (FALSE);
+    if (!xdr_stable_how(xdrs, &objp->stable))
+        return (FALSE);
+    if (!xdr_bytes(xdrs, (char **)&objp->data.data_val, (unsigned int *) &objp->data.data_len, ~0))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_WRITE3resok(register XDR *xdrs, WRITE3resok *objp)
 {
-	if (!xdr_wcc_data(xdrs, &objp->file_wcc))
-		return (FALSE);
-	if (!xdr_count3(xdrs, &objp->count))
-		return (FALSE);
-	if (!xdr_stable_how(xdrs, &objp->committed))
-		return (FALSE);
-	if (!xdr_writeverf3(xdrs, objp->verf))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_wcc_data(xdrs, &objp->file_wcc))
+        return (FALSE);
+    if (!xdr_count3(xdrs, &objp->count))
+        return (FALSE);
+    if (!xdr_stable_how(xdrs, &objp->committed))
+        return (FALSE);
+    if (!xdr_writeverf3(xdrs, objp->verf))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_WRITE3resfail(register XDR *xdrs, WRITE3resfail *objp)
 {
-	if (!xdr_wcc_data(xdrs, &objp->file_wcc))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_wcc_data(xdrs, &objp->file_wcc))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_WRITE3res(register XDR *xdrs, WRITE3res *objp)
 {
-	if (!xdr_nfsstat3(xdrs, &objp->status))
-		return (FALSE);
-	switch (objp->status) {
-	case NFS3_OK:
-		if (!xdr_WRITE3resok(xdrs, &objp->WRITE3res_u.resok))
-			return (FALSE);
-		break;
-	default:
-		if (!xdr_WRITE3resfail(xdrs, &objp->WRITE3res_u.resfail))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_nfsstat3(xdrs, &objp->status))
+        return (FALSE);
+    switch (objp->status) {
+    case NFS3_OK:
+        if (!xdr_WRITE3resok(xdrs, &objp->WRITE3res_u.resok))
+            return (FALSE);
+        break;
+    default:
+        if (!xdr_WRITE3resfail(xdrs, &objp->WRITE3res_u.resfail))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_createhow3(register XDR *xdrs, createhow3 *objp)
 {
-	if (!xdr_createmode3(xdrs, &objp->mode))
-		return (FALSE);
-	switch (objp->mode) {
-	case UNCHECKED:
-	case GUARDED:
-		if (!xdr_sattr3(xdrs, &objp->createhow3_u.obj_attributes))
-			return (FALSE);
-		break;
-	case EXCLUSIVE:
-		if (!xdr_createverf3(xdrs, objp->createhow3_u.verf))
-			return (FALSE);
-		break;
-	default:
-		return (FALSE);
-	}
-	return (TRUE);
+    if (!xdr_createmode3(xdrs, &objp->mode))
+        return (FALSE);
+    switch (objp->mode) {
+    case UNCHECKED:
+    case GUARDED:
+        if (!xdr_sattr3(xdrs, &objp->createhow3_u.obj_attributes))
+            return (FALSE);
+        break;
+    case EXCLUSIVE:
+        if (!xdr_createverf3(xdrs, objp->createhow3_u.verf))
+            return (FALSE);
+        break;
+    default:
+        return (FALSE);
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_CREATE3args(register XDR *xdrs, CREATE3args *objp)
 {
-	if (!xdr_diropargs3(xdrs, &objp->where))
-		return (FALSE);
-	if (!xdr_createhow3(xdrs, &objp->how))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_diropargs3(xdrs, &objp->where))
+        return (FALSE);
+    if (!xdr_createhow3(xdrs, &objp->how))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_CREATE3resok(register XDR *xdrs, CREATE3resok *objp)
 {
-	if (!xdr_post_op_fh3(xdrs, &objp->obj))
-		return (FALSE);
-	if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
-		return (FALSE);
-	if (!xdr_wcc_data(xdrs, &objp->dir_wcc))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_post_op_fh3(xdrs, &objp->obj))
+        return (FALSE);
+    if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
+        return (FALSE);
+    if (!xdr_wcc_data(xdrs, &objp->dir_wcc))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_CREATE3resfail(register XDR *xdrs, CREATE3resfail *objp)
 {
-	if (!xdr_wcc_data(xdrs, &objp->dir_wcc))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_wcc_data(xdrs, &objp->dir_wcc))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_CREATE3res(register XDR *xdrs, CREATE3res *objp)
 {
-	if (!xdr_nfsstat3(xdrs, &objp->status))
-		return (FALSE);
-	switch (objp->status) {
-	case NFS3_OK:
-		if (!xdr_CREATE3resok(xdrs, &objp->CREATE3res_u.resok))
-			return (FALSE);
-		break;
-	default:
-		if (!xdr_CREATE3resfail(xdrs, &objp->CREATE3res_u.resfail))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_nfsstat3(xdrs, &objp->status))
+        return (FALSE);
+    switch (objp->status) {
+    case NFS3_OK:
+        if (!xdr_CREATE3resok(xdrs, &objp->CREATE3res_u.resok))
+            return (FALSE);
+        break;
+    default:
+        if (!xdr_CREATE3resfail(xdrs, &objp->CREATE3res_u.resfail))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_MKDIR3args(register XDR *xdrs, MKDIR3args *objp)
 {
-	if (!xdr_diropargs3(xdrs, &objp->where))
-		return (FALSE);
-	if (!xdr_sattr3(xdrs, &objp->attributes))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_diropargs3(xdrs, &objp->where))
+        return (FALSE);
+    if (!xdr_sattr3(xdrs, &objp->attributes))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_MKDIR3resok(register XDR *xdrs, MKDIR3resok *objp)
 {
-	if (!xdr_post_op_fh3(xdrs, &objp->obj))
-		return (FALSE);
-	if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
-		return (FALSE);
-	if (!xdr_wcc_data(xdrs, &objp->dir_wcc))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_post_op_fh3(xdrs, &objp->obj))
+        return (FALSE);
+    if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
+        return (FALSE);
+    if (!xdr_wcc_data(xdrs, &objp->dir_wcc))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_MKDIR3resfail(register XDR *xdrs, MKDIR3resfail *objp)
 {
-	if (!xdr_wcc_data(xdrs, &objp->dir_wcc))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_wcc_data(xdrs, &objp->dir_wcc))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_MKDIR3res(register XDR *xdrs, MKDIR3res *objp)
 {
-	if (!xdr_nfsstat3(xdrs, &objp->status))
-		return (FALSE);
-	switch (objp->status) {
-	case NFS3_OK:
-		if (!xdr_MKDIR3resok(xdrs, &objp->MKDIR3res_u.resok))
-			return (FALSE);
-		break;
-	default:
-		if (!xdr_MKDIR3resfail(xdrs, &objp->MKDIR3res_u.resfail))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_nfsstat3(xdrs, &objp->status))
+        return (FALSE);
+    switch (objp->status) {
+    case NFS3_OK:
+        if (!xdr_MKDIR3resok(xdrs, &objp->MKDIR3res_u.resok))
+            return (FALSE);
+        break;
+    default:
+        if (!xdr_MKDIR3resfail(xdrs, &objp->MKDIR3res_u.resfail))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_symlinkdata3(register XDR *xdrs, symlinkdata3 *objp)
 {
-	if (!xdr_sattr3(xdrs, &objp->symlink_attributes))
-		return (FALSE);
-	if (!xdr_nfspath3(xdrs, &objp->symlink_data))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_sattr3(xdrs, &objp->symlink_attributes))
+        return (FALSE);
+    if (!xdr_nfspath3(xdrs, &objp->symlink_data))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_SYMLINK3args(register XDR *xdrs, SYMLINK3args *objp)
 {
-	if (!xdr_diropargs3(xdrs, &objp->where))
-		return (FALSE);
-	if (!xdr_symlinkdata3(xdrs, &objp->symlink))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_diropargs3(xdrs, &objp->where))
+        return (FALSE);
+    if (!xdr_symlinkdata3(xdrs, &objp->symlink))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_SYMLINK3resok(register XDR *xdrs, SYMLINK3resok *objp)
 {
-	if (!xdr_post_op_fh3(xdrs, &objp->obj))
-		return (FALSE);
-	if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
-		return (FALSE);
-	if (!xdr_wcc_data(xdrs, &objp->dir_wcc))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_post_op_fh3(xdrs, &objp->obj))
+        return (FALSE);
+    if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
+        return (FALSE);
+    if (!xdr_wcc_data(xdrs, &objp->dir_wcc))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_SYMLINK3resfail(register XDR *xdrs, SYMLINK3resfail *objp)
 {
-	if (!xdr_wcc_data(xdrs, &objp->dir_wcc))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_wcc_data(xdrs, &objp->dir_wcc))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_SYMLINK3res(register XDR *xdrs, SYMLINK3res *objp)
 {
-	if (!xdr_nfsstat3(xdrs, &objp->status))
-		return (FALSE);
-	switch (objp->status) {
-	case NFS3_OK:
-		if (!xdr_SYMLINK3resok(xdrs, &objp->SYMLINK3res_u.resok))
-			return (FALSE);
-		break;
-	default:
-		if (!xdr_SYMLINK3resfail(xdrs, &objp->SYMLINK3res_u.resfail))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_nfsstat3(xdrs, &objp->status))
+        return (FALSE);
+    switch (objp->status) {
+    case NFS3_OK:
+        if (!xdr_SYMLINK3resok(xdrs, &objp->SYMLINK3res_u.resok))
+            return (FALSE);
+        break;
+    default:
+        if (!xdr_SYMLINK3resfail(xdrs, &objp->SYMLINK3res_u.resfail))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_devicedata3(register XDR *xdrs, devicedata3 *objp)
 {
-	if (!xdr_sattr3(xdrs, &objp->dev_attributes))
-		return (FALSE);
-	if (!xdr_specdata3(xdrs, &objp->spec))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_sattr3(xdrs, &objp->dev_attributes))
+        return (FALSE);
+    if (!xdr_specdata3(xdrs, &objp->spec))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_mknoddata3(register XDR *xdrs, mknoddata3 *objp)
 {
-	if (!xdr_ftype3(xdrs, &objp->type))
-		return (FALSE);
-	switch (objp->type) {
-	case NFS3CHR:
-	case NFS3BLK:
-		if (!xdr_devicedata3(xdrs, &objp->mknoddata3_u.device))
-			return (FALSE);
-		break;
-	case NFS3SOCK:
-	case NFS3FIFO:
-		if (!xdr_sattr3(xdrs, &objp->mknoddata3_u.pipe_attributes))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_ftype3(xdrs, &objp->type))
+        return (FALSE);
+    switch (objp->type) {
+    case NFS3CHR:
+    case NFS3BLK:
+        if (!xdr_devicedata3(xdrs, &objp->mknoddata3_u.device))
+            return (FALSE);
+        break;
+    case NFS3SOCK:
+    case NFS3FIFO:
+        if (!xdr_sattr3(xdrs, &objp->mknoddata3_u.pipe_attributes))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_MKNOD3args(register XDR *xdrs, MKNOD3args *objp)
 {
-	if (!xdr_diropargs3(xdrs, &objp->where))
-		return (FALSE);
-	if (!xdr_mknoddata3(xdrs, &objp->what))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_diropargs3(xdrs, &objp->where))
+        return (FALSE);
+    if (!xdr_mknoddata3(xdrs, &objp->what))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_MKNOD3resok(register XDR *xdrs, MKNOD3resok *objp)
 {
-	if (!xdr_post_op_fh3(xdrs, &objp->obj))
-		return (FALSE);
-	if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
-		return (FALSE);
-	if (!xdr_wcc_data(xdrs, &objp->dir_wcc))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_post_op_fh3(xdrs, &objp->obj))
+        return (FALSE);
+    if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
+        return (FALSE);
+    if (!xdr_wcc_data(xdrs, &objp->dir_wcc))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_MKNOD3resfail(register XDR *xdrs, MKNOD3resfail *objp)
 {
-	if (!xdr_wcc_data(xdrs, &objp->dir_wcc))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_wcc_data(xdrs, &objp->dir_wcc))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_MKNOD3res(register XDR *xdrs, MKNOD3res *objp)
 {
-	if (!xdr_nfsstat3(xdrs, &objp->status))
-		return (FALSE);
-	switch (objp->status) {
-	case NFS3_OK:
-		if (!xdr_MKNOD3resok(xdrs, &objp->MKNOD3res_u.resok))
-			return (FALSE);
-		break;
-	default:
-		if (!xdr_MKNOD3resfail(xdrs, &objp->MKNOD3res_u.resfail))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_nfsstat3(xdrs, &objp->status))
+        return (FALSE);
+    switch (objp->status) {
+    case NFS3_OK:
+        if (!xdr_MKNOD3resok(xdrs, &objp->MKNOD3res_u.resok))
+            return (FALSE);
+        break;
+    default:
+        if (!xdr_MKNOD3resfail(xdrs, &objp->MKNOD3res_u.resfail))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_REMOVE3args(register XDR *xdrs, REMOVE3args *objp)
 {
-	if (!xdr_diropargs3(xdrs, &objp->object))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_diropargs3(xdrs, &objp->object))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_REMOVE3resok(register XDR *xdrs, REMOVE3resok *objp)
 {
-	if (!xdr_wcc_data(xdrs, &objp->dir_wcc))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_wcc_data(xdrs, &objp->dir_wcc))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_REMOVE3resfail(register XDR *xdrs, REMOVE3resfail *objp)
 {
-	if (!xdr_wcc_data(xdrs, &objp->dir_wcc))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_wcc_data(xdrs, &objp->dir_wcc))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_REMOVE3res(register XDR *xdrs, REMOVE3res *objp)
 {
-	if (!xdr_nfsstat3(xdrs, &objp->status))
-		return (FALSE);
-	switch (objp->status) {
-	case NFS3_OK:
-		if (!xdr_REMOVE3resok(xdrs, &objp->REMOVE3res_u.resok))
-			return (FALSE);
-		break;
-	default:
-		if (!xdr_REMOVE3resfail(xdrs, &objp->REMOVE3res_u.resfail))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_nfsstat3(xdrs, &objp->status))
+        return (FALSE);
+    switch (objp->status) {
+    case NFS3_OK:
+        if (!xdr_REMOVE3resok(xdrs, &objp->REMOVE3res_u.resok))
+            return (FALSE);
+        break;
+    default:
+        if (!xdr_REMOVE3resfail(xdrs, &objp->REMOVE3res_u.resfail))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_RMDIR3args(register XDR *xdrs, RMDIR3args *objp)
 {
-	if (!xdr_diropargs3(xdrs, &objp->object))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_diropargs3(xdrs, &objp->object))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_RMDIR3resok(register XDR *xdrs, RMDIR3resok *objp)
 {
-	if (!xdr_wcc_data(xdrs, &objp->dir_wcc))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_wcc_data(xdrs, &objp->dir_wcc))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_RMDIR3resfail(register XDR *xdrs, RMDIR3resfail *objp)
 {
-	if (!xdr_wcc_data(xdrs, &objp->dir_wcc))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_wcc_data(xdrs, &objp->dir_wcc))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_RMDIR3res(register XDR *xdrs, RMDIR3res *objp)
 {
-	if (!xdr_nfsstat3(xdrs, &objp->status))
-		return (FALSE);
-	switch (objp->status) {
-	case NFS3_OK:
-		if (!xdr_RMDIR3resok(xdrs, &objp->RMDIR3res_u.resok))
-			return (FALSE);
-		break;
-	default:
-		if (!xdr_RMDIR3resfail(xdrs, &objp->RMDIR3res_u.resfail))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_nfsstat3(xdrs, &objp->status))
+        return (FALSE);
+    switch (objp->status) {
+    case NFS3_OK:
+        if (!xdr_RMDIR3resok(xdrs, &objp->RMDIR3res_u.resok))
+            return (FALSE);
+        break;
+    default:
+        if (!xdr_RMDIR3resfail(xdrs, &objp->RMDIR3res_u.resfail))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_RENAME3args(register XDR *xdrs, RENAME3args *objp)
 {
-	if (!xdr_diropargs3(xdrs, &objp->from))
-		return (FALSE);
-	if (!xdr_diropargs3(xdrs, &objp->to))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_diropargs3(xdrs, &objp->from))
+        return (FALSE);
+    if (!xdr_diropargs3(xdrs, &objp->to))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_RENAME3resok(register XDR *xdrs, RENAME3resok *objp)
 {
-	if (!xdr_wcc_data(xdrs, &objp->fromdir_wcc))
-		return (FALSE);
-	if (!xdr_wcc_data(xdrs, &objp->todir_wcc))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_wcc_data(xdrs, &objp->fromdir_wcc))
+        return (FALSE);
+    if (!xdr_wcc_data(xdrs, &objp->todir_wcc))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_RENAME3resfail(register XDR *xdrs, RENAME3resfail *objp)
 {
-	if (!xdr_wcc_data(xdrs, &objp->fromdir_wcc))
-		return (FALSE);
-	if (!xdr_wcc_data(xdrs, &objp->todir_wcc))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_wcc_data(xdrs, &objp->fromdir_wcc))
+        return (FALSE);
+    if (!xdr_wcc_data(xdrs, &objp->todir_wcc))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_RENAME3res(register XDR *xdrs, RENAME3res *objp)
 {
-	if (!xdr_nfsstat3(xdrs, &objp->status))
-		return (FALSE);
-	switch (objp->status) {
-	case NFS3_OK:
-		if (!xdr_RENAME3resok(xdrs, &objp->RENAME3res_u.resok))
-			return (FALSE);
-		break;
-	default:
-		if (!xdr_RENAME3resfail(xdrs, &objp->RENAME3res_u.resfail))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_nfsstat3(xdrs, &objp->status))
+        return (FALSE);
+    switch (objp->status) {
+    case NFS3_OK:
+        if (!xdr_RENAME3resok(xdrs, &objp->RENAME3res_u.resok))
+            return (FALSE);
+        break;
+    default:
+        if (!xdr_RENAME3resfail(xdrs, &objp->RENAME3res_u.resfail))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_LINK3args(register XDR *xdrs, LINK3args *objp)
 {
-	if (!xdr_nfs_fh3(xdrs, &objp->file))
-		return (FALSE);
-	if (!xdr_diropargs3(xdrs, &objp->link))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_nfs_fh3(xdrs, &objp->file))
+        return (FALSE);
+    if (!xdr_diropargs3(xdrs, &objp->link))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_LINK3resok(register XDR *xdrs, LINK3resok *objp)
 {
-	if (!xdr_post_op_attr(xdrs, &objp->file_attributes))
-		return (FALSE);
-	if (!xdr_wcc_data(xdrs, &objp->linkdir_wcc))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_post_op_attr(xdrs, &objp->file_attributes))
+        return (FALSE);
+    if (!xdr_wcc_data(xdrs, &objp->linkdir_wcc))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_LINK3resfail(register XDR *xdrs, LINK3resfail *objp)
 {
-	if (!xdr_post_op_attr(xdrs, &objp->file_attributes))
-		return (FALSE);
-	if (!xdr_wcc_data(xdrs, &objp->linkdir_wcc))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_post_op_attr(xdrs, &objp->file_attributes))
+        return (FALSE);
+    if (!xdr_wcc_data(xdrs, &objp->linkdir_wcc))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_LINK3res(register XDR *xdrs, LINK3res *objp)
 {
-	if (!xdr_nfsstat3(xdrs, &objp->status))
-		return (FALSE);
-	switch (objp->status) {
-	case NFS3_OK:
-		if (!xdr_LINK3resok(xdrs, &objp->LINK3res_u.resok))
-			return (FALSE);
-		break;
-	default:
-		if (!xdr_LINK3resfail(xdrs, &objp->LINK3res_u.resfail))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_nfsstat3(xdrs, &objp->status))
+        return (FALSE);
+    switch (objp->status) {
+    case NFS3_OK:
+        if (!xdr_LINK3resok(xdrs, &objp->LINK3res_u.resok))
+            return (FALSE);
+        break;
+    default:
+        if (!xdr_LINK3resfail(xdrs, &objp->LINK3res_u.resfail))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_READDIR3args(register XDR *xdrs, READDIR3args *objp)
 {
-	if (!xdr_nfs_fh3(xdrs, &objp->dir))
-		return (FALSE);
-	if (!xdr_cookie3(xdrs, &objp->cookie))
-		return (FALSE);
-	if (!xdr_cookieverf3(xdrs, objp->cookieverf))
-		return (FALSE);
-	if (!xdr_count3(xdrs, &objp->count))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_nfs_fh3(xdrs, &objp->dir))
+        return (FALSE);
+    if (!xdr_cookie3(xdrs, &objp->cookie))
+        return (FALSE);
+    if (!xdr_cookieverf3(xdrs, objp->cookieverf))
+        return (FALSE);
+    if (!xdr_count3(xdrs, &objp->count))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_entry3(register XDR *xdrs, entry3 *objp)
 {
-	if (!xdr_fileid3(xdrs, &objp->fileid))
-		return (FALSE);
-	if (!xdr_filename3(xdrs, &objp->name))
-		return (FALSE);
-	if (!xdr_cookie3(xdrs, &objp->cookie))
-		return (FALSE);
-	if (!xdr_pointer(xdrs, (char **)&objp->nextentry, sizeof (entry3), (xdrproc_t) xdr_entry3))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_fileid3(xdrs, &objp->fileid))
+        return (FALSE);
+    if (!xdr_filename3(xdrs, &objp->name))
+        return (FALSE);
+    if (!xdr_cookie3(xdrs, &objp->cookie))
+        return (FALSE);
+    if (!xdr_pointer(xdrs, (char **)&objp->nextentry, sizeof (entry3), (xdrproc_t) xdr_entry3))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_dirlist3(register XDR *xdrs, dirlist3 *objp)
 {
-	if (!xdr_pointer(xdrs, (char **)&objp->entries, sizeof (entry3), (xdrproc_t) xdr_entry3))
-		return (FALSE);
-	if (!xdr_bool(xdrs, &objp->eof))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_pointer(xdrs, (char **)&objp->entries, sizeof (entry3), (xdrproc_t) xdr_entry3))
+        return (FALSE);
+    if (!xdr_bool(xdrs, &objp->eof))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_READDIR3resok(register XDR *xdrs, READDIR3resok *objp)
 {
-	if (!xdr_post_op_attr(xdrs, &objp->dir_attributes))
-		return (FALSE);
-	if (!xdr_cookieverf3(xdrs, objp->cookieverf))
-		return (FALSE);
-	if (!xdr_dirlist3(xdrs, &objp->reply))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_post_op_attr(xdrs, &objp->dir_attributes))
+        return (FALSE);
+    if (!xdr_cookieverf3(xdrs, objp->cookieverf))
+        return (FALSE);
+    if (!xdr_dirlist3(xdrs, &objp->reply))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_READDIR3resfail(register XDR *xdrs, READDIR3resfail *objp)
 {
-	if (!xdr_post_op_attr(xdrs, &objp->dir_attributes))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_post_op_attr(xdrs, &objp->dir_attributes))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_READDIR3res(register XDR *xdrs, READDIR3res *objp)
 {
-	if (!xdr_nfsstat3(xdrs, &objp->status))
-		return (FALSE);
-	switch (objp->status) {
-	case NFS3_OK:
-		if (!xdr_READDIR3resok(xdrs, &objp->READDIR3res_u.resok))
-			return (FALSE);
-		break;
-	default:
-		if (!xdr_READDIR3resfail(xdrs, &objp->READDIR3res_u.resfail))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_nfsstat3(xdrs, &objp->status))
+        return (FALSE);
+    switch (objp->status) {
+    case NFS3_OK:
+        if (!xdr_READDIR3resok(xdrs, &objp->READDIR3res_u.resok))
+            return (FALSE);
+        break;
+    default:
+        if (!xdr_READDIR3resfail(xdrs, &objp->READDIR3res_u.resfail))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_READDIRPLUS3args(register XDR *xdrs, READDIRPLUS3args *objp)
 {
-	if (!xdr_nfs_fh3(xdrs, &objp->dir))
-		return (FALSE);
-	if (!xdr_cookie3(xdrs, &objp->cookie))
-		return (FALSE);
-	if (!xdr_cookieverf3(xdrs, objp->cookieverf))
-		return (FALSE);
-	if (!xdr_count3(xdrs, &objp->dircount))
-		return (FALSE);
-	if (!xdr_count3(xdrs, &objp->maxcount))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_nfs_fh3(xdrs, &objp->dir))
+        return (FALSE);
+    if (!xdr_cookie3(xdrs, &objp->cookie))
+        return (FALSE);
+    if (!xdr_cookieverf3(xdrs, objp->cookieverf))
+        return (FALSE);
+    if (!xdr_count3(xdrs, &objp->dircount))
+        return (FALSE);
+    if (!xdr_count3(xdrs, &objp->maxcount))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_entryplus3(register XDR *xdrs, entryplus3 *objp)
 {
-	if (!xdr_fileid3(xdrs, &objp->fileid))
-		return (FALSE);
-	if (!xdr_filename3(xdrs, &objp->name))
-		return (FALSE);
-	if (!xdr_cookie3(xdrs, &objp->cookie))
-		return (FALSE);
-	if (!xdr_post_op_attr(xdrs, &objp->name_attributes))
-		return (FALSE);
-	if (!xdr_post_op_fh3(xdrs, &objp->name_handle))
-		return (FALSE);
-	if (!xdr_pointer(xdrs, (char **)&objp->nextentry, sizeof (entryplus3), (xdrproc_t) xdr_entryplus3))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_fileid3(xdrs, &objp->fileid))
+        return (FALSE);
+    if (!xdr_filename3(xdrs, &objp->name))
+        return (FALSE);
+    if (!xdr_cookie3(xdrs, &objp->cookie))
+        return (FALSE);
+    if (!xdr_post_op_attr(xdrs, &objp->name_attributes))
+        return (FALSE);
+    if (!xdr_post_op_fh3(xdrs, &objp->name_handle))
+        return (FALSE);
+    if (!xdr_pointer(xdrs, (char **)&objp->nextentry, sizeof (entryplus3), (xdrproc_t) xdr_entryplus3))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_dirlistplus3(register XDR *xdrs, dirlistplus3 *objp)
 {
-	if (!xdr_pointer(xdrs, (char **)&objp->entries, sizeof (entryplus3), (xdrproc_t) xdr_entryplus3))
-		return (FALSE);
-	if (!xdr_bool(xdrs, &objp->eof))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_pointer(xdrs, (char **)&objp->entries, sizeof (entryplus3), (xdrproc_t) xdr_entryplus3))
+        return (FALSE);
+    if (!xdr_bool(xdrs, &objp->eof))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_READDIRPLUS3resok(register XDR *xdrs, READDIRPLUS3resok *objp)
 {
-	if (!xdr_post_op_attr(xdrs, &objp->dir_attributes))
-		return (FALSE);
-	if (!xdr_cookieverf3(xdrs, objp->cookieverf))
-		return (FALSE);
-	if (!xdr_dirlistplus3(xdrs, &objp->reply))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_post_op_attr(xdrs, &objp->dir_attributes))
+        return (FALSE);
+    if (!xdr_cookieverf3(xdrs, objp->cookieverf))
+        return (FALSE);
+    if (!xdr_dirlistplus3(xdrs, &objp->reply))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_READDIRPLUS3resfail(register XDR *xdrs, READDIRPLUS3resfail *objp)
 {
-	if (!xdr_post_op_attr(xdrs, &objp->dir_attributes))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_post_op_attr(xdrs, &objp->dir_attributes))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_READDIRPLUS3res(register XDR *xdrs, READDIRPLUS3res *objp)
 {
-	if (!xdr_nfsstat3(xdrs, &objp->status))
-		return (FALSE);
-	switch (objp->status) {
-	case NFS3_OK:
-		if (!xdr_READDIRPLUS3resok(xdrs, &objp->READDIRPLUS3res_u.resok))
-			return (FALSE);
-		break;
-	default:
-		if (!xdr_READDIRPLUS3resfail(xdrs, &objp->READDIRPLUS3res_u.resfail))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_nfsstat3(xdrs, &objp->status))
+        return (FALSE);
+    switch (objp->status) {
+    case NFS3_OK:
+        if (!xdr_READDIRPLUS3resok(xdrs, &objp->READDIRPLUS3res_u.resok))
+            return (FALSE);
+        break;
+    default:
+        if (!xdr_READDIRPLUS3resfail(xdrs, &objp->READDIRPLUS3res_u.resfail))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_FSSTAT3args(register XDR *xdrs, FSSTAT3args *objp)
 {
-	if (!xdr_nfs_fh3(xdrs, &objp->fsroot))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_nfs_fh3(xdrs, &objp->fsroot))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_FSSTAT3resok(register XDR *xdrs, FSSTAT3resok *objp)
 {
-	if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
-		return (FALSE);
-	if (!xdr_size3(xdrs, &objp->tbytes))
-		return (FALSE);
-	if (!xdr_size3(xdrs, &objp->fbytes))
-		return (FALSE);
-	if (!xdr_size3(xdrs, &objp->abytes))
-		return (FALSE);
-	if (!xdr_size3(xdrs, &objp->tfiles))
-		return (FALSE);
-	if (!xdr_size3(xdrs, &objp->ffiles))
-		return (FALSE);
-	if (!xdr_size3(xdrs, &objp->afiles))
-		return (FALSE);
-	if (!xdr_uint32(xdrs, &objp->invarsec))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
+        return (FALSE);
+    if (!xdr_size3(xdrs, &objp->tbytes))
+        return (FALSE);
+    if (!xdr_size3(xdrs, &objp->fbytes))
+        return (FALSE);
+    if (!xdr_size3(xdrs, &objp->abytes))
+        return (FALSE);
+    if (!xdr_size3(xdrs, &objp->tfiles))
+        return (FALSE);
+    if (!xdr_size3(xdrs, &objp->ffiles))
+        return (FALSE);
+    if (!xdr_size3(xdrs, &objp->afiles))
+        return (FALSE);
+    if (!xdr_uint32(xdrs, &objp->invarsec))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_FSSTAT3resfail(register XDR *xdrs, FSSTAT3resfail *objp)
 {
-	if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_FSSTAT3res(register XDR *xdrs, FSSTAT3res *objp)
 {
-	if (!xdr_nfsstat3(xdrs, &objp->status))
-		return (FALSE);
-	switch (objp->status) {
-	case NFS3_OK:
-		if (!xdr_FSSTAT3resok(xdrs, &objp->FSSTAT3res_u.resok))
-			return (FALSE);
-		break;
-	default:
-		if (!xdr_FSSTAT3resfail(xdrs, &objp->FSSTAT3res_u.resfail))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_nfsstat3(xdrs, &objp->status))
+        return (FALSE);
+    switch (objp->status) {
+    case NFS3_OK:
+        if (!xdr_FSSTAT3resok(xdrs, &objp->FSSTAT3res_u.resok))
+            return (FALSE);
+        break;
+    default:
+        if (!xdr_FSSTAT3resfail(xdrs, &objp->FSSTAT3res_u.resfail))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_FSINFO3args(register XDR *xdrs, FSINFO3args *objp)
 {
-	if (!xdr_nfs_fh3(xdrs, &objp->fsroot))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_nfs_fh3(xdrs, &objp->fsroot))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_FSINFO3resok(register XDR *xdrs, FSINFO3resok *objp)
 {
-	if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
-		return (FALSE);
-	if (!xdr_uint32(xdrs, &objp->rtmax))
-		return (FALSE);
-	if (!xdr_uint32(xdrs, &objp->rtpref))
-		return (FALSE);
-	if (!xdr_uint32(xdrs, &objp->rtmult))
-		return (FALSE);
-	if (!xdr_uint32(xdrs, &objp->wtmax))
-		return (FALSE);
-	if (!xdr_uint32(xdrs, &objp->wtpref))
-		return (FALSE);
-	if (!xdr_uint32(xdrs, &objp->wtmult))
-		return (FALSE);
-	if (!xdr_uint32(xdrs, &objp->dtpref))
-		return (FALSE);
-	if (!xdr_size3(xdrs, &objp->maxfilesize))
-		return (FALSE);
-	if (!xdr_nfstime3(xdrs, &objp->time_delta))
-		return (FALSE);
-	if (!xdr_uint32(xdrs, &objp->properties))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
+        return (FALSE);
+    if (!xdr_uint32(xdrs, &objp->rtmax))
+        return (FALSE);
+    if (!xdr_uint32(xdrs, &objp->rtpref))
+        return (FALSE);
+    if (!xdr_uint32(xdrs, &objp->rtmult))
+        return (FALSE);
+    if (!xdr_uint32(xdrs, &objp->wtmax))
+        return (FALSE);
+    if (!xdr_uint32(xdrs, &objp->wtpref))
+        return (FALSE);
+    if (!xdr_uint32(xdrs, &objp->wtmult))
+        return (FALSE);
+    if (!xdr_uint32(xdrs, &objp->dtpref))
+        return (FALSE);
+    if (!xdr_size3(xdrs, &objp->maxfilesize))
+        return (FALSE);
+    if (!xdr_nfstime3(xdrs, &objp->time_delta))
+        return (FALSE);
+    if (!xdr_uint32(xdrs, &objp->properties))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_FSINFO3resfail(register XDR *xdrs, FSINFO3resfail *objp)
 {
-	if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_FSINFO3res(register XDR *xdrs, FSINFO3res *objp)
 {
-	if (!xdr_nfsstat3(xdrs, &objp->status))
-		return (FALSE);
-	switch (objp->status) {
-	case NFS3_OK:
-		if (!xdr_FSINFO3resok(xdrs, &objp->FSINFO3res_u.resok))
-			return (FALSE);
-		break;
-	default:
-		if (!xdr_FSINFO3resfail(xdrs, &objp->FSINFO3res_u.resfail))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_nfsstat3(xdrs, &objp->status))
+        return (FALSE);
+    switch (objp->status) {
+    case NFS3_OK:
+        if (!xdr_FSINFO3resok(xdrs, &objp->FSINFO3res_u.resok))
+            return (FALSE);
+        break;
+    default:
+        if (!xdr_FSINFO3resfail(xdrs, &objp->FSINFO3res_u.resfail))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_PATHCONF3args(register XDR *xdrs, PATHCONF3args *objp)
 {
-	if (!xdr_nfs_fh3(xdrs, &objp->object))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_nfs_fh3(xdrs, &objp->object))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_PATHCONF3resok(register XDR *xdrs, PATHCONF3resok *objp)
 {
-	if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
-		return (FALSE);
-	if (!xdr_uint32(xdrs, &objp->linkmax))
-		return (FALSE);
-	if (!xdr_uint32(xdrs, &objp->name_max))
-		return (FALSE);
-	if (!xdr_bool(xdrs, &objp->no_trunc))
-		return (FALSE);
-	if (!xdr_bool(xdrs, &objp->chown_restricted))
-		return (FALSE);
-	if (!xdr_bool(xdrs, &objp->case_insensitive))
-		return (FALSE);
-	if (!xdr_bool(xdrs, &objp->case_preserving))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
+        return (FALSE);
+    if (!xdr_uint32(xdrs, &objp->linkmax))
+        return (FALSE);
+    if (!xdr_uint32(xdrs, &objp->name_max))
+        return (FALSE);
+    if (!xdr_bool(xdrs, &objp->no_trunc))
+        return (FALSE);
+    if (!xdr_bool(xdrs, &objp->chown_restricted))
+        return (FALSE);
+    if (!xdr_bool(xdrs, &objp->case_insensitive))
+        return (FALSE);
+    if (!xdr_bool(xdrs, &objp->case_preserving))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_PATHCONF3resfail(register XDR *xdrs, PATHCONF3resfail *objp)
 {
-	if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_PATHCONF3res(register XDR *xdrs, PATHCONF3res *objp)
 {
-	if (!xdr_nfsstat3(xdrs, &objp->status))
-		return (FALSE);
-	switch (objp->status) {
-	case NFS3_OK:
-		if (!xdr_PATHCONF3resok(xdrs, &objp->PATHCONF3res_u.resok))
-			return (FALSE);
-		break;
-	default:
-		if (!xdr_PATHCONF3resfail(xdrs, &objp->PATHCONF3res_u.resfail))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_nfsstat3(xdrs, &objp->status))
+        return (FALSE);
+    switch (objp->status) {
+    case NFS3_OK:
+        if (!xdr_PATHCONF3resok(xdrs, &objp->PATHCONF3res_u.resok))
+            return (FALSE);
+        break;
+    default:
+        if (!xdr_PATHCONF3resfail(xdrs, &objp->PATHCONF3res_u.resfail))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }
 
 bool_t
 xdr_COMMIT3args(register XDR *xdrs, COMMIT3args *objp)
 {
-	if (!xdr_nfs_fh3(xdrs, &objp->file))
-		return (FALSE);
-	if (!xdr_offset3(xdrs, &objp->offset))
-		return (FALSE);
-	if (!xdr_count3(xdrs, &objp->count))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_nfs_fh3(xdrs, &objp->file))
+        return (FALSE);
+    if (!xdr_offset3(xdrs, &objp->offset))
+        return (FALSE);
+    if (!xdr_count3(xdrs, &objp->count))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_COMMIT3resok(register XDR *xdrs, COMMIT3resok *objp)
 {
-	if (!xdr_wcc_data(xdrs, &objp->file_wcc))
-		return (FALSE);
-	if (!xdr_writeverf3(xdrs, objp->verf))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_wcc_data(xdrs, &objp->file_wcc))
+        return (FALSE);
+    if (!xdr_writeverf3(xdrs, objp->verf))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_COMMIT3resfail(register XDR *xdrs, COMMIT3resfail *objp)
 {
-	if (!xdr_wcc_data(xdrs, &objp->file_wcc))
-		return (FALSE);
-	return (TRUE);
+    if (!xdr_wcc_data(xdrs, &objp->file_wcc))
+        return (FALSE);
+    return (TRUE);
 }
 
 bool_t
 xdr_COMMIT3res(register XDR *xdrs, COMMIT3res *objp)
 {
-	if (!xdr_nfsstat3(xdrs, &objp->status))
-		return (FALSE);
-	switch (objp->status) {
-	case NFS3_OK:
-		if (!xdr_COMMIT3resok(xdrs, &objp->COMMIT3res_u.resok))
-			return (FALSE);
-		break;
-	default:
-		if (!xdr_COMMIT3resfail(xdrs, &objp->COMMIT3res_u.resfail))
-			return (FALSE);
-		break;
-	}
-	return (TRUE);
+    if (!xdr_nfsstat3(xdrs, &objp->status))
+        return (FALSE);
+    switch (objp->status) {
+    case NFS3_OK:
+        if (!xdr_COMMIT3resok(xdrs, &objp->COMMIT3res_u.resok))
+            return (FALSE);
+        break;
+    default:
+        if (!xdr_COMMIT3resfail(xdrs, &objp->COMMIT3res_u.resfail))
+            return (FALSE);
+        break;
+    }
+    return (TRUE);
 }

+ 51 - 51
components/dfs/filesystems/nfs/rpc/auth.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -15,28 +15,28 @@
  * Status returned from authentication check
  */
 enum auth_stat {
-	AUTH_OK=0,
-	/*
-	 * failed at remote end
-	 */
-	AUTH_BADCRED=1,			/* bogus credentials (seal broken) */
-	AUTH_REJECTEDCRED=2,		/* client should begin new session */
-	AUTH_BADVERF=3,			/* bogus verifier (seal broken) */
-	AUTH_REJECTEDVERF=4,		/* verifier expired or was replayed */
-	AUTH_TOOWEAK=5,			/* rejected due to security reasons */
-	/*
-	 * failed locally
-	*/
-	AUTH_INVALIDRESP=6,		/* bogus response verifier */
-	AUTH_FAILED=7			/* some unknown reason */
+    AUTH_OK=0,
+    /*
+     * failed at remote end
+     */
+    AUTH_BADCRED=1,         /* bogus credentials (seal broken) */
+    AUTH_REJECTEDCRED=2,        /* client should begin new session */
+    AUTH_BADVERF=3,         /* bogus verifier (seal broken) */
+    AUTH_REJECTEDVERF=4,        /* verifier expired or was replayed */
+    AUTH_TOOWEAK=5,         /* rejected due to security reasons */
+    /*
+     * failed locally
+    */
+    AUTH_INVALIDRESP=6,     /* bogus response verifier */
+    AUTH_FAILED=7           /* some unknown reason */
 };
 
 union des_block {
-	struct {
-		uint32_t high;
-		uint32_t low;
-	} key;
-	char c[8];
+    struct {
+        uint32_t high;
+        uint32_t low;
+    } key;
+    char c[8];
 };
 typedef union des_block des_block;
 
@@ -44,9 +44,9 @@ typedef union des_block des_block;
  * Authentication info.  Opaque to client.
  */
 struct opaque_auth {
-	enum_t	oa_flavor;		/* flavor of auth */
-	char*	oa_base;		/* address of more auth stuff */
-	unsigned int	oa_length;		/* not to exceed MAX_AUTH_BYTES */
+    enum_t  oa_flavor;      /* flavor of auth */
+    char*   oa_base;        /* address of more auth stuff */
+    unsigned int    oa_length;      /* not to exceed MAX_AUTH_BYTES */
 };
 
 /*
@@ -59,11 +59,11 @@ struct AUTH {
   union des_block ah_key;
   struct auth_ops {
     void (*ah_nextverf) (AUTH *);
-    int  (*ah_marshal) (AUTH *, XDR *);		/* nextverf & serialize */
+    int  (*ah_marshal) (AUTH *, XDR *);     /* nextverf & serialize */
     int  (*ah_validate) (AUTH *, struct opaque_auth *);
-						/* validate verifier */
-    int  (*ah_refresh) (AUTH *);		/* refresh credentials */
-    void (*ah_destroy) (AUTH *); 	    	/* destroy this structure */
+                        /* validate verifier */
+    int  (*ah_refresh) (AUTH *);        /* refresh credentials */
+    void (*ah_destroy) (AUTH *);            /* destroy this structure */
   } *ah_ops;
   char* ah_private;
 };
@@ -75,37 +75,37 @@ extern struct opaque_auth _null_auth;
  * Authentication ops.
  * The ops and the auth handle provide the interface to the authenticators.
  *
- * AUTH	*auth;
- * XDR	*xdrs;
+ * AUTH *auth;
+ * XDR  *xdrs;
  * struct opaque_auth verf;
  */
-#define AUTH_NEXTVERF(auth)		\
-		((*((auth)->ah_ops->ah_nextverf))(auth))
-#define auth_nextverf(auth)		\
-		((*((auth)->ah_ops->ah_nextverf))(auth))
+#define AUTH_NEXTVERF(auth)     \
+        ((*((auth)->ah_ops->ah_nextverf))(auth))
+#define auth_nextverf(auth)     \
+        ((*((auth)->ah_ops->ah_nextverf))(auth))
 
-#define AUTH_MARSHALL(auth, xdrs)	\
-		((*((auth)->ah_ops->ah_marshal))(auth, xdrs))
-#define auth_marshall(auth, xdrs)	\
-		((*((auth)->ah_ops->ah_marshal))(auth, xdrs))
+#define AUTH_MARSHALL(auth, xdrs)   \
+        ((*((auth)->ah_ops->ah_marshal))(auth, xdrs))
+#define auth_marshall(auth, xdrs)   \
+        ((*((auth)->ah_ops->ah_marshal))(auth, xdrs))
 
-#define AUTH_VALIDATE(auth, verfp)	\
-		((*((auth)->ah_ops->ah_validate))((auth), verfp))
-#define auth_validate(auth, verfp)	\
-		((*((auth)->ah_ops->ah_validate))((auth), verfp))
+#define AUTH_VALIDATE(auth, verfp)  \
+        ((*((auth)->ah_ops->ah_validate))((auth), verfp))
+#define auth_validate(auth, verfp)  \
+        ((*((auth)->ah_ops->ah_validate))((auth), verfp))
 
-#define AUTH_REFRESH(auth)		\
-		((*((auth)->ah_ops->ah_refresh))(auth))
-#define auth_refresh(auth)		\
-		((*((auth)->ah_ops->ah_refresh))(auth))
+#define AUTH_REFRESH(auth)      \
+        ((*((auth)->ah_ops->ah_refresh))(auth))
+#define auth_refresh(auth)      \
+        ((*((auth)->ah_ops->ah_refresh))(auth))
 
-#define AUTH_DESTROY(auth)		\
-		((*((auth)->ah_ops->ah_destroy))(auth))
-#define auth_destroy(auth)		\
-		((*((auth)->ah_ops->ah_destroy))(auth))
+#define AUTH_DESTROY(auth)      \
+        ((*((auth)->ah_ops->ah_destroy))(auth))
+#define auth_destroy(auth)      \
+        ((*((auth)->ah_ops->ah_destroy))(auth))
 
-#define MAX_AUTH_BYTES	400
-#define MAXNETNAMELEN	255	/* maximum length of network user's name */
+#define MAX_AUTH_BYTES  400
+#define MAXNETNAMELEN   255 /* maximum length of network user's name */
 
 AUTH *authnone_create(void);
 

+ 49 - 49
components/dfs/filesystems/nfs/rpc/auth_none.c

@@ -1,12 +1,12 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
  */
-/* @(#)auth_none.c	2.1 88/07/29 4.0 RPCSRC */
+/* @(#)auth_none.c  2.1 88/07/29 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
@@ -14,23 +14,23 @@
  * may copy or modify Sun RPC without charge, but are not authorized
  * to license or distribute it to anyone else except as part of a product or
  * program developed by the user.
- * 
+ *
  * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
  * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- * 
+ *
  * Sun RPC is provided with no support and without any obligation on the
  * part of Sun Microsystems, Inc. to assist in its use, correction,
  * modification or enhancement.
- * 
+ *
  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
  * OR ANY PART THEREOF.
- * 
+ *
  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
  * or profits or other special, indirect and consequential damages, even if
  * Sun has been advised of the possibility of such damages.
- * 
+ *
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
@@ -38,15 +38,15 @@
 #if !defined(lint) && defined(SCCSIDS)
 static char sccsid[] =
 
-	"@(#)auth_none.c 1.19 87/08/11 Copyr 1984 Sun Micro";
+    "@(#)auth_none.c 1.19 87/08/11 Copyr 1984 Sun Micro";
 #endif
 
 /*
  * auth_none.c
- * Creates a client authentication handle for passing "null" 
- * credentials and verifiers to remote systems. 
- * 
- * Copyright (C) 1984, Sun Microsystems, Inc. 
+ * Creates a client authentication handle for passing "null"
+ * credentials and verifiers to remote systems.
+ *
+ * Copyright (C) 1984, Sun Microsystems, Inc.
  */
 
 #include <rpc/types.h>
@@ -63,55 +63,55 @@ static bool_t authnone_marshal(AUTH *client, XDR *xdrs);
 struct opaque_auth _null_auth;
 
 static struct auth_ops ops = {
-	authnone_verf,
-	authnone_marshal,
-	authnone_validate,
-	authnone_refresh,
-	authnone_destroy
+    authnone_verf,
+    authnone_marshal,
+    authnone_validate,
+    authnone_refresh,
+    authnone_destroy
 };
 
 static struct authnone_private {
-	AUTH no_client;
-	char marshalled_client[MAX_MARSHEL_SIZE];
-	unsigned int mcnt;
+    AUTH no_client;
+    char marshalled_client[MAX_MARSHEL_SIZE];
+    unsigned int mcnt;
 } *authnone_private;
 
 AUTH *authnone_create()
 {
-	register struct authnone_private *ap = authnone_private;
-	XDR xdr_stream;
-	register XDR *xdrs;
+    register struct authnone_private *ap = authnone_private;
+    XDR xdr_stream;
+    register XDR *xdrs;
     extern bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);
 
-	if (ap == 0) {
-		ap = (struct authnone_private *) rt_malloc (sizeof(*ap));
-		if (ap == 0) return NULL;
-		memset(ap, 0, sizeof(*ap));
-		authnone_private = ap;
-	}
-	if (!ap->mcnt) {
-		ap->no_client.ah_cred = ap->no_client.ah_verf = _null_auth;
-		ap->no_client.ah_ops = &ops;
-		xdrs = &xdr_stream;
-		xdrmem_create(xdrs, ap->marshalled_client,
-					  (unsigned int) MAX_MARSHEL_SIZE, XDR_ENCODE);
-		(void) xdr_opaque_auth(xdrs, &ap->no_client.ah_cred);
-		(void) xdr_opaque_auth(xdrs, &ap->no_client.ah_verf);
-		ap->mcnt = XDR_GETPOS(xdrs);
-		XDR_DESTROY(xdrs);
-	}
-	return (&ap->no_client);
+    if (ap == 0) {
+        ap = (struct authnone_private *) rt_malloc (sizeof(*ap));
+        if (ap == 0) return NULL;
+        memset(ap, 0, sizeof(*ap));
+        authnone_private = ap;
+    }
+    if (!ap->mcnt) {
+        ap->no_client.ah_cred = ap->no_client.ah_verf = _null_auth;
+        ap->no_client.ah_ops = &ops;
+        xdrs = &xdr_stream;
+        xdrmem_create(xdrs, ap->marshalled_client,
+                      (unsigned int) MAX_MARSHEL_SIZE, XDR_ENCODE);
+        (void) xdr_opaque_auth(xdrs, &ap->no_client.ah_cred);
+        (void) xdr_opaque_auth(xdrs, &ap->no_client.ah_verf);
+        ap->mcnt = XDR_GETPOS(xdrs);
+        XDR_DESTROY(xdrs);
+    }
+    return (&ap->no_client);
 }
 
-/*ARGSUSED*/ 
+/*ARGSUSED*/
 static bool_t authnone_marshal(AUTH *client, XDR *xdrs)
 {
-	register struct authnone_private *ap = authnone_private;
+    register struct authnone_private *ap = authnone_private;
 
-	if (ap == 0)
-		return (0);
-	return ((*xdrs->x_ops->x_putbytes) (xdrs,
-										ap->marshalled_client, ap->mcnt));
+    if (ap == 0)
+        return (0);
+    return ((*xdrs->x_ops->x_putbytes) (xdrs,
+                                        ap->marshalled_client, ap->mcnt));
 }
 
 static void authnone_verf(AUTH *x)
@@ -121,13 +121,13 @@ static void authnone_verf(AUTH *x)
 static bool_t authnone_validate(AUTH *x, struct opaque_auth *x1)
 {
 
-	return (TRUE);
+    return (TRUE);
 }
 
 static bool_t authnone_refresh(AUTH *x)
 {
 
-	return (FALSE);
+    return (FALSE);
 }
 
 static void authnone_destroy(AUTH *x)

+ 120 - 120
components/dfs/filesystems/nfs/rpc/clnt.h

@@ -1,12 +1,12 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
  */
-/* @(#)clnt.h	2.1 88/07/29 4.0 RPCSRC; from 1.31 88/02/08 SMI*/
+/* @(#)clnt.h   2.1 88/07/29 4.0 RPCSRC; from 1.31 88/02/08 SMI*/
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
@@ -43,7 +43,7 @@
  */
 
 #ifndef _RPC_CLNT_H
-#define _RPC_CLNT_H	1
+#define _RPC_CLNT_H 1
 
 #include <rpc/types.h>
 #include <rpc/auth.h>
@@ -55,47 +55,47 @@
  * independent) list of errors.
  */
 enum clnt_stat {
-	RPC_SUCCESS=0,			/* call succeeded */
-	/*
-	 * local errors
-	 */
-	RPC_CANTENCODEARGS=1,		/* can't encode arguments */
-	RPC_CANTDECODERES=2,		/* can't decode results */
-	RPC_CANTSEND=3,			/* failure in sending call */
-	RPC_CANTRECV=4,			/* failure in receiving result */
-	RPC_TIMEDOUT=5,			/* call timed out */
-	/*
-	 * remote errors
-	 */
-	RPC_VERSMISMATCH=6,		/* rpc versions not compatible */
-	RPC_AUTHERROR=7,		/* authentication error */
-	RPC_PROGUNAVAIL=8,		/* program not available */
-	RPC_PROGVERSMISMATCH=9,		/* program version mismatched */
-	RPC_PROCUNAVAIL=10,		/* procedure unavailable */
-	RPC_CANTDECODEARGS=11,		/* decode arguments error */
-	RPC_SYSTEMERROR=12,		/* generic "other problem" */
-	RPC_NOBROADCAST = 21,		/* Broadcasting not supported */
-	/*
-	 * callrpc & clnt_create errors
-	 */
-	RPC_UNKNOWNHOST=13,		/* unknown host name */
-	RPC_UNKNOWNPROTO=17,		/* unknown protocol */
-	RPC_UNKNOWNADDR = 19,		/* Remote address unknown */
+    RPC_SUCCESS=0,          /* call succeeded */
+    /*
+     * local errors
+     */
+    RPC_CANTENCODEARGS=1,       /* can't encode arguments */
+    RPC_CANTDECODERES=2,        /* can't decode results */
+    RPC_CANTSEND=3,         /* failure in sending call */
+    RPC_CANTRECV=4,         /* failure in receiving result */
+    RPC_TIMEDOUT=5,         /* call timed out */
+    /*
+     * remote errors
+     */
+    RPC_VERSMISMATCH=6,     /* rpc versions not compatible */
+    RPC_AUTHERROR=7,        /* authentication error */
+    RPC_PROGUNAVAIL=8,      /* program not available */
+    RPC_PROGVERSMISMATCH=9,     /* program version mismatched */
+    RPC_PROCUNAVAIL=10,     /* procedure unavailable */
+    RPC_CANTDECODEARGS=11,      /* decode arguments error */
+    RPC_SYSTEMERROR=12,     /* generic "other problem" */
+    RPC_NOBROADCAST = 21,       /* Broadcasting not supported */
+    /*
+     * callrpc & clnt_create errors
+     */
+    RPC_UNKNOWNHOST=13,     /* unknown host name */
+    RPC_UNKNOWNPROTO=17,        /* unknown protocol */
+    RPC_UNKNOWNADDR = 19,       /* Remote address unknown */
 
-	/*
-	 * rpcbind errors
-	 */
-	RPC_RPCBFAILURE=14,		/* portmapper failed in its call */
+    /*
+     * rpcbind errors
+     */
+    RPC_RPCBFAILURE=14,     /* portmapper failed in its call */
 #define RPC_PMAPFAILURE RPC_RPCBFAILURE
-	RPC_PROGNOTREGISTERED=15,	/* remote program is not registered */
-	RPC_N2AXLATEFAILURE = 22,	/* Name to addr translation failed */
-	/*
-	 * unspecified error
-	 */
-	RPC_FAILED=16,
-	RPC_INTR=18,
-	RPC_TLIERROR=20,
-	RPC_UDERROR=23,
+    RPC_PROGNOTREGISTERED=15,   /* remote program is not registered */
+    RPC_N2AXLATEFAILURE = 22,   /* Name to addr translation failed */
+    /*
+     * unspecified error
+     */
+    RPC_FAILED=16,
+    RPC_INTR=18,
+    RPC_TLIERROR=20,
+    RPC_UDERROR=23,
         /*
          * asynchronous errors
          */
@@ -110,21 +110,21 @@ enum clnt_stat {
 struct rpc_err {
   int re_status;
   union {
-    int RE_errno;		/* related system error */
-    int RE_why;	/* why the auth error occurred */
+    int RE_errno;       /* related system error */
+    int RE_why; /* why the auth error occurred */
     struct {
-      unsigned long low;		/* lowest verion supported */
-      unsigned long high;		/* highest verion supported */
+      unsigned long low;        /* lowest verion supported */
+      unsigned long high;       /* highest verion supported */
     } RE_vers;
-    struct {			/* maybe meaningful if RPC_FAILED */
+    struct {            /* maybe meaningful if RPC_FAILED */
       long s1;
       long s2;
-    } RE_lb;			/* life boot & debugging only */
+    } RE_lb;            /* life boot & debugging only */
   } ru;
-#define	re_errno	ru.RE_errno
-#define	re_why		ru.RE_why
-#define	re_vers		ru.RE_vers
-#define	re_lb		ru.RE_lb
+#define re_errno    ru.RE_errno
+#define re_why      ru.RE_why
+#define re_vers     ru.RE_vers
+#define re_lb       ru.RE_lb
 };
 
 
@@ -135,21 +135,21 @@ struct rpc_err {
  */
 typedef struct CLIENT CLIENT;
 struct CLIENT {
-  AUTH	*cl_auth;		 /* authenticator */
+  AUTH  *cl_auth;        /* authenticator */
   struct clnt_ops {
     enum clnt_stat (*cl_call) (CLIENT *, unsigned long, xdrproc_t, char*, xdrproc_t,
-			       char*, struct timeval);
-			       	/* call remote procedure */
-    void (*cl_abort) (void);	/* abort a call */
+                   char*, struct timeval);
+                    /* call remote procedure */
+    void (*cl_abort) (void);    /* abort a call */
     void (*cl_geterr) (CLIENT *, struct rpc_err *);
-				/* get specific error code */
+                /* get specific error code */
     bool_t (*cl_freeres) (CLIENT *, xdrproc_t, char*);
-				/* frees results */
+                /* frees results */
     void (*cl_destroy) (CLIENT *); /* destroy this structure */
     bool_t (*cl_control) (CLIENT *, int, char *);
-				/* the ioctl() of rpc */
+                /* the ioctl() of rpc */
   } *cl_ops;
-  char* cl_private;		/* private stuff */
+  char* cl_private;     /* private stuff */
 };
 
 
@@ -163,45 +163,45 @@ struct CLIENT {
 /*
  * enum clnt_stat
  * CLNT_CALL(rh, proc, xargs, argsp, xres, resp, timeout)
- * 	CLIENT *rh;
- *	unsigned long proc;
- *	xdrproc_t xargs;
- *	char* argsp;
- *	xdrproc_t xres;
- *	char* resp;
- *	struct timeval timeout;
+ *  CLIENT *rh;
+ *  unsigned long proc;
+ *  xdrproc_t xargs;
+ *  char* argsp;
+ *  xdrproc_t xres;
+ *  char* resp;
+ *  struct timeval timeout;
  */
-#define	CLNT_CALL(rh, proc, xargs, argsp, xres, resp, secs)	\
-	((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs))
-#define	clnt_call(rh, proc, xargs, argsp, xres, resp, secs)	\
-	((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs))
+#define CLNT_CALL(rh, proc, xargs, argsp, xres, resp, secs) \
+    ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs))
+#define clnt_call(rh, proc, xargs, argsp, xres, resp, secs) \
+    ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs))
 
 /*
  * void
  * CLNT_ABORT(rh);
- * 	CLIENT *rh;
+ *  CLIENT *rh;
  */
-#define	CLNT_ABORT(rh)	((*(rh)->cl_ops->cl_abort)(rh))
-#define	clnt_abort(rh)	((*(rh)->cl_ops->cl_abort)(rh))
+#define CLNT_ABORT(rh)  ((*(rh)->cl_ops->cl_abort)(rh))
+#define clnt_abort(rh)  ((*(rh)->cl_ops->cl_abort)(rh))
 
 /*
  * struct rpc_err
  * CLNT_GETERR(rh);
- * 	CLIENT *rh;
+ *  CLIENT *rh;
  */
-#define	CLNT_GETERR(rh,errp)	((*(rh)->cl_ops->cl_geterr)(rh, errp))
-#define	clnt_geterr(rh,errp)	((*(rh)->cl_ops->cl_geterr)(rh, errp))
+#define CLNT_GETERR(rh,errp)    ((*(rh)->cl_ops->cl_geterr)(rh, errp))
+#define clnt_geterr(rh,errp)    ((*(rh)->cl_ops->cl_geterr)(rh, errp))
 
 
 /*
  * bool_t
  * CLNT_FREERES(rh, xres, resp);
- * 	CLIENT *rh;
- *	xdrproc_t xres;
- *	char* resp;
+ *  CLIENT *rh;
+ *  xdrproc_t xres;
+ *  char* resp;
  */
-#define	CLNT_FREERES(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp))
-#define	clnt_freeres(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp))
+#define CLNT_FREERES(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp))
+#define clnt_freeres(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp))
 
 /*
  * bool_t
@@ -210,8 +210,8 @@ struct CLIENT {
  *      unsigned int request;
  *      char *info;
  */
-#define	CLNT_CONTROL(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in))
-#define	clnt_control(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in))
+#define CLNT_CONTROL(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in))
+#define clnt_control(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in))
 
 /*
  * control operations that apply to all transports
@@ -239,16 +239,16 @@ struct CLIENT {
 /*
  * Connectionless only control operations
  */
-#define CLSET_RETRY_TIMEOUT	4	/* set retry timeout (timeval) */
-#define CLGET_RETRY_TIMEOUT	5	/* get retry timeout (timeval) */
+#define CLSET_RETRY_TIMEOUT 4   /* set retry timeout (timeval) */
+#define CLGET_RETRY_TIMEOUT 5   /* get retry timeout (timeval) */
 
 /*
  * void
  * CLNT_DESTROY(rh);
- * 	CLIENT *rh;
+ *  CLIENT *rh;
  */
-#define	CLNT_DESTROY(rh)	((*(rh)->cl_ops->cl_destroy)(rh))
-#define	clnt_destroy(rh)	((*(rh)->cl_ops->cl_destroy)(rh))
+#define CLNT_DESTROY(rh)    ((*(rh)->cl_ops->cl_destroy)(rh))
+#define clnt_destroy(rh)    ((*(rh)->cl_ops->cl_destroy)(rh))
 
 
 /*
@@ -257,10 +257,10 @@ struct CLIENT {
  * and network administration.
  */
 
-#define RPCTEST_PROGRAM		((unsigned long)1)
-#define RPCTEST_VERSION		((unsigned long)1)
-#define RPCTEST_NULL_PROC	((unsigned long)2)
-#define RPCTEST_NULL_BATCH_PROC	((unsigned long)3)
+#define RPCTEST_PROGRAM     ((unsigned long)1)
+#define RPCTEST_VERSION     ((unsigned long)1)
+#define RPCTEST_NULL_PROC   ((unsigned long)2)
+#define RPCTEST_NULL_BATCH_PROC ((unsigned long)3)
 
 /*
  * By convention, procedure 0 takes null arguments and returns them
@@ -279,51 +279,51 @@ struct CLIENT {
  * "unix"
  * CLIENT *
  * clnt_create(host, prog, vers, prot)
- *	char *host; 	-- hostname
- *	unsigned long prog;	-- program number
- *	u_ong vers;	-- version number
- *	char *prot;	-- protocol
+ *  char *host;     -- hostname
+ *  unsigned long prog; -- program number
+ *  u_ong vers; -- version number
+ *  char *prot; -- protocol
  */
 extern CLIENT *clnt_create (const char *__host, const unsigned long __prog,
-			    const unsigned long __vers, const char *__prot)
+                const unsigned long __vers, const char *__prot)
     ;
 
 /*
  * UDP based rpc.
  * CLIENT *
  * clntudp_create(raddr, program, version, wait, sockp)
- *	struct sockaddr_in *raddr;
- *	unsigned long program;
- *	unsigned long version;
- *	struct timeval wait_resend;
- *	int *sockp;
+ *  struct sockaddr_in *raddr;
+ *  unsigned long program;
+ *  unsigned long version;
+ *  struct timeval wait_resend;
+ *  int *sockp;
  *
  * Same as above, but you specify max packet sizes.
  * CLIENT *
  * clntudp_bufcreate(raddr, program, version, wait, sockp, sendsz, recvsz)
- *	struct sockaddr_in *raddr;
- *	unsigned long program;
- *	unsigned long version;
- *	struct timeval wait_resend;
- *	int *sockp;
- *	unsigned int sendsz;
- *	unsigned int recvsz;
+ *  struct sockaddr_in *raddr;
+ *  unsigned long program;
+ *  unsigned long version;
+ *  struct timeval wait_resend;
+ *  int *sockp;
+ *  unsigned int sendsz;
+ *  unsigned int recvsz;
  */
 extern CLIENT *clntudp_create (struct sockaddr_in *__raddr, unsigned long __program,
-			       unsigned long __version, struct timeval __wait_resend,
-			       int *__sockp);
+                   unsigned long __version, struct timeval __wait_resend,
+                   int *__sockp);
 extern CLIENT *clntudp_bufcreate (struct sockaddr_in *__raddr,
-				  unsigned long __program, unsigned long __version,
-				  struct timeval __wait_resend, int *__sockp,
-				  unsigned int __sendsz, unsigned int __recvsz);
+                  unsigned long __program, unsigned long __version,
+                  struct timeval __wait_resend, int *__sockp,
+                  unsigned int __sendsz, unsigned int __recvsz);
 
 extern int callrpc (const char *__host, const unsigned long __prognum,
-		    const unsigned long __versnum, const unsigned long __procnum,
-		    const xdrproc_t __inproc, const char *__in,
-		    const xdrproc_t __outproc, char *__out);
+            const unsigned long __versnum, const unsigned long __procnum,
+            const xdrproc_t __inproc, const char *__in,
+            const xdrproc_t __outproc, char *__out);
 
-#define UDPMSGSIZE	8800	/* rpc imposed limit on udp msg size */
-#define RPCSMALLMSGSIZE	400	/* a more reasonable packet size */
+#define UDPMSGSIZE  8800    /* rpc imposed limit on udp msg size */
+#define RPCSMALLMSGSIZE 400 /* a more reasonable packet size */
 
 void clnt_perror(CLIENT *rpch, const char *s);
 

+ 1 - 1
components/dfs/filesystems/nfs/rpc/clnt_generic.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 272 - 272
components/dfs/filesystems/nfs/rpc/clnt_udp.c

@@ -1,12 +1,12 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
  */
-/* @(#)clnt_udp.c	2.2 88/08/01 4.0 RPCSRC */
+/* @(#)clnt_udp.c   2.2 88/08/01 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
@@ -53,12 +53,12 @@ static char sccsid[] = "@(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro";
  * UDP bases client side rpc operations
  */
 static enum clnt_stat clntudp_call(register CLIENT *cl,         /* client handle */
-	unsigned long proc,          /* procedure number */
-	xdrproc_t xargs,             /* xdr routine for args */
-	char* argsp,                 /* pointer to args */
-	xdrproc_t xresults,          /* xdr routine for results */
-	char* resultsp,              /* pointer to results */
-	struct timeval utimeout);
+    unsigned long proc,          /* procedure number */
+    xdrproc_t xargs,             /* xdr routine for args */
+    char* argsp,                 /* pointer to args */
+    xdrproc_t xresults,          /* xdr routine for results */
+    char* resultsp,              /* pointer to results */
+    struct timeval utimeout);
 
 static void clntudp_abort(void);
 static void clntudp_geterr(CLIENT *, struct rpc_err *);
@@ -68,12 +68,12 @@ static void clntudp_destroy(CLIENT *);
 
 static struct clnt_ops udp_ops =
 {
-	clntudp_call,
-	clntudp_abort,
-	clntudp_geterr,
-	clntudp_freeres,
-	clntudp_destroy,
-	clntudp_control
+    clntudp_call,
+    clntudp_abort,
+    clntudp_geterr,
+    clntudp_freeres,
+    clntudp_destroy,
+    clntudp_control
 };
 
 /*
@@ -81,19 +81,19 @@ static struct clnt_ops udp_ops =
  */
 struct cu_data
 {
-	int cu_sock;
-	bool_t cu_closeit;
-	struct sockaddr_in cu_raddr;
-	int cu_rlen;
-	struct timeval cu_wait;
-	struct timeval cu_total;
-	struct rpc_err cu_error;
-	XDR cu_outxdrs;
-	unsigned int cu_xdrpos;
-	unsigned int cu_sendsz;
-	char *cu_outbuf;
-	unsigned int cu_recvsz;
-	char cu_inbuf[1];
+    int cu_sock;
+    bool_t cu_closeit;
+    struct sockaddr_in cu_raddr;
+    int cu_rlen;
+    struct timeval cu_wait;
+    struct timeval cu_total;
+    struct rpc_err cu_error;
+    XDR cu_outxdrs;
+    unsigned int cu_xdrpos;
+    unsigned int cu_sendsz;
+    char *cu_outbuf;
+    unsigned int cu_recvsz;
+    char cu_inbuf[1];
 };
 
 /*
@@ -112,241 +112,241 @@ struct cu_data
  * sendsz and recvsz are the maximum allowable packet sizes that can be
  * sent and received.
  */
-CLIENT *clntudp_bufcreate(struct sockaddr_in *raddr, 
-	unsigned long program, 
-	unsigned long version,
-	struct timeval wait, 
-	int *sockp, 
-	unsigned int sendsz,
-	unsigned int recvsz)
+CLIENT *clntudp_bufcreate(struct sockaddr_in *raddr,
+    unsigned long program,
+    unsigned long version,
+    struct timeval wait,
+    int *sockp,
+    unsigned int sendsz,
+    unsigned int recvsz)
 {
-	CLIENT *cl;
-	register struct cu_data *cu = NULL;
-	struct rpc_msg call_msg;
-	static int xid_count = 0;
-
-	cl = (CLIENT *) rt_malloc (sizeof(CLIENT));
-	if (cl == NULL)
-	{
-		rt_kprintf("clntudp_create: out of memory\n");
-		goto fooy;
-	}
-	sendsz = ((sendsz + 3) / 4) * 4;
-	recvsz = ((recvsz + 3) / 4) * 4;
-	cu = (struct cu_data *) rt_malloc (sizeof(*cu) + sendsz + recvsz);
-	if (cu == NULL)
-	{
-		rt_kprintf("clntudp_create: out of memory\n");
-		goto fooy;
-	}
-	cu->cu_outbuf = &cu->cu_inbuf[recvsz];
-
-	if (raddr->sin_port == 0) {
-		unsigned short port;
-		extern unsigned short pmap_getport(struct sockaddr_in *address, 
-			unsigned long program, 
-			unsigned long version, 
-			unsigned int protocol);
-
-		if ((port =
-			 pmap_getport(raddr, program, version, IPPROTO_UDP)) == 0) {
-			goto fooy;
-		}
-		raddr->sin_port = htons(port);
-	}
-
-	cl->cl_ops = &udp_ops;
-	cl->cl_private = (char*) cu;
-	cu->cu_raddr = *raddr;
-	cu->cu_rlen = sizeof(cu->cu_raddr);
-	cu->cu_wait = wait;
-	cu->cu_total.tv_sec = -1;
-	cu->cu_total.tv_usec = -1;
-	cu->cu_sendsz = sendsz;
-	cu->cu_recvsz = recvsz;
-	call_msg.rm_xid = ((unsigned long)rt_thread_self()) ^ ((unsigned long)rt_tick_get()) ^ (xid_count++);
-	call_msg.rm_direction = CALL;
-	call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;
-	call_msg.rm_call.cb_prog = program;
-	call_msg.rm_call.cb_vers = version;
-	xdrmem_create(&(cu->cu_outxdrs), cu->cu_outbuf, sendsz, XDR_ENCODE);
-	if (!xdr_callhdr(&(cu->cu_outxdrs), &call_msg))
-	{
-		goto fooy;
-	}
-	cu->cu_xdrpos = XDR_GETPOS(&(cu->cu_outxdrs));
-	if (*sockp < 0)
-	{
-		*sockp = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
-		if (*sockp < 0)
-		{
-			rt_kprintf("create socket error\n");
-			goto fooy;
-		}
-		cu->cu_closeit = TRUE;
-	}
-	else
-	{
-		cu->cu_closeit = FALSE;
-	}
-	cu->cu_sock = *sockp;
-	cl->cl_auth = authnone_create();
-	return (cl);
+    CLIENT *cl;
+    register struct cu_data *cu = NULL;
+    struct rpc_msg call_msg;
+    static int xid_count = 0;
+
+    cl = (CLIENT *) rt_malloc (sizeof(CLIENT));
+    if (cl == NULL)
+    {
+        rt_kprintf("clntudp_create: out of memory\n");
+        goto fooy;
+    }
+    sendsz = ((sendsz + 3) / 4) * 4;
+    recvsz = ((recvsz + 3) / 4) * 4;
+    cu = (struct cu_data *) rt_malloc (sizeof(*cu) + sendsz + recvsz);
+    if (cu == NULL)
+    {
+        rt_kprintf("clntudp_create: out of memory\n");
+        goto fooy;
+    }
+    cu->cu_outbuf = &cu->cu_inbuf[recvsz];
+
+    if (raddr->sin_port == 0) {
+        unsigned short port;
+        extern unsigned short pmap_getport(struct sockaddr_in *address,
+            unsigned long program,
+            unsigned long version,
+            unsigned int protocol);
+
+        if ((port =
+             pmap_getport(raddr, program, version, IPPROTO_UDP)) == 0) {
+            goto fooy;
+        }
+        raddr->sin_port = htons(port);
+    }
+
+    cl->cl_ops = &udp_ops;
+    cl->cl_private = (char*) cu;
+    cu->cu_raddr = *raddr;
+    cu->cu_rlen = sizeof(cu->cu_raddr);
+    cu->cu_wait = wait;
+    cu->cu_total.tv_sec = -1;
+    cu->cu_total.tv_usec = -1;
+    cu->cu_sendsz = sendsz;
+    cu->cu_recvsz = recvsz;
+    call_msg.rm_xid = ((unsigned long)rt_thread_self()) ^ ((unsigned long)rt_tick_get()) ^ (xid_count++);
+    call_msg.rm_direction = CALL;
+    call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;
+    call_msg.rm_call.cb_prog = program;
+    call_msg.rm_call.cb_vers = version;
+    xdrmem_create(&(cu->cu_outxdrs), cu->cu_outbuf, sendsz, XDR_ENCODE);
+    if (!xdr_callhdr(&(cu->cu_outxdrs), &call_msg))
+    {
+        goto fooy;
+    }
+    cu->cu_xdrpos = XDR_GETPOS(&(cu->cu_outxdrs));
+    if (*sockp < 0)
+    {
+        *sockp = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
+        if (*sockp < 0)
+        {
+            rt_kprintf("create socket error\n");
+            goto fooy;
+        }
+        cu->cu_closeit = TRUE;
+    }
+    else
+    {
+        cu->cu_closeit = FALSE;
+    }
+    cu->cu_sock = *sockp;
+    cl->cl_auth = authnone_create();
+    return (cl);
 
 fooy:
-	if (cu) rt_free(cu);
-	if (cl) rt_free(cl);
+    if (cu) rt_free(cu);
+    if (cl) rt_free(cl);
 
-	return ((CLIENT *) NULL);
+    return ((CLIENT *) NULL);
 }
 
-CLIENT *clntudp_create(struct sockaddr_in *raddr, 
-	unsigned long program, 
-	unsigned long version, 
-	struct timeval wait, 
-	int *sockp)
+CLIENT *clntudp_create(struct sockaddr_in *raddr,
+    unsigned long program,
+    unsigned long version,
+    struct timeval wait,
+    int *sockp)
 {
-	return (clntudp_bufcreate(raddr, program, version, wait, sockp,
-							  UDPMSGSIZE, UDPMSGSIZE));
+    return (clntudp_bufcreate(raddr, program, version, wait, sockp,
+                              UDPMSGSIZE, UDPMSGSIZE));
 }
 
-static enum clnt_stat clntudp_call(CLIENT *cl, unsigned long proc, 
-	xdrproc_t xargs, char* argsp, 
-	xdrproc_t xresults, char* resultsp, 
-	struct timeval utimeout)
+static enum clnt_stat clntudp_call(CLIENT *cl, unsigned long proc,
+    xdrproc_t xargs, char* argsp,
+    xdrproc_t xresults, char* resultsp,
+    struct timeval utimeout)
 {
-	register struct cu_data *cu = (struct cu_data *) cl->cl_private;
-	register XDR *xdrs;
-	register int outlen;
-	register int inlen;
-	socklen_t fromlen;
-
-	struct sockaddr_in from;
-	struct rpc_msg reply_msg;
-	XDR reply_xdrs;
-	bool_t ok;
-	int nrefreshes = 2;			/* number of times to refresh cred */
+    register struct cu_data *cu = (struct cu_data *) cl->cl_private;
+    register XDR *xdrs;
+    register int outlen;
+    register int inlen;
+    socklen_t fromlen;
+
+    struct sockaddr_in from;
+    struct rpc_msg reply_msg;
+    XDR reply_xdrs;
+    bool_t ok;
+    int nrefreshes = 2;         /* number of times to refresh cred */
 
 call_again:
-	xdrs = &(cu->cu_outxdrs);
-	xdrs->x_op = XDR_ENCODE;
-	XDR_SETPOS(xdrs, cu->cu_xdrpos);
+    xdrs = &(cu->cu_outxdrs);
+    xdrs->x_op = XDR_ENCODE;
+    XDR_SETPOS(xdrs, cu->cu_xdrpos);
 
-	/*
-	 * the transaction is the first thing in the out buffer
-	 */
-	(*(unsigned long *) (cu->cu_outbuf))++;
+    /*
+     * the transaction is the first thing in the out buffer
+     */
+    (*(unsigned long *) (cu->cu_outbuf))++;
 
-	if ((!XDR_PUTLONG(xdrs, (long *) &proc)) ||
-			(!AUTH_MARSHALL(cl->cl_auth, xdrs)) || (!(*xargs) (xdrs, argsp)))
+    if ((!XDR_PUTLONG(xdrs, (long *) &proc)) ||
+            (!AUTH_MARSHALL(cl->cl_auth, xdrs)) || (!(*xargs) (xdrs, argsp)))
     {
         cu->cu_error.re_status = RPC_CANTENCODEARGS;
-		return RPC_CANTENCODEARGS;
+        return RPC_CANTENCODEARGS;
     }
-	outlen = (int) XDR_GETPOS(xdrs);
+    outlen = (int) XDR_GETPOS(xdrs);
 
 send_again:
-	if (sendto(cu->cu_sock, cu->cu_outbuf, outlen, 0,
-			   (struct sockaddr *) &(cu->cu_raddr), cu->cu_rlen)
-			!= outlen)
-	{
-		cu->cu_error.re_errno = errno;
+    if (sendto(cu->cu_sock, cu->cu_outbuf, outlen, 0,
+               (struct sockaddr *) &(cu->cu_raddr), cu->cu_rlen)
+            != outlen)
+    {
+        cu->cu_error.re_errno = errno;
         cu->cu_error.re_status = RPC_CANTSEND;
-        
-		return RPC_CANTSEND;
-	}
-
-	/*
-	 * sub-optimal code appears here because we have
-	 * some clock time to spare while the packets are in flight.
-	 * (We assume that this is actually only executed once.)
-	 */
-	reply_msg.acpted_rply.ar_verf = _null_auth;
-	reply_msg.acpted_rply.ar_results.where = resultsp;
-	reply_msg.acpted_rply.ar_results.proc = xresults;
-
-	/* do recv */
-	do
-	{
-		fromlen = sizeof(struct sockaddr);
-
-		inlen = recvfrom(cu->cu_sock, cu->cu_inbuf,
-						 (int) cu->cu_recvsz, 0,
-						 (struct sockaddr *) &from, &fromlen);
-	}while (inlen < 0 && errno == EINTR);
-
-	if (inlen < 4)
-	{
-		rt_kprintf("recv error, len %d\n", inlen);
-		cu->cu_error.re_errno = errno;
-		cu->cu_error.re_status = RPC_CANTRECV;
-		
-		return RPC_CANTRECV;
-	}
-
-	/* see if reply transaction id matches sent id */
-	if (*((uint32_t *) (cu->cu_inbuf)) != *((uint32_t *) (cu->cu_outbuf)))
-		goto send_again;
-
-	/* we now assume we have the proper reply */
-
-	/*
-	 * now decode and validate the response
-	 */
-	xdrmem_create(&reply_xdrs, cu->cu_inbuf, (unsigned int) inlen, XDR_DECODE);
-	ok = xdr_replymsg(&reply_xdrs, &reply_msg);
-	/* XDR_DESTROY(&reply_xdrs);  save a few cycles on noop destroy */
-	if (ok)
-	{
-		_seterr_reply(&reply_msg, &(cu->cu_error));
-		if (cu->cu_error.re_status == RPC_SUCCESS)
-		{
-			if (!AUTH_VALIDATE(cl->cl_auth,
-							   &reply_msg.acpted_rply.ar_verf))
-			{
-				cu->cu_error.re_status = RPC_AUTHERROR;
-				cu->cu_error.re_why = AUTH_INVALIDRESP;
-			}
-			if (reply_msg.acpted_rply.ar_verf.oa_base != NULL)
-			{
-				extern bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);
-				
-				xdrs->x_op = XDR_FREE;
-				(void) xdr_opaque_auth(xdrs, &(reply_msg.acpted_rply.ar_verf));
-			}
-		} /* end successful completion */
-		else
-		{
-			/* maybe our credentials need to be refreshed ... */
-			if (nrefreshes > 0 && AUTH_REFRESH(cl->cl_auth))
-			{
-				nrefreshes--;
-				goto call_again;
-			}
-		} /* end of unsuccessful completion */
-	} /* end of valid reply message */
-	else
-	{
-		cu->cu_error.re_status = RPC_CANTDECODERES;
-	}
-
-	return (enum clnt_stat)(cu->cu_error.re_status);
+
+        return RPC_CANTSEND;
+    }
+
+    /*
+     * sub-optimal code appears here because we have
+     * some clock time to spare while the packets are in flight.
+     * (We assume that this is actually only executed once.)
+     */
+    reply_msg.acpted_rply.ar_verf = _null_auth;
+    reply_msg.acpted_rply.ar_results.where = resultsp;
+    reply_msg.acpted_rply.ar_results.proc = xresults;
+
+    /* do recv */
+    do
+    {
+        fromlen = sizeof(struct sockaddr);
+
+        inlen = recvfrom(cu->cu_sock, cu->cu_inbuf,
+                         (int) cu->cu_recvsz, 0,
+                         (struct sockaddr *) &from, &fromlen);
+    }while (inlen < 0 && errno == EINTR);
+
+    if (inlen < 4)
+    {
+        rt_kprintf("recv error, len %d\n", inlen);
+        cu->cu_error.re_errno = errno;
+        cu->cu_error.re_status = RPC_CANTRECV;
+
+        return RPC_CANTRECV;
+    }
+
+    /* see if reply transaction id matches sent id */
+    if (*((uint32_t *) (cu->cu_inbuf)) != *((uint32_t *) (cu->cu_outbuf)))
+        goto send_again;
+
+    /* we now assume we have the proper reply */
+
+    /*
+     * now decode and validate the response
+     */
+    xdrmem_create(&reply_xdrs, cu->cu_inbuf, (unsigned int) inlen, XDR_DECODE);
+    ok = xdr_replymsg(&reply_xdrs, &reply_msg);
+    /* XDR_DESTROY(&reply_xdrs);  save a few cycles on noop destroy */
+    if (ok)
+    {
+        _seterr_reply(&reply_msg, &(cu->cu_error));
+        if (cu->cu_error.re_status == RPC_SUCCESS)
+        {
+            if (!AUTH_VALIDATE(cl->cl_auth,
+                               &reply_msg.acpted_rply.ar_verf))
+            {
+                cu->cu_error.re_status = RPC_AUTHERROR;
+                cu->cu_error.re_why = AUTH_INVALIDRESP;
+            }
+            if (reply_msg.acpted_rply.ar_verf.oa_base != NULL)
+            {
+                extern bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);
+
+                xdrs->x_op = XDR_FREE;
+                (void) xdr_opaque_auth(xdrs, &(reply_msg.acpted_rply.ar_verf));
+            }
+        } /* end successful completion */
+        else
+        {
+            /* maybe our credentials need to be refreshed ... */
+            if (nrefreshes > 0 && AUTH_REFRESH(cl->cl_auth))
+            {
+                nrefreshes--;
+                goto call_again;
+            }
+        } /* end of unsuccessful completion */
+    } /* end of valid reply message */
+    else
+    {
+        cu->cu_error.re_status = RPC_CANTDECODERES;
+    }
+
+    return (enum clnt_stat)(cu->cu_error.re_status);
 }
 
 static void clntudp_geterr(CLIENT *cl, struct rpc_err *errp)
 {
-	register struct cu_data *cu = (struct cu_data *) cl->cl_private;
+    register struct cu_data *cu = (struct cu_data *) cl->cl_private;
 
-	*errp = cu->cu_error;
+    *errp = cu->cu_error;
 }
 
 static bool_t clntudp_freeres(CLIENT *cl, xdrproc_t xdr_res, char* res_ptr)
 {
-	register struct cu_data *cu = (struct cu_data *) cl->cl_private;
-	register XDR *xdrs = &(cu->cu_outxdrs);
+    register struct cu_data *cu = (struct cu_data *) cl->cl_private;
+    register XDR *xdrs = &(cu->cu_outxdrs);
 
-	xdrs->x_op = XDR_FREE;
-	return ((*xdr_res) (xdrs, res_ptr));
+    xdrs->x_op = XDR_FREE;
+    return ((*xdr_res) (xdrs, res_ptr));
 }
 
 static void clntudp_abort()
@@ -355,50 +355,50 @@ static void clntudp_abort()
 
 static bool_t clntudp_control(CLIENT *cl, int request, char *info)
 {
-	register struct cu_data *cu = (struct cu_data *) cl->cl_private;
-
-	switch (request)
-	{
-	case CLSET_TIMEOUT:
-		{
-		int mtimeout;
-
-		cu->cu_total = *(struct timeval *) info;
-		mtimeout = ((cu->cu_total.tv_sec * 1000) + ((cu->cu_total.tv_usec + 500)/1000));
-
-		/* set socket option, note: lwip only support msecond timeout */
-		setsockopt(cu->cu_sock, SOL_SOCKET, SO_RCVTIMEO, 
-			&mtimeout, sizeof(mtimeout));
-		}
-		break;
-	case CLGET_TIMEOUT:
-		*(struct timeval *) info = cu->cu_total;
-		break;
-	case CLSET_RETRY_TIMEOUT:
-		cu->cu_wait = *(struct timeval *) info;
-		break;
-	case CLGET_RETRY_TIMEOUT:
-		*(struct timeval *) info = cu->cu_wait;
-		break;
-	case CLGET_SERVER_ADDR:
-		*(struct sockaddr_in *) info = cu->cu_raddr;
-		break;
-	default:
-		return (FALSE);
-	}
-	return (TRUE);
+    register struct cu_data *cu = (struct cu_data *) cl->cl_private;
+
+    switch (request)
+    {
+    case CLSET_TIMEOUT:
+        {
+        int mtimeout;
+
+        cu->cu_total = *(struct timeval *) info;
+        mtimeout = ((cu->cu_total.tv_sec * 1000) + ((cu->cu_total.tv_usec + 500)/1000));
+
+        /* set socket option, note: lwip only support msecond timeout */
+        setsockopt(cu->cu_sock, SOL_SOCKET, SO_RCVTIMEO,
+            &mtimeout, sizeof(mtimeout));
+        }
+        break;
+    case CLGET_TIMEOUT:
+        *(struct timeval *) info = cu->cu_total;
+        break;
+    case CLSET_RETRY_TIMEOUT:
+        cu->cu_wait = *(struct timeval *) info;
+        break;
+    case CLGET_RETRY_TIMEOUT:
+        *(struct timeval *) info = cu->cu_wait;
+        break;
+    case CLGET_SERVER_ADDR:
+        *(struct sockaddr_in *) info = cu->cu_raddr;
+        break;
+    default:
+        return (FALSE);
+    }
+    return (TRUE);
 }
 
 static void clntudp_destroy(CLIENT *cl)
 {
-	register struct cu_data *cu = (struct cu_data *) cl->cl_private;
+    register struct cu_data *cu = (struct cu_data *) cl->cl_private;
 
-	if (cu->cu_closeit)
-	{
-		lwip_close(cu->cu_sock);
-	}
+    if (cu->cu_closeit)
+    {
+        lwip_close(cu->cu_sock);
+    }
 
-	XDR_DESTROY(&(cu->cu_outxdrs));
-	rt_free(cu);
-	rt_free(cl);
+    XDR_DESTROY(&(cu->cu_outxdrs));
+    rt_free(cu);
+    rt_free(cl);
 }

+ 35 - 35
components/dfs/filesystems/nfs/rpc/pmap.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -16,11 +16,11 @@ static struct timeval tottimeout = { 60, 0 };
 
 bool_t xdr_pmap(XDR *xdrs, struct pmap *regs)
 {
-	if (xdr_u_long(xdrs, &regs->pm_prog) &&
-		xdr_u_long(xdrs, &regs->pm_vers) &&
-		xdr_u_long(xdrs, &regs->pm_prot))
-			return (xdr_u_long(xdrs, &regs->pm_port));
-	return (FALSE);
+    if (xdr_u_long(xdrs, &regs->pm_prog) &&
+        xdr_u_long(xdrs, &regs->pm_vers) &&
+        xdr_u_long(xdrs, &regs->pm_prot))
+            return (xdr_u_long(xdrs, &regs->pm_port));
+    return (FALSE);
 }
 
 /*
@@ -30,33 +30,33 @@ bool_t xdr_pmap(XDR *xdrs, struct pmap *regs)
  */
 unsigned short pmap_getport(struct sockaddr_in *address, unsigned long program, unsigned long version, unsigned int protocol)
 {
-	unsigned short port = 0;
-	int socket = -1;
-	register CLIENT *client = RT_NULL;
-	struct pmap parms;
-
-	address->sin_port = htons((unsigned short)PMAPPORT);
-	if (protocol == IPPROTO_UDP)
-	  client = clntudp_bufcreate(address, PMAPPROG, PMAPVERS, timeout,
-								  &socket, RPCSMALLMSGSIZE,
-							   RPCSMALLMSGSIZE);
-
-	if (client != (CLIENT *) NULL)
-	{
-		parms.pm_prog = program;
-		parms.pm_vers = version;
-		parms.pm_prot = protocol;
-		parms.pm_port = 0;		/* not needed or used */
-		if (CLNT_CALL(client, PMAPPROC_GETPORT, (xdrproc_t)xdr_pmap, (char*)&parms,
-					  (xdrproc_t)xdr_u_short, (char*)&port, tottimeout) != RPC_SUCCESS)
-		{
-			rt_kprintf("pmap failure\n");
-		}
-		CLNT_DESTROY(client);
-	}
-
-	(void) lwip_close(socket);
-	address->sin_port = 0;
-
-	return (port);
+    unsigned short port = 0;
+    int socket = -1;
+    register CLIENT *client = RT_NULL;
+    struct pmap parms;
+
+    address->sin_port = htons((unsigned short)PMAPPORT);
+    if (protocol == IPPROTO_UDP)
+      client = clntudp_bufcreate(address, PMAPPROG, PMAPVERS, timeout,
+                                  &socket, RPCSMALLMSGSIZE,
+                               RPCSMALLMSGSIZE);
+
+    if (client != (CLIENT *) NULL)
+    {
+        parms.pm_prog = program;
+        parms.pm_vers = version;
+        parms.pm_prot = protocol;
+        parms.pm_port = 0;      /* not needed or used */
+        if (CLNT_CALL(client, PMAPPROC_GETPORT, (xdrproc_t)xdr_pmap, (char*)&parms,
+                      (xdrproc_t)xdr_u_short, (char*)&port, tottimeout) != RPC_SUCCESS)
+        {
+            rt_kprintf("pmap failure\n");
+        }
+        CLNT_DESTROY(client);
+    }
+
+    (void) lwip_close(socket);
+    address->sin_port = 0;
+
+    return (port);
 }

+ 29 - 29
components/dfs/filesystems/nfs/rpc/pmap.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -14,51 +14,51 @@
 /* The following procedures are supported by the protocol:
  *
  * PMAPPROC_NULL() returns ()
- * 	takes nothing, returns nothing
+ *  takes nothing, returns nothing
  *
  * PMAPPROC_SET(struct pmap) returns (bool_t)
- * 	TRUE is success, FALSE is failure.  Registers the tuple
- *	[prog, vers, prot, port].
+ *  TRUE is success, FALSE is failure.  Registers the tuple
+ *  [prog, vers, prot, port].
  *
  * PMAPPROC_UNSET(struct pmap) returns (bool_t)
- *	TRUE is success, FALSE is failure.  Un-registers pair
- *	[prog, vers].  prot and port are ignored.
+ *  TRUE is success, FALSE is failure.  Un-registers pair
+ *  [prog, vers].  prot and port are ignored.
  *
  * PMAPPROC_GETPORT(struct pmap) returns (long unsigned).
- *	0 is failure.  Otherwise returns the port number where the pair
- *	[prog, vers] is registered.  It may lie!
+ *  0 is failure.  Otherwise returns the port number where the pair
+ *  [prog, vers] is registered.  It may lie!
  *
  * PMAPPROC_DUMP() RETURNS (struct pmaplist *)
  *
  * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>)
- * 	RETURNS (port, string<>);
+ *  RETURNS (port, string<>);
  * usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs);
- * 	Calls the procedure on the local machine.  If it is not registered,
- *	this procedure is quite; ie it does not return error information!!!
- *	This procedure only is supported on rpc/udp and calls via
- *	rpc/udp.  This routine only passes null authentication parameters.
- *	This file has no interface to xdr routines for PMAPPROC_CALLIT.
+ *  Calls the procedure on the local machine.  If it is not registered,
+ *  this procedure is quite; ie it does not return error information!!!
+ *  This procedure only is supported on rpc/udp and calls via
+ *  rpc/udp.  This routine only passes null authentication parameters.
+ *  This file has no interface to xdr routines for PMAPPROC_CALLIT.
  *
  * The service supports remote procedure calls on udp/ip or tcp/ip socket 111.
  */
 
-#define PMAPPORT		((unsigned short)111)
-#define PMAPPROG		((unsigned long)100000)
-#define PMAPVERS		((unsigned long)2)
-#define PMAPVERS_PROTO		((unsigned long)2)
-#define PMAPVERS_ORIG		((unsigned long)1)
-#define PMAPPROC_NULL		((unsigned long)0)
-#define PMAPPROC_SET		((unsigned long)1)
-#define PMAPPROC_UNSET		((unsigned long)2)
-#define PMAPPROC_GETPORT	((unsigned long)3)
-#define PMAPPROC_DUMP		((unsigned long)4)
-#define PMAPPROC_CALLIT		((unsigned long)5)
+#define PMAPPORT        ((unsigned short)111)
+#define PMAPPROG        ((unsigned long)100000)
+#define PMAPVERS        ((unsigned long)2)
+#define PMAPVERS_PROTO      ((unsigned long)2)
+#define PMAPVERS_ORIG       ((unsigned long)1)
+#define PMAPPROC_NULL       ((unsigned long)0)
+#define PMAPPROC_SET        ((unsigned long)1)
+#define PMAPPROC_UNSET      ((unsigned long)2)
+#define PMAPPROC_GETPORT    ((unsigned long)3)
+#define PMAPPROC_DUMP       ((unsigned long)4)
+#define PMAPPROC_CALLIT     ((unsigned long)5)
 
 struct pmap {
-	long unsigned pm_prog;
-	long unsigned pm_vers;
-	long unsigned pm_prot;
-	long unsigned pm_port;
+    long unsigned pm_prog;
+    long unsigned pm_vers;
+    long unsigned pm_prot;
+    long unsigned pm_port;
 };
 
 extern bool_t xdr_pmap (XDR *__xdrs, struct pmap *__regs);

+ 6 - 6
components/dfs/filesystems/nfs/rpc/rpc.h

@@ -1,12 +1,12 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
  */
-/* @(#)rpc.h	2.3 88/08/10 4.0 RPCSRC; from 1.9 88/02/08 SMI */
+/* @(#)rpc.h    2.3 88/08/10 4.0 RPCSRC; from 1.9 88/02/08 SMI */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
@@ -46,17 +46,17 @@
 #ifndef _RPC_RPC_H
 #define _RPC_RPC_H 1
 
-#include <rpc/types.h>		/* some typedefs */
+#include <rpc/types.h>      /* some typedefs */
 
 /* external data representation interfaces */
-#include <rpc/xdr.h>		/* generic (de)serializer */
+#include <rpc/xdr.h>        /* generic (de)serializer */
 
 #include <rpc/auth.h>
 
 /* Client side (mostly) remote procedure call */
-#include <rpc/clnt.h>		/* generic rpc stuff */
+#include <rpc/clnt.h>       /* generic rpc stuff */
 
 /* semi-private protocol headers */
-#include <rpc/rpc_msg.h>	/* protocol for rpc messages */
+#include <rpc/rpc_msg.h>    /* protocol for rpc messages */
 
 #endif

+ 76 - 76
components/dfs/filesystems/nfs/rpc/rpc_msg.h

@@ -1,12 +1,12 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
  */
-/* @(#)rpc_msg.h	2.1 88/07/29 4.0 RPCSRC */
+/* @(#)rpc_msg.h    2.1 88/07/29 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
@@ -50,8 +50,8 @@
  * Copyright (C) 1984, Sun Microsystems, Inc.
  */
 
-#define RPC_MSG_VERSION		((unsigned long) 2)
-#define RPC_SERVICE_PORT	((unsigned short) 2048)
+#define RPC_MSG_VERSION     ((unsigned long) 2)
+#define RPC_SERVICE_PORT    ((unsigned short) 2048)
 
 /*
  * Bottom up definition of an rpc message.
@@ -60,27 +60,27 @@
  */
 
 enum msg_type {
-	CALL=0,
-	REPLY=1
+    CALL=0,
+    REPLY=1
 };
 
 enum reply_stat {
-	MSG_ACCEPTED=0,
-	MSG_DENIED=1
+    MSG_ACCEPTED=0,
+    MSG_DENIED=1
 };
 
 enum accept_stat {
-	SUCCESS=0,
-	PROG_UNAVAIL=1,
-	PROG_MISMATCH=2,
-	PROC_UNAVAIL=3,
-	GARBAGE_ARGS=4,
-	SYSTEM_ERR=5
+    SUCCESS=0,
+    PROG_UNAVAIL=1,
+    PROG_MISMATCH=2,
+    PROC_UNAVAIL=3,
+    GARBAGE_ARGS=4,
+    SYSTEM_ERR=5
 };
 
 enum reject_stat {
-	RPC_MISMATCH=0,
-	AUTH_ERROR=1
+    RPC_MISMATCH=0,
+    AUTH_ERROR=1
 };
 
 /*
@@ -93,111 +93,111 @@ enum reject_stat {
  * accepted.
  */
 struct accepted_reply {
-	struct opaque_auth	ar_verf;
-	int	                ar_stat;
-	union {
-		struct {
-			unsigned long	low;
-			unsigned long	high;
-		} AR_versions;
-		struct {
-			char*	where;
-			xdrproc_t proc;
-		} AR_results;
-		/* and many other null cases */
-	} ru;
-#define	ar_results	ru.AR_results
-#define	ar_vers		ru.AR_versions
+    struct opaque_auth  ar_verf;
+    int                 ar_stat;
+    union {
+        struct {
+            unsigned long   low;
+            unsigned long   high;
+        } AR_versions;
+        struct {
+            char*   where;
+            xdrproc_t proc;
+        } AR_results;
+        /* and many other null cases */
+    } ru;
+#define ar_results  ru.AR_results
+#define ar_vers     ru.AR_versions
 };
 
 /*
  * Reply to an rpc request that was rejected by the server.
  */
 struct rejected_reply {
-	int rj_stat;
-	union {
-		struct {
-			unsigned long low;
-			unsigned long high;
-		} RJ_versions;
-		int RJ_why;  /* why authentication did not work */
-	} ru;
-#define	rj_vers	ru.RJ_versions
-#define	rj_why	ru.RJ_why
+    int rj_stat;
+    union {
+        struct {
+            unsigned long low;
+            unsigned long high;
+        } RJ_versions;
+        int RJ_why;  /* why authentication did not work */
+    } ru;
+#define rj_vers ru.RJ_versions
+#define rj_why  ru.RJ_why
 };
 
 /*
  * Body of a reply to an rpc request.
  */
 struct reply_body {
-	int rp_stat;
-	union {
-		struct accepted_reply RP_ar;
-		struct rejected_reply RP_dr;
-	} ru;
-#define	rp_acpt	ru.RP_ar
-#define	rp_rjct	ru.RP_dr
+    int rp_stat;
+    union {
+        struct accepted_reply RP_ar;
+        struct rejected_reply RP_dr;
+    } ru;
+#define rp_acpt ru.RP_ar
+#define rp_rjct ru.RP_dr
 };
 
 /*
  * Body of an rpc request call.
  */
 struct call_body {
-	unsigned long cb_rpcvers;	/* must be equal to two */
-	unsigned long cb_prog;
-	unsigned long cb_vers;
-	unsigned long cb_proc;
-	struct opaque_auth cb_cred;
-	struct opaque_auth cb_verf; /* protocol specific - provided by client */
+    unsigned long cb_rpcvers;   /* must be equal to two */
+    unsigned long cb_prog;
+    unsigned long cb_vers;
+    unsigned long cb_proc;
+    struct opaque_auth cb_cred;
+    struct opaque_auth cb_verf; /* protocol specific - provided by client */
 };
 
 /*
  * The rpc message
  */
 struct rpc_msg {
-	unsigned long	rm_xid;
-	int				rm_direction;
-	union {
-		struct call_body RM_cmb;
-		struct reply_body RM_rmb;
-	} ru;
-#define	rm_call		ru.RM_cmb
-#define	rm_reply	ru.RM_rmb
+    unsigned long   rm_xid;
+    int             rm_direction;
+    union {
+        struct call_body RM_cmb;
+        struct reply_body RM_rmb;
+    } ru;
+#define rm_call     ru.RM_cmb
+#define rm_reply    ru.RM_rmb
 };
-#define	acpted_rply	ru.RM_rmb.ru.RP_ar
-#define	rjcted_rply	ru.RM_rmb.ru.RP_dr
+#define acpted_rply ru.RM_rmb.ru.RP_ar
+#define rjcted_rply ru.RM_rmb.ru.RP_dr
 
 
 /*
  * XDR routine to handle a rpc message.
  * xdr_callmsg(xdrs, cmsg)
- * 	XDR *xdrs;
- * 	struct rpc_msg *cmsg;
+ *  XDR *xdrs;
+ *  struct rpc_msg *cmsg;
  */
-extern bool_t	xdr_callmsg (XDR *__xdrs, struct rpc_msg *__cmsg);
+extern bool_t   xdr_callmsg (XDR *__xdrs, struct rpc_msg *__cmsg);
 
 /*
  * XDR routine to pre-serialize the static part of a rpc message.
  * xdr_callhdr(xdrs, cmsg)
- * 	XDR *xdrs;
- * 	struct rpc_msg *cmsg;
+ *  XDR *xdrs;
+ *  struct rpc_msg *cmsg;
  */
-extern bool_t	xdr_callhdr (XDR *__xdrs, struct rpc_msg *__cmsg);
+extern bool_t   xdr_callhdr (XDR *__xdrs, struct rpc_msg *__cmsg);
 
 /*
  * XDR routine to handle a rpc reply.
  * xdr_replymsg(xdrs, rmsg)
- * 	XDR *xdrs;
- * 	struct rpc_msg *rmsg;
+ *  XDR *xdrs;
+ *  struct rpc_msg *rmsg;
  */
-extern bool_t	xdr_replymsg (XDR *__xdrs, struct rpc_msg *__rmsg);
+extern bool_t   xdr_replymsg (XDR *__xdrs, struct rpc_msg *__rmsg);
 
 /*
  * Fills in the error part of a reply message.
  * _seterr_reply(msg, error)
- * 	struct rpc_msg *msg;
- * 	struct rpc_err *error;
+ *  struct rpc_msg *msg;
+ *  struct rpc_err *error;
  */
-extern void	_seterr_reply (struct rpc_msg *__msg, struct rpc_err *__error);
+extern void _seterr_reply (struct rpc_msg *__msg, struct rpc_err *__error);
 
 #endif /* rpc/rpc_msg.h */

+ 132 - 132
components/dfs/filesystems/nfs/rpc/rpc_prot.c

@@ -1,12 +1,12 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
  */
-/* @(#)rpc_prot.c	2.3 88/08/07 4.0 RPCSRC */
+/* @(#)rpc_prot.c   2.3 88/08/07 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
@@ -14,23 +14,23 @@
  * may copy or modify Sun RPC without charge, but are not authorized
  * to license or distribute it to anyone else except as part of a product or
  * program developed by the user.
- * 
+ *
  * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
  * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- * 
+ *
  * Sun RPC is provided with no support and without any obligation on the
  * part of Sun Microsystems, Inc. to assist in its use, correction,
  * modification or enhancement.
- * 
+ *
  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
  * OR ANY PART THEREOF.
- * 
+ *
  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
  * or profits or other special, indirect and consequential damages, even if
  * Sun has been advised of the possibility of such damages.
- * 
+ *
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
@@ -63,10 +63,10 @@ static char sccsid[] = "@(#)rpc_prot.c 1.36 87/08/11 Copyr 1984 Sun Micro";
 bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap)
 {
 
-	if (xdr_enum(xdrs, &(ap->oa_flavor)))
-		return (xdr_bytes(xdrs, &ap->oa_base,
-						  &ap->oa_length, MAX_AUTH_BYTES));
-	return (FALSE);
+    if (xdr_enum(xdrs, &(ap->oa_flavor)))
+        return (xdr_bytes(xdrs, &ap->oa_base,
+                          &ap->oa_length, MAX_AUTH_BYTES));
+    return (FALSE);
 }
 
 /*
@@ -74,7 +74,7 @@ bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap)
  */
 bool_t xdr_des_block(XDR *xdrs, des_block *blkp)
 {
-	return (xdr_opaque(xdrs, (char*) blkp, sizeof(des_block)));
+    return (xdr_opaque(xdrs, (char*) blkp, sizeof(des_block)));
 }
 
 /* * * * * * * * * * * * * * XDR RPC MESSAGE * * * * * * * * * * * * * * * */
@@ -85,22 +85,22 @@ bool_t xdr_des_block(XDR *xdrs, des_block *blkp)
 static bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar)
 {
 
-	/* personalized union, rather than calling xdr_union */
-	if (!xdr_opaque_auth(xdrs, &(ar->ar_verf)))
-		return (FALSE);
-	if (!xdr_enum(xdrs, (enum_t *) & (ar->ar_stat)))
-		return (FALSE);
-	switch (ar->ar_stat) {
-
-	case SUCCESS:
-		return ((*(ar->ar_results.proc)) (xdrs, ar->ar_results.where));
-
-	case PROG_MISMATCH:
-		if (!xdr_u_long(xdrs, &(ar->ar_vers.low)))
-			return (FALSE);
-		return (xdr_u_long(xdrs, &(ar->ar_vers.high)));
-	}
-	return (TRUE);				/* TRUE => open ended set of problems */
+    /* personalized union, rather than calling xdr_union */
+    if (!xdr_opaque_auth(xdrs, &(ar->ar_verf)))
+        return (FALSE);
+    if (!xdr_enum(xdrs, (enum_t *) & (ar->ar_stat)))
+        return (FALSE);
+    switch (ar->ar_stat) {
+
+    case SUCCESS:
+        return ((*(ar->ar_results.proc)) (xdrs, ar->ar_results.where));
+
+    case PROG_MISMATCH:
+        if (!xdr_u_long(xdrs, &(ar->ar_vers.low)))
+            return (FALSE);
+        return (xdr_u_long(xdrs, &(ar->ar_vers.high)));
+    }
+    return (TRUE);              /* TRUE => open ended set of problems */
 }
 
 /*
@@ -109,26 +109,26 @@ static bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar)
 static bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr)
 {
 
-	/* personalized union, rather than calling xdr_union */
-	if (!xdr_enum(xdrs, (enum_t *) & (rr->rj_stat)))
-		return (FALSE);
-	switch (rr->rj_stat) {
+    /* personalized union, rather than calling xdr_union */
+    if (!xdr_enum(xdrs, (enum_t *) & (rr->rj_stat)))
+        return (FALSE);
+    switch (rr->rj_stat) {
 
-	case RPC_MISMATCH:
-		if (!xdr_u_long(xdrs, &(rr->rj_vers.low)))
-			return (FALSE);
-		return (xdr_u_long(xdrs, &(rr->rj_vers.high)));
+    case RPC_MISMATCH:
+        if (!xdr_u_long(xdrs, &(rr->rj_vers.low)))
+            return (FALSE);
+        return (xdr_u_long(xdrs, &(rr->rj_vers.high)));
 
-	case AUTH_ERROR:
-		return (xdr_enum(xdrs, (enum_t *) & (rr->rj_why)));
-	}
-	return (FALSE);
+    case AUTH_ERROR:
+        return (xdr_enum(xdrs, (enum_t *) & (rr->rj_why)));
+    }
+    return (FALSE);
 }
 
 static struct xdr_discrim reply_dscrm[3] = {
-	{(int) MSG_ACCEPTED, (xdrproc_t)xdr_accepted_reply},
-	{(int) MSG_DENIED, (xdrproc_t)xdr_rejected_reply},
-	{__dontcare__, NULL_xdrproc_t}
+    {(int) MSG_ACCEPTED, (xdrproc_t)xdr_accepted_reply},
+    {(int) MSG_DENIED, (xdrproc_t)xdr_rejected_reply},
+    {__dontcare__, NULL_xdrproc_t}
 };
 
 /*
@@ -136,13 +136,13 @@ static struct xdr_discrim reply_dscrm[3] = {
  */
 bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg)
 {
-	if (xdr_u_long(xdrs, &(rmsg->rm_xid)) &&
-		xdr_enum(xdrs, (enum_t *) & (rmsg->rm_direction)) &&
-		(rmsg->rm_direction == REPLY))
-		return (xdr_union(xdrs, (enum_t *) & (rmsg->rm_reply.rp_stat),
-						  (char*) & (rmsg->rm_reply.ru), reply_dscrm,
-						  NULL_xdrproc_t));
-	return (FALSE);
+    if (xdr_u_long(xdrs, &(rmsg->rm_xid)) &&
+        xdr_enum(xdrs, (enum_t *) & (rmsg->rm_direction)) &&
+        (rmsg->rm_direction == REPLY))
+        return (xdr_union(xdrs, (enum_t *) & (rmsg->rm_reply.rp_stat),
+                          (char*) & (rmsg->rm_reply.ru), reply_dscrm,
+                          NULL_xdrproc_t));
+    return (FALSE);
 }
 
 
@@ -154,16 +154,16 @@ bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg)
 bool_t xdr_callhdr(XDR *xdrs, struct rpc_msg *cmsg)
 {
 
-	cmsg->rm_direction = CALL;
-	cmsg->rm_call.cb_rpcvers = RPC_MSG_VERSION;
-	if (
-		(xdrs->x_op == XDR_ENCODE) &&
-		xdr_u_long(xdrs, &(cmsg->rm_xid)) &&
-		xdr_enum(xdrs, (enum_t *) & (cmsg->rm_direction)) &&
-		xdr_u_long(xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
-		xdr_u_long(xdrs, &(cmsg->rm_call.cb_prog)))
-			return (xdr_u_long(xdrs, &(cmsg->rm_call.cb_vers)));
-	return (FALSE);
+    cmsg->rm_direction = CALL;
+    cmsg->rm_call.cb_rpcvers = RPC_MSG_VERSION;
+    if (
+        (xdrs->x_op == XDR_ENCODE) &&
+        xdr_u_long(xdrs, &(cmsg->rm_xid)) &&
+        xdr_enum(xdrs, (enum_t *) & (cmsg->rm_direction)) &&
+        xdr_u_long(xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
+        xdr_u_long(xdrs, &(cmsg->rm_call.cb_prog)))
+            return (xdr_u_long(xdrs, &(cmsg->rm_call.cb_vers)));
+    return (FALSE);
 }
 
 /* ************************** Client utility routine ************* */
@@ -171,55 +171,55 @@ bool_t xdr_callhdr(XDR *xdrs, struct rpc_msg *cmsg)
 static void accepted(enum accept_stat acpt_stat, struct rpc_err *error)
 {
 
-	switch (acpt_stat) {
+    switch (acpt_stat) {
 
-	case PROG_UNAVAIL:
-		error->re_status = RPC_PROGUNAVAIL;
-		return;
+    case PROG_UNAVAIL:
+        error->re_status = RPC_PROGUNAVAIL;
+        return;
 
-	case PROG_MISMATCH:
-		error->re_status = RPC_PROGVERSMISMATCH;
-		return;
+    case PROG_MISMATCH:
+        error->re_status = RPC_PROGVERSMISMATCH;
+        return;
 
-	case PROC_UNAVAIL:
-		error->re_status = RPC_PROCUNAVAIL;
-		return;
+    case PROC_UNAVAIL:
+        error->re_status = RPC_PROCUNAVAIL;
+        return;
 
-	case GARBAGE_ARGS:
-		error->re_status = RPC_CANTDECODEARGS;
-		return;
+    case GARBAGE_ARGS:
+        error->re_status = RPC_CANTDECODEARGS;
+        return;
 
-	case SYSTEM_ERR:
-		error->re_status = RPC_SYSTEMERROR;
-		return;
+    case SYSTEM_ERR:
+        error->re_status = RPC_SYSTEMERROR;
+        return;
 
-	case SUCCESS:
-		error->re_status = RPC_SUCCESS;
-		return;
-	}
-	/* something's wrong, but we don't know what ... */
-	error->re_status = RPC_FAILED;
-	error->re_lb.s1 = (long) MSG_ACCEPTED;
-	error->re_lb.s2 = (long) acpt_stat;
+    case SUCCESS:
+        error->re_status = RPC_SUCCESS;
+        return;
+    }
+    /* something's wrong, but we don't know what ... */
+    error->re_status = RPC_FAILED;
+    error->re_lb.s1 = (long) MSG_ACCEPTED;
+    error->re_lb.s2 = (long) acpt_stat;
 }
 
 static void rejected(enum reject_stat rjct_stat, struct rpc_err *error)
 {
 
-	switch (rjct_stat) {
+    switch (rjct_stat) {
 
-	case RPC_VERSMISMATCH:
-		error->re_status = RPC_VERSMISMATCH;
-		return;
+    case RPC_VERSMISMATCH:
+        error->re_status = RPC_VERSMISMATCH;
+        return;
 
-	case AUTH_ERROR:
-		error->re_status = RPC_AUTHERROR;
-		return;
-	}
-	/* something's wrong, but we don't know what ... */
-	error->re_status = RPC_FAILED;
-	error->re_lb.s1 = (long) MSG_DENIED;
-	error->re_lb.s2 = (long) rjct_stat;
+    case AUTH_ERROR:
+        error->re_status = RPC_AUTHERROR;
+        return;
+    }
+    /* something's wrong, but we don't know what ... */
+    error->re_status = RPC_FAILED;
+    error->re_lb.s1 = (long) MSG_DENIED;
+    error->re_lb.s2 = (long) rjct_stat;
 }
 
 /*
@@ -228,40 +228,40 @@ static void rejected(enum reject_stat rjct_stat, struct rpc_err *error)
 void _seterr_reply(struct rpc_msg *msg, struct rpc_err *error)
 {
 
-	/* optimized for normal, SUCCESSful case */
-	switch (msg->rm_reply.rp_stat) {
-
-	case MSG_ACCEPTED:
-		if (msg->acpted_rply.ar_stat == SUCCESS) {
-			error->re_status = RPC_SUCCESS;
-			return;
-		};
-		accepted((enum accept_stat)msg->acpted_rply.ar_stat, error);
-		break;
-
-	case MSG_DENIED:
-		rejected((enum reject_stat)msg->rjcted_rply.rj_stat, error);
-		break;
-
-	default:
-		error->re_status = RPC_FAILED;
-		error->re_lb.s1 = (long) (msg->rm_reply.rp_stat);
-		break;
-	}
-	switch (error->re_status) {
-
-	case RPC_VERSMISMATCH:
-		error->re_vers.low = msg->rjcted_rply.rj_vers.low;
-		error->re_vers.high = msg->rjcted_rply.rj_vers.high;
-		break;
-
-	case RPC_AUTHERROR:
-		error->re_why = msg->rjcted_rply.rj_why;
-		break;
-
-	case RPC_PROGVERSMISMATCH:
-		error->re_vers.low = msg->acpted_rply.ar_vers.low;
-		error->re_vers.high = msg->acpted_rply.ar_vers.high;
-		break;
-	}
+    /* optimized for normal, SUCCESSful case */
+    switch (msg->rm_reply.rp_stat) {
+
+    case MSG_ACCEPTED:
+        if (msg->acpted_rply.ar_stat == SUCCESS) {
+            error->re_status = RPC_SUCCESS;
+            return;
+        };
+        accepted((enum accept_stat)msg->acpted_rply.ar_stat, error);
+        break;
+
+    case MSG_DENIED:
+        rejected((enum reject_stat)msg->rjcted_rply.rj_stat, error);
+        break;
+
+    default:
+        error->re_status = RPC_FAILED;
+        error->re_lb.s1 = (long) (msg->rm_reply.rp_stat);
+        break;
+    }
+    switch (error->re_status) {
+
+    case RPC_VERSMISMATCH:
+        error->re_vers.low = msg->rjcted_rply.rj_vers.low;
+        error->re_vers.high = msg->rjcted_rply.rj_vers.high;
+        break;
+
+    case RPC_AUTHERROR:
+        error->re_why = msg->rjcted_rply.rj_why;
+        break;
+
+    case RPC_PROGVERSMISMATCH:
+        error->re_vers.low = msg->acpted_rply.ar_vers.low;
+        error->re_vers.high = msg->acpted_rply.ar_vers.high;
+        break;
+    }
 }

+ 1 - 1
components/dfs/filesystems/nfs/rpc/types.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

File diff suppressed because it is too large
+ 404 - 404
components/dfs/filesystems/nfs/rpc/xdr.c


+ 87 - 87
components/dfs/filesystems/nfs/rpc/xdr.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -93,7 +93,7 @@ enum xdr_op {
 /*
  * This is the number of bytes per unit of external data.
  */
-#define BYTES_PER_XDR_UNIT	(4)
+#define BYTES_PER_XDR_UNIT  (4)
 /*
  * This only works if the above is a power of 2.  But it's defined to be
  * 4 by the appropriate RFCs.  So it will work.  And it's normally quicker
@@ -110,35 +110,35 @@ enum xdr_op {
 typedef struct XDR XDR;
 struct XDR
   {
-    enum xdr_op x_op;		/* operation; fast additional param */
+    enum xdr_op x_op;       /* operation; fast additional param */
     struct xdr_ops
       {
-	bool_t (*x_getlong) (XDR *__xdrs, long *__lp);
-	/* get a long from underlying stream */
-	bool_t (*x_putlong) (XDR *__xdrs, const long *__lp);
-	/* put a long to " */
-	bool_t (*x_getbytes) (XDR *__xdrs, char* __addr, unsigned int __len);
-	/* get some bytes from " */
-	bool_t (*x_putbytes) (XDR *__xdrs, const char *__addr, unsigned int __len);
-	/* put some bytes to " */
-	unsigned int (*x_getpostn) (const XDR *__xdrs);
-	/* returns bytes off from beginning */
-	bool_t (*x_setpostn) (XDR *__xdrs, unsigned int __pos);
-	/* lets you reposition the stream */
-	int32_t *(*x_inline) (XDR *__xdrs, unsigned int __len);
-	/* buf quick ptr to buffered data */
-	void (*x_destroy) (XDR *__xdrs);
-	/* free privates of this xdr_stream */
-	bool_t (*x_getint32) (XDR *__xdrs, int32_t *__ip);
-	/* get a int from underlying stream */
-	bool_t (*x_putint32) (XDR *__xdrs, const int32_t *__ip);
-	/* put a int to " */
+    bool_t (*x_getlong) (XDR *__xdrs, long *__lp);
+    /* get a long from underlying stream */
+    bool_t (*x_putlong) (XDR *__xdrs, const long *__lp);
+    /* put a long to " */
+    bool_t (*x_getbytes) (XDR *__xdrs, char* __addr, unsigned int __len);
+    /* get some bytes from " */
+    bool_t (*x_putbytes) (XDR *__xdrs, const char *__addr, unsigned int __len);
+    /* put some bytes to " */
+    unsigned int (*x_getpostn) (const XDR *__xdrs);
+    /* returns bytes off from beginning */
+    bool_t (*x_setpostn) (XDR *__xdrs, unsigned int __pos);
+    /* lets you reposition the stream */
+    int32_t *(*x_inline) (XDR *__xdrs, unsigned int __len);
+    /* buf quick ptr to buffered data */
+    void (*x_destroy) (XDR *__xdrs);
+    /* free privates of this xdr_stream */
+    bool_t (*x_getint32) (XDR *__xdrs, int32_t *__ip);
+    /* get a int from underlying stream */
+    bool_t (*x_putint32) (XDR *__xdrs, const int32_t *__ip);
+    /* put a int to " */
       }
      *x_ops;
-    char* x_public;		/* users' data */
-    char* x_private;		/* pointer to private data */
-    char* x_base;		/* private used for position info */
-    unsigned int x_handy;	/* extra private word */
+    char* x_public;     /* users' data */
+    char* x_private;        /* pointer to private data */
+    char* x_base;       /* private used for position info */
+    unsigned int x_handy;   /* extra private word */
   };
 
 /*
@@ -173,51 +173,51 @@ typedef bool_t (*xdrproc_t) (XDR *, void *,...);
 #define xdr_putint32(xdrs, int32p)                      \
         (*(xdrs)->x_ops->x_putint32)(xdrs, int32p)
 
-#define XDR_GETLONG(xdrs, longp)			\
-	(*(xdrs)->x_ops->x_getlong)(xdrs, longp)
-#define xdr_getlong(xdrs, longp)			\
-	(*(xdrs)->x_ops->x_getlong)(xdrs, longp)
-
-#define XDR_PUTLONG(xdrs, longp)			\
-	(*(xdrs)->x_ops->x_putlong)(xdrs, longp)
-#define xdr_putlong(xdrs, longp)			\
-	(*(xdrs)->x_ops->x_putlong)(xdrs, longp)
-
-#define XDR_GETBYTES(xdrs, addr, len)			\
-	(*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len)
-#define xdr_getbytes(xdrs, addr, len)			\
-	(*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len)
-
-#define XDR_PUTBYTES(xdrs, addr, len)			\
-	(*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len)
-#define xdr_putbytes(xdrs, addr, len)			\
-	(*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len)
-
-#define XDR_GETPOS(xdrs)				\
-	(*(xdrs)->x_ops->x_getpostn)(xdrs)
-#define xdr_getpos(xdrs)				\
-	(*(xdrs)->x_ops->x_getpostn)(xdrs)
-
-#define XDR_SETPOS(xdrs, pos)				\
-	(*(xdrs)->x_ops->x_setpostn)(xdrs, pos)
-#define xdr_setpos(xdrs, pos)				\
-	(*(xdrs)->x_ops->x_setpostn)(xdrs, pos)
-
-#define	XDR_INLINE(xdrs, len)				\
-	(*(xdrs)->x_ops->x_inline)(xdrs, len)
-#define	xdr_inline(xdrs, len)				\
-	(*(xdrs)->x_ops->x_inline)(xdrs, len)
-
-#define	XDR_DESTROY(xdrs)					\
-	do {							\
-		if ((xdrs)->x_ops->x_destroy)			\
-			(*(xdrs)->x_ops->x_destroy)(xdrs);	\
-	} while (0)
-#define	xdr_destroy(xdrs)					\
-	do {							\
-		if ((xdrs)->x_ops->x_destroy)			\
-			(*(xdrs)->x_ops->x_destroy)(xdrs);	\
-	} while (0)
+#define XDR_GETLONG(xdrs, longp)            \
+    (*(xdrs)->x_ops->x_getlong)(xdrs, longp)
+#define xdr_getlong(xdrs, longp)            \
+    (*(xdrs)->x_ops->x_getlong)(xdrs, longp)
+
+#define XDR_PUTLONG(xdrs, longp)            \
+    (*(xdrs)->x_ops->x_putlong)(xdrs, longp)
+#define xdr_putlong(xdrs, longp)            \
+    (*(xdrs)->x_ops->x_putlong)(xdrs, longp)
+
+#define XDR_GETBYTES(xdrs, addr, len)           \
+    (*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len)
+#define xdr_getbytes(xdrs, addr, len)           \
+    (*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len)
+
+#define XDR_PUTBYTES(xdrs, addr, len)           \
+    (*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len)
+#define xdr_putbytes(xdrs, addr, len)           \
+    (*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len)
+
+#define XDR_GETPOS(xdrs)                \
+    (*(xdrs)->x_ops->x_getpostn)(xdrs)
+#define xdr_getpos(xdrs)                \
+    (*(xdrs)->x_ops->x_getpostn)(xdrs)
+
+#define XDR_SETPOS(xdrs, pos)               \
+    (*(xdrs)->x_ops->x_setpostn)(xdrs, pos)
+#define xdr_setpos(xdrs, pos)               \
+    (*(xdrs)->x_ops->x_setpostn)(xdrs, pos)
+
+#define XDR_INLINE(xdrs, len)               \
+    (*(xdrs)->x_ops->x_inline)(xdrs, len)
+#define xdr_inline(xdrs, len)               \
+    (*(xdrs)->x_ops->x_inline)(xdrs, len)
+
+#define XDR_DESTROY(xdrs)                   \
+    do {                            \
+        if ((xdrs)->x_ops->x_destroy)           \
+            (*(xdrs)->x_ops->x_destroy)(xdrs);  \
+    } while (0)
+#define xdr_destroy(xdrs)                   \
+    do {                            \
+        if ((xdrs)->x_ops->x_destroy)           \
+            (*(xdrs)->x_ops->x_destroy)(xdrs);  \
+    } while (0)
 
 /*
  * Support struct for discriminated unions.
@@ -261,10 +261,10 @@ struct xdr_discrim
  * and shouldn't be used any longer. Code which use this defines or longs
  * in the RPC code will not work on 64bit Solaris platforms !
  */
-#define IXDR_GET_LONG(buf)	      ((long)IXDR_GET_U_INT32(buf))
-#define IXDR_PUT_LONG(buf, v)	      ((long)IXDR_PUT_INT32(buf, (long)(v)))
-#define IXDR_GET_U_LONG(buf)	      ((unsigned long)IXDR_GET_LONG(buf))
-#define IXDR_PUT_U_LONG(buf, v)	      IXDR_PUT_LONG(buf, (long)(v))
+#define IXDR_GET_LONG(buf)        ((long)IXDR_GET_U_INT32(buf))
+#define IXDR_PUT_LONG(buf, v)         ((long)IXDR_PUT_INT32(buf, (long)(v)))
+#define IXDR_GET_U_LONG(buf)          ((unsigned long)IXDR_GET_LONG(buf))
+#define IXDR_PUT_U_LONG(buf, v)       IXDR_PUT_LONG(buf, (long)(v))
 
 
 #define IXDR_GET_BOOL(buf)            ((bool_t)IXDR_GET_LONG(buf))
@@ -305,24 +305,24 @@ extern bool_t xdr_uint64_t (XDR *__xdrs, uint64_t *__up);
 extern bool_t xdr_bool (XDR *__xdrs, bool_t *__bp);
 extern bool_t xdr_enum (XDR *__xdrs, enum_t *__ep);
 extern bool_t xdr_array (XDR * _xdrs, char* *__addrp, unsigned int *__sizep,
-			 unsigned int __maxsize, unsigned int __elsize, xdrproc_t __elproc);
+             unsigned int __maxsize, unsigned int __elsize, xdrproc_t __elproc);
 extern bool_t xdr_bytes (XDR *xdrs, char **cpp, unsigned int *sizep,
-			 unsigned int maxsize);
+             unsigned int maxsize);
 extern bool_t xdr_opaque (XDR *__xdrs, char* __cp, unsigned int __cnt);
 extern bool_t xdr_string (XDR *xdrs, char **cpp, unsigned int maxsize);
 extern bool_t xdr_union (XDR *__xdrs, enum_t *__dscmp, char *__unp,
-			 const struct xdr_discrim *__choices,
-			 xdrproc_t dfault);
+             const struct xdr_discrim *__choices,
+             xdrproc_t dfault);
 extern bool_t xdr_char (XDR *__xdrs, char *__cp);
 extern bool_t xdr_u_char (XDR *__xdrs, unsigned char *__cp);
 extern bool_t xdr_vector (XDR *__xdrs, char *__basep, unsigned int __nelem,
-			  unsigned int __elemsize, xdrproc_t __xdr_elem);
+              unsigned int __elemsize, xdrproc_t __xdr_elem);
 extern bool_t xdr_float (XDR *__xdrs, float *__fp);
 extern bool_t xdr_double (XDR *__xdrs, double *__dp);
 extern bool_t xdr_reference (XDR *__xdrs, char* *__xpp, unsigned int __size,
-			     xdrproc_t __proc);
+                 xdrproc_t __proc);
 extern bool_t xdr_pointer (XDR *__xdrs, char **__objpp,
-			   unsigned int __obj_size, xdrproc_t __xdr_obj);
+               unsigned int __obj_size, xdrproc_t __xdr_obj);
 extern bool_t xdr_wrapstring (XDR *__xdrs, char **cpp);
 extern unsigned long xdr_sizeof (xdrproc_t, void *);
 
@@ -346,13 +346,13 @@ extern bool_t xdr_netobj (XDR *__xdrs, struct netobj *__np);
 
 /* XDR using memory buffers */
 extern void xdrmem_create (XDR *__xdrs, const char* __addr,
-			   unsigned int __size, enum xdr_op __xop);
+               unsigned int __size, enum xdr_op __xop);
 
 /* XDR pseudo records for tcp */
 extern void xdrrec_create (XDR *__xdrs, unsigned int __sendsize,
-			   unsigned int __recvsize, char* __tcp_handle,
-			   int (*__readit) (char *, char *, int),
-			   int (*__writeit) (char *, char *, int));
+               unsigned int __recvsize, char* __tcp_handle,
+               int (*__readit) (char *, char *, int),
+               int (*__writeit) (char *, char *, int));
 
 /* make end of xdr record */
 extern bool_t xdrrec_endofrecord (XDR *__xdrs, bool_t __sendnow);

+ 34 - 34
components/dfs/filesystems/nfs/rpc/xdr_mem.c

@@ -1,12 +1,12 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
  */
-/* @(#)xdr_mem.c	2.1 88/07/29 4.0 RPCSRC */
+/* @(#)xdr_mem.c    2.1 88/07/29 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
@@ -14,23 +14,23 @@
  * may copy or modify Sun RPC without charge, but are not authorized
  * to license or distribute it to anyone else except as part of a product or
  * program developed by the user.
- * 
+ *
  * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
  * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- * 
+ *
  * Sun RPC is provided with no support and without any obligation on the
  * part of Sun Microsystems, Inc. to assist in its use, correction,
  * modification or enhancement.
- * 
+ *
  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
  * OR ANY PART THEREOF.
- * 
+ *
  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
  * or profits or other special, indirect and consequential damages, even if
  * Sun has been advised of the possibility of such damages.
- * 
+ *
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
@@ -65,30 +65,30 @@ static int32_t *xdrmem_inline (XDR *, unsigned int);
 static void xdrmem_destroy (XDR *);
 
 static struct xdr_ops xdrmem_ops = {
-	xdrmem_getlong,
-	xdrmem_putlong,
-	xdrmem_getbytes,
-	xdrmem_putbytes,
-	xdrmem_getpos,
-	xdrmem_setpos,
-	xdrmem_inline,
-	xdrmem_destroy,
-	NULL,
-	NULL
+    xdrmem_getlong,
+    xdrmem_putlong,
+    xdrmem_getbytes,
+    xdrmem_putbytes,
+    xdrmem_getpos,
+    xdrmem_setpos,
+    xdrmem_inline,
+    xdrmem_destroy,
+    NULL,
+    NULL
 };
 
 
 /*
  * The procedure xdrmem_create initializes a stream descriptor for a
- * memory buffer.  
+ * memory buffer.
  */
 void
 xdrmem_create (XDR *xdrs, const char* addr, unsigned int size, enum xdr_op op)
 {
-	xdrs->x_op = op;
-	xdrs->x_ops = &xdrmem_ops;
-	xdrs->x_private = xdrs->x_base = (char*)addr;
-	xdrs->x_handy = size;
+    xdrs->x_op = op;
+    xdrs->x_ops = &xdrmem_ops;
+    xdrs->x_private = xdrs->x_base = (char*)addr;
+    xdrs->x_handy = size;
 }
 
 static void
@@ -140,7 +140,7 @@ xdrmem_putbytes (XDR *xdrs, const char *addr, unsigned int len)
 
 static unsigned int xdrmem_getpos (const XDR *xdrs)
 {
-	return ((unsigned long) xdrs->x_private - (unsigned long) xdrs->x_base);
+    return ((unsigned long) xdrs->x_private - (unsigned long) xdrs->x_base);
 }
 
 static bool_t xdrmem_setpos(XDR *xdrs, unsigned int pos)
@@ -149,9 +149,9 @@ static bool_t xdrmem_setpos(XDR *xdrs, unsigned int pos)
   register char* lastaddr = xdrs->x_private + xdrs->x_handy;
 
   if ((long) newaddr > (long) lastaddr
-	  || (UINT_MAX < LONG_MAX
-		  && (long) UINT_MAX < (long) lastaddr - (long) newaddr))
-	  return (FALSE);
+      || (UINT_MAX < LONG_MAX
+          && (long) UINT_MAX < (long) lastaddr - (long) newaddr))
+      return (FALSE);
   xdrs->x_private = newaddr;
   xdrs->x_handy = (long) lastaddr - (long) newaddr;
   return (TRUE);
@@ -160,13 +160,13 @@ static bool_t xdrmem_setpos(XDR *xdrs, unsigned int pos)
 static int32_t *
 xdrmem_inline (XDR *xdrs, unsigned int len)
 {
-	int32_t *buf = 0;
-
-	if (xdrs->x_handy >= len) {
-		xdrs->x_handy -= len;
-		buf = (int32_t *) xdrs->x_private;
-		xdrs->x_private += len;
-	}
-	return (buf);
+    int32_t *buf = 0;
+
+    if (xdrs->x_handy >= len) {
+        xdrs->x_handy -= len;
+        buf = (int32_t *) xdrs->x_private;
+        xdrs->x_private += len;
+    }
+    return (buf);
 }
 

+ 1 - 1
components/dfs/filesystems/ramfs/dfs_ramfs.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/dfs/filesystems/ramfs/dfs_ramfs.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/dfs/filesystems/romfs/dfs_romfs.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/dfs/filesystems/romfs/dfs_romfs.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2019, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/dfs/filesystems/romfs/romfs.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/dfs/filesystems/skeleton/skeleton.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/dfs/filesystems/skeleton/skeleton.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/dfs/filesystems/uffs/dfs_uffs.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/dfs/filesystems/uffs/dfs_uffs.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 50 - 50
components/dfs/filesystems/uffs/uffs_rtthread.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -8,11 +8,11 @@
  */
 /*
   This file is part of UFFS, the Ultra-low-cost Flash File System.
-  
+
   Copyright (C) 2005-2009 Ricky Zheng <ricky_gz_zheng@yahoo.co.nz>
 
   UFFS is free software; you can redistribute it and/or modify it under
-  the GNU Library General Public License as published by the Free Software 
+  the GNU Library General Public License as published by the Free Software
   Foundation; either version 2 of the License, or (at your option) any
   later version.
 
@@ -20,7 +20,7 @@
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   or GNU Library General Public License, as applicable, for more details.
- 
+
   You should have received a copy of the GNU General Public License
   and GNU Library General Public License along with UFFS; if not, write
   to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
@@ -33,7 +33,7 @@
   by the GNU General Public License. However the source code for this
   file must still be made available in accordance with section (3) of
   the GNU General Public License v2.
- 
+
   This exception does not invalidate any other reasons why a work based
   on this file might be covered by the GNU General Public License.
 */
@@ -53,83 +53,83 @@
 
 int uffs_SemCreate(OSSEM *sem)
 {
-	static int count = 0;
-	char name [RT_NAME_MAX+1];
-	struct rt_mutex *mutex = RT_NULL;
-
-	rt_snprintf(name, sizeof(name), "usem%d", count++);
-	mutex = rt_mutex_create(name, RT_IPC_FLAG_FIFO);
-	if (mutex != RT_NULL)
-	{
-		*sem = (OSSEM *)mutex;
-		return 0;
-	}
-	uffs_Perror(UFFS_MSG_SERIOUS, "can't get a semphore");
-	return -1;
+    static int count = 0;
+    char name [RT_NAME_MAX+1];
+    struct rt_mutex *mutex = RT_NULL;
+
+    rt_snprintf(name, sizeof(name), "usem%d", count++);
+    mutex = rt_mutex_create(name, RT_IPC_FLAG_FIFO);
+    if (mutex != RT_NULL)
+    {
+        *sem = (OSSEM *)mutex;
+        return 0;
+    }
+    uffs_Perror(UFFS_MSG_SERIOUS, "can't get a semphore");
+    return -1;
 }
 
 int uffs_SemWait(OSSEM sem)
 {
-	return rt_mutex_take((struct rt_mutex *)sem, RT_WAITING_FOREVER);
+    return rt_mutex_take((struct rt_mutex *)sem, RT_WAITING_FOREVER);
 }
 
 int uffs_SemSignal(OSSEM sem)
 {
-	return rt_mutex_release((struct rt_mutex *)sem);
+    return rt_mutex_release((struct rt_mutex *)sem);
 }
 
 int uffs_SemDelete(OSSEM *sem)
 {
-	int ret = -1;
-	
-	if (sem) {
-		ret = rt_mutex_delete((struct rt_mutex *)(*sem));
-		if (ret == RT_EOK) {
-			*sem = 0;
-		}			
-	}
-	return ret;
+    int ret = -1;
+
+    if (sem) {
+        ret = rt_mutex_delete((struct rt_mutex *)(*sem));
+        if (ret == RT_EOK) {
+            *sem = 0;
+        }
+    }
+    return ret;
 }
 
 int uffs_OSGetTaskId(void)
 {
-	//TODO: ... return current task ID ...
-	return 0;
+    //TODO: ... return current task ID ...
+    return 0;
 }
 
 unsigned int uffs_GetCurDateTime(void)
 {
-	// FIXME: return system time, please modify this for your platform ! 
-	//			or just return 0 if you don't care about file time.
+    // FIXME: return system time, please modify this for your platform !
+    //          or just return 0 if you don't care about file time.
 #if 0
-	time_t tvalue;
+    time_t tvalue;
+
+    tvalue = time(NULL);
 
-	tvalue = time(NULL);
-	
-	return (unsigned int)tvalue;
+    return (unsigned int)tvalue;
 #endif
-	return 0;
+    return 0;
 }
 
 #if CONFIG_USE_SYSTEM_MEMORY_ALLOCATOR > 0
 static void * sys_malloc(struct uffs_DeviceSt *dev, unsigned int size)
 {
-	dev = dev;
-	uffs_Perror(UFFS_MSG_NORMAL, "system memory alloc %d bytes", size);
-	return rt_malloc(size);
+    dev = dev;
+    uffs_Perror(UFFS_MSG_NORMAL, "system memory alloc %d bytes", size);
+    return rt_malloc(size);
 }
 
 static URET sys_free(struct uffs_DeviceSt *dev, void *p)
 {
-	dev = dev;
-	rt_free(p);
-	return U_SUCC;
+    dev = dev;
+    rt_free(p);
+    return U_SUCC;
 }
 
 void uffs_MemSetupSystemAllocator(uffs_MemAllocator *allocator)
 {
-	allocator->malloc = sys_malloc;
-	allocator->free = sys_free;
+    allocator->malloc = sys_malloc;
+    allocator->free = sys_free;
 }
 #endif
 
@@ -137,18 +137,18 @@ void uffs_MemSetupSystemAllocator(uffs_MemAllocator *allocator)
 /* debug message output throught 'printf' */
 static void output_dbg_msg(const char *msg);
 static struct uffs_DebugMsgOutputSt m_dbg_ops = {
-	output_dbg_msg,
-	NULL,
+    output_dbg_msg,
+    NULL,
 };
 
 static void output_dbg_msg(const char *msg)
 {
-	rt_kprintf("%s", msg);
+    rt_kprintf("%s", msg);
 }
 
 void uffs_SetupDebugOutput(void)
 {
-	uffs_InitDebugMessageOutput(&m_dbg_ops, UFFS_MSG_NOISY);
+    uffs_InitDebugMessageOutput(&m_dbg_ops, UFFS_MSG_NOISY);
 }
 #else
 

+ 1 - 1
components/dfs/include/dfs.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/dfs/include/dfs_file.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/dfs/include/dfs_fs.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/dfs/include/dfs_poll.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/dfs/include/dfs_posix.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/dfs/include/dfs_private.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/dfs/include/dfs_select.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/dfs/src/dfs.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/dfs/src/dfs_file.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 6 - 6
components/dfs/src/dfs_fs.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -522,16 +522,16 @@ INIT_ENV_EXPORT(dfs_mount_table);
 int dfs_mount_device(rt_device_t dev)
 {
   int index = 0;
-  
+
   if(dev == RT_NULL) {
     rt_kprintf("the device is NULL to be mounted.\n");
     return -RT_ERROR;
   }
-  
+
   while (1)
   {
     if (mount_table[index].path == NULL) break;
-    
+
     if(strcmp(mount_table[index].device_name, dev->parent.name) == 0) {
       if (dfs_mount(mount_table[index].device_name,
                     mount_table[index].path,
@@ -548,10 +548,10 @@ int dfs_mount_device(rt_device_t dev)
         return RT_EOK;
       }
     }
-    
+
     index ++;
   }
-  
+
   rt_kprintf("can't find device:%s to be mounted.\n", dev->parent.name);
   return -RT_ERROR;
 }

+ 1 - 1
components/dfs/src/dfs_posix.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 3 - 3
components/dfs/src/poll.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -140,7 +140,7 @@ static int do_pollfd(struct pollfd *pollfd, rt_pollreq_t *req)
 
                 /* dealwith the device return error -1*/
                 if (mask < 0)
-                {   
+                {
                     fd_put(f);
                     pollfd->revents = 0;
                     return mask;
@@ -232,4 +232,4 @@ int poll(struct pollfd *fds, nfds_t nfds, int timeout)
     return num;
 }
 
-#endif 
+#endif

+ 2 - 2
components/dfs/src/select.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -180,4 +180,4 @@ int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struc
     return ret;
 }
 
-#endif 
+#endif

+ 1 - 1
components/drivers/audio/audio.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/drivers/audio/audio_pipe.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/drivers/audio/audio_pipe.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/drivers/can/can.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 5 - 5
components/drivers/cputime/cputime.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -14,7 +14,7 @@
 static const struct rt_clock_cputime_ops *_cputime_ops  = RT_NULL;
 
 /**
- * The clock_cpu_getres() function shall return the resolution of CPU time, the 
+ * The clock_cpu_getres() function shall return the resolution of CPU time, the
  * number of nanosecond per tick.
  *
  * @return the number of nanosecond per tick
@@ -43,7 +43,7 @@ uint32_t clock_cpu_gettime(void)
 }
 
 /**
- * The clock_cpu_microsecond() fucntion shall return the microsecond according to 
+ * The clock_cpu_microsecond() fucntion shall return the microsecond according to
  * cpu_tick parameter.
  *
  * @param cpu_tick the cpu tick
@@ -58,7 +58,7 @@ uint32_t clock_cpu_microsecond(uint32_t cpu_tick)
 }
 
 /**
- * The clock_cpu_microsecond() fucntion shall return the millisecond according to 
+ * The clock_cpu_microsecond() fucntion shall return the millisecond according to
  * cpu_tick parameter.
  *
  * @param cpu_tick the cpu tick
@@ -74,7 +74,7 @@ uint32_t clock_cpu_millisecond(uint32_t cpu_tick)
 
 /**
  * The clock_cpu_seops() function shall set the ops of cpu time.
- * 
+ *
  * @return always return 0.
  */
 int clock_cpu_setops(const struct rt_clock_cputime_ops *ops)

+ 6 - 6
components/drivers/cputime/cputime_cortexm.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -19,7 +19,7 @@
 static float cortexm_cputime_getres(void)
 {
     float ret = 1000 * 1000 * 1000;
-    
+
     ret = ret / SystemCoreClock;
     return ret;
 }
@@ -29,7 +29,7 @@ static uint32_t cortexm_cputime_gettime(void)
     return DWT->CYCCNT;
 }
 
-const static struct rt_clock_cputime_ops _cortexm_ops = 
+const static struct rt_clock_cputime_ops _cortexm_ops =
 {
     cortexm_cputime_getres,
     cortexm_cputime_gettime
@@ -38,13 +38,13 @@ const static struct rt_clock_cputime_ops _cortexm_ops =
 int cortexm_cputime_init(void)
 {
     /* check support bit */
-    if ((DWT->CTRL & (1UL << DWT_CTRL_NOCYCCNT_Pos)) == 0) 
+    if ((DWT->CTRL & (1UL << DWT_CTRL_NOCYCCNT_Pos)) == 0)
     {
         /* enable trace*/
         CoreDebug->DEMCR |= (1UL << CoreDebug_DEMCR_TRCENA_Pos);
-        
+
         /* whether cycle counter not enabled */
-        if ((DWT->CTRL & (1UL << DWT_CTRL_CYCCNTENA_Pos)) == 0) 
+        if ((DWT->CTRL & (1UL << DWT_CTRL_CYCCNTENA_Pos)) == 0)
         {
             /* enable cycle counter */
             DWT->CTRL |= (1UL << DWT_CTRL_CYCCNTENA_Pos);

+ 18 - 18
components/drivers/hwcrypto/hw_bignum.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2019, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -56,7 +56,7 @@ rt_err_t rt_hwcrypto_bignum_default(struct rt_hwcrypto_device *device)
 
 /**
  * @brief           Init bignum obj
- * 
+ *
  * @param n         bignum obj
  */
 void rt_hwcrypto_bignum_init(struct hw_bignum_mpi *n)
@@ -87,9 +87,9 @@ void rt_hwcrypto_bignum_free(struct hw_bignum_mpi *n)
 
 /**
  * @brief           Get length of bignum as an unsigned binary buffer
- * 
+ *
  * @param n         bignum obj
- * 
+ *
  * @return          binary buffer length
  */
 int rt_hwcrypto_bignum_get_len(const struct hw_bignum_mpi *n)
@@ -112,11 +112,11 @@ int rt_hwcrypto_bignum_get_len(const struct hw_bignum_mpi *n)
 
 /**
  * @brief           Export n into unsigned binary data, big endian
- * 
+ *
  * @param n         bignum obj
  * @param buf       Buffer for the binary number
  * @param len       Length of the buffer
- * 
+ *
  * @return          export bin length
  */
 int rt_hwcrypto_bignum_export_bin(struct hw_bignum_mpi *n, rt_uint8_t *buf, int len)
@@ -139,11 +139,11 @@ int rt_hwcrypto_bignum_export_bin(struct hw_bignum_mpi *n, rt_uint8_t *buf, int
 
 /**
  * @brief           Import n from unsigned binary data, big endian
- * 
+ *
  * @param n         bignum obj
  * @param buf       Buffer for the binary number
  * @param len       Length of the buffer
- * 
+ *
  * @return          RT_EOK on success.
  */
 rt_err_t rt_hwcrypto_bignum_import_bin(struct hw_bignum_mpi *n, rt_uint8_t *buf, int len)
@@ -179,11 +179,11 @@ rt_err_t rt_hwcrypto_bignum_import_bin(struct hw_bignum_mpi *n, rt_uint8_t *buf,
 
 /**
  * @brief           x = a + b
- * 
+ *
  * @param a         bignum obj
  * @param b         bignum obj
  * @param c         bignum obj
- * 
+ *
  * @return          RT_EOK on success.
  */
 rt_err_t rt_hwcrypto_bignum_add(struct hw_bignum_mpi *x,
@@ -206,11 +206,11 @@ rt_err_t rt_hwcrypto_bignum_add(struct hw_bignum_mpi *x,
 
 /**
  * @brief           x = a - b
- * 
+ *
  * @param a         bignum obj
  * @param b         bignum obj
  * @param c         bignum obj
- * 
+ *
  * @return          RT_EOK on success.
  */
 rt_err_t rt_hwcrypto_bignum_sub(struct hw_bignum_mpi *x,
@@ -233,11 +233,11 @@ rt_err_t rt_hwcrypto_bignum_sub(struct hw_bignum_mpi *x,
 
 /**
  * @brief           x = a * b
- * 
+ *
  * @param a         bignum obj
  * @param b         bignum obj
  * @param c         bignum obj
- * 
+ *
  * @return          RT_EOK on success.
  */
 rt_err_t rt_hwcrypto_bignum_mul(struct hw_bignum_mpi *x,
@@ -260,11 +260,11 @@ rt_err_t rt_hwcrypto_bignum_mul(struct hw_bignum_mpi *x,
 
 /**
  * @brief           x = a * b (mod c)
- * 
+ *
  * @param a         bignum obj
  * @param b         bignum obj
  * @param c         bignum obj
- * 
+ *
  * @return          RT_EOK on success.
  */
 rt_err_t rt_hwcrypto_bignum_mulmod(struct hw_bignum_mpi *x,
@@ -288,11 +288,11 @@ rt_err_t rt_hwcrypto_bignum_mulmod(struct hw_bignum_mpi *x,
 
 /**
  * @brief           x = a ^ b (mod c)
- * 
+ *
  * @param a         bignum obj
  * @param b         bignum obj
  * @param c         bignum obj
- * 
+ *
  * @return          RT_EOK on success.
  */
 rt_err_t rt_hwcrypto_bignum_exptmod(struct hw_bignum_mpi *x,

+ 17 - 17
components/drivers/hwcrypto/hw_bignum.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2019, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -83,42 +83,42 @@ void rt_hwcrypto_bignum_free(struct hw_bignum_mpi *n);
 
 /**
  * @brief           Get length of bignum as an unsigned binary buffer
- * 
+ *
  * @param n         bignum obj
- * 
+ *
  * @return          binary buffer Length
  */
 int rt_hwcrypto_bignum_get_len(const struct hw_bignum_mpi *n);
 
 /**
  * @brief           Export n into unsigned binary data, big endian
- * 
+ *
  * @param n         bignum obj
  * @param buf       Buffer for the binary number
  * @param len       Length of the buffer
- * 
+ *
  * @return          export bin length
  */
 int rt_hwcrypto_bignum_export_bin(struct hw_bignum_mpi *n, rt_uint8_t *buf, int len);
 
 /**
  * @brief           Import n from unsigned binary data, big endian
- * 
+ *
  * @param n         bignum obj
  * @param buf       Buffer for the binary number
  * @param len       Length of the buffer
- * 
+ *
  * @return          RT_EOK on success.
  */
 rt_err_t rt_hwcrypto_bignum_import_bin(struct hw_bignum_mpi *n, rt_uint8_t *buf, int len);
 
 /**
  * @brief           x = a + b
- * 
+ *
  * @param a         bignum obj
  * @param b         bignum obj
  * @param c         bignum obj
- * 
+ *
  * @return          RT_EOK on success.
  */
 rt_err_t rt_hwcrypto_bignum_add(struct hw_bignum_mpi *x,
@@ -127,11 +127,11 @@ rt_err_t rt_hwcrypto_bignum_add(struct hw_bignum_mpi *x,
 
 /**
  * @brief           x = a - b
- * 
+ *
  * @param a         bignum obj
  * @param b         bignum obj
  * @param c         bignum obj
- * 
+ *
  * @return          RT_EOK on success.
  */
 rt_err_t rt_hwcrypto_bignum_sub(struct hw_bignum_mpi *x,
@@ -140,11 +140,11 @@ rt_err_t rt_hwcrypto_bignum_sub(struct hw_bignum_mpi *x,
 
 /**
  * @brief           x = a * b
- * 
+ *
  * @param a         bignum obj
  * @param b         bignum obj
  * @param c         bignum obj
- * 
+ *
  * @return          RT_EOK on success.
  */
 rt_err_t rt_hwcrypto_bignum_mul(struct hw_bignum_mpi *x,
@@ -153,11 +153,11 @@ rt_err_t rt_hwcrypto_bignum_mul(struct hw_bignum_mpi *x,
 
 /**
  * @brief           x = a * b (mod c)
- * 
+ *
  * @param a         bignum obj
  * @param b         bignum obj
  * @param c         bignum obj
- * 
+ *
  * @return          RT_EOK on success.
  */
 rt_err_t rt_hwcrypto_bignum_mulmod(struct hw_bignum_mpi *x,
@@ -167,11 +167,11 @@ rt_err_t rt_hwcrypto_bignum_mulmod(struct hw_bignum_mpi *x,
 
 /**
  * @brief           x = a ^ b (mod c)
- * 
+ *
  * @param a         bignum obj
  * @param b         bignum obj
  * @param c         bignum obj
- * 
+ *
  * @return          RT_EOK on success.
  */
 rt_err_t rt_hwcrypto_bignum_exptmod(struct hw_bignum_mpi *x,

+ 5 - 5
components/drivers/hwcrypto/hw_crc.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2019, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -20,7 +20,7 @@
  *
  * @return          CRC context
  */
-struct rt_hwcrypto_ctx *rt_hwcrypto_crc_create(struct rt_hwcrypto_device *device, 
+struct rt_hwcrypto_ctx *rt_hwcrypto_crc_create(struct rt_hwcrypto_device *device,
                                                hwcrypto_crc_mode mode)
 {
     struct hwcrypto_crc *crc_ctx;
@@ -89,8 +89,8 @@ void rt_hwcrypto_crc_destroy(struct rt_hwcrypto_ctx *ctx)
  *
  * @return          RT_EOK on success.
  */
-rt_uint32_t rt_hwcrypto_crc_update(struct rt_hwcrypto_ctx *ctx, 
-                                             const rt_uint8_t *input, 
+rt_uint32_t rt_hwcrypto_crc_update(struct rt_hwcrypto_ctx *ctx,
+                                             const rt_uint8_t *input,
                                              rt_size_t length)
 {
     struct hwcrypto_crc *crc_ctx = (struct hwcrypto_crc *)ctx;
@@ -107,7 +107,7 @@ rt_uint32_t rt_hwcrypto_crc_update(struct rt_hwcrypto_ctx *ctx,
  * @param ctx       CRC context
  * @param cfg       CRC config
  */
-void rt_hwcrypto_crc_cfg(struct rt_hwcrypto_ctx *ctx, 
+void rt_hwcrypto_crc_cfg(struct rt_hwcrypto_ctx *ctx,
                                    struct hwcrypto_crc_cfg *cfg)
 {
     if (cfg)

+ 3 - 3
components/drivers/hwcrypto/hw_crc.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2019, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -129,7 +129,7 @@ void rt_hwcrypto_crc_destroy(struct rt_hwcrypto_ctx *ctx);
  *
  * @return          CRC value
  */
-rt_uint32_t rt_hwcrypto_crc_update(struct rt_hwcrypto_ctx *ctx, 
+rt_uint32_t rt_hwcrypto_crc_update(struct rt_hwcrypto_ctx *ctx,
                                    const rt_uint8_t *input, rt_size_t length);
 
 /**
@@ -138,7 +138,7 @@ rt_uint32_t rt_hwcrypto_crc_update(struct rt_hwcrypto_ctx *ctx,
  * @param ctx       CRC context
  * @param cfg       CRC config
  */
-void rt_hwcrypto_crc_cfg(struct rt_hwcrypto_ctx *ctx, 
+void rt_hwcrypto_crc_cfg(struct rt_hwcrypto_ctx *ctx,
                          struct hwcrypto_crc_cfg *cfg);
 
 #ifdef __cplusplus

+ 1 - 1
components/drivers/hwcrypto/hw_gcm.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2019, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/drivers/hwcrypto/hw_gcm.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2019, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/drivers/hwcrypto/hw_hash.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2019, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/drivers/hwcrypto/hw_hash.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2019, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 2 - 2
components/drivers/hwcrypto/hw_rng.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2019, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -81,7 +81,7 @@ rt_err_t rt_hwcrypto_rng_default(struct rt_hwcrypto_device *device)
  * @brief           Getting Random Numbers from RNG Context
  *
  * @param ctx       RNG context
- * 
+ *
  * @return          Random number
  */
 rt_uint32_t rt_hwcrypto_rng_update_ctx(struct rt_hwcrypto_ctx *ctx)

+ 2 - 2
components/drivers/hwcrypto/hw_rng.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2019, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -60,7 +60,7 @@ rt_err_t rt_hwcrypto_rng_default(struct rt_hwcrypto_device *device);
  * @brief           Getting Random Numbers from RNG Context
  *
  * @param ctx       RNG context
- * 
+ *
  * @return          Random number
  */
 rt_uint32_t rt_hwcrypto_rng_update_ctx(struct rt_hwcrypto_ctx *ctx);

+ 2 - 2
components/drivers/hwcrypto/hw_symmetric.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2019, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -215,7 +215,7 @@ void rt_hwcrypto_symmetric_get_ivoff(struct rt_hwcrypto_ctx *ctx, rt_int32_t *iv
  *
  * @param des       The destination symmetric crypto context
  * @param src       The symmetric crypto context to be copy
- * 
+ *
  * @return          RT_EOK on success.
  */
 rt_err_t rt_hwcrypto_symmetric_cpy(struct rt_hwcrypto_ctx *des, const struct rt_hwcrypto_ctx *src)

+ 1 - 1
components/drivers/hwcrypto/hw_symmetric.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2019, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/drivers/hwcrypto/hwcrypto.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2019, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/drivers/hwcrypto/hwcrypto.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2019, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 2 - 2
components/drivers/hwtimer/hwtimer.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -325,7 +325,7 @@ void rt_device_hwtimer_isr(rt_hwtimer_t *timer)
 }
 
 #ifdef RT_USING_DEVICE_OPS
-const static struct rt_device_ops hwtimer_ops = 
+const static struct rt_device_ops hwtimer_ops =
 {
     rt_hwtimer_init,
     rt_hwtimer_open,

+ 1 - 1
components/drivers/i2c/i2c-bit-ops.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/drivers/i2c/i2c_core.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 3 - 3
components/drivers/i2c/i2c_dev.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -97,9 +97,9 @@ static rt_err_t i2c_bus_device_control(rt_device_t dev,
 }
 
 #ifdef RT_USING_DEVICE_OPS
-const static struct rt_device_ops i2c_ops = 
+const static struct rt_device_ops i2c_ops =
 {
-    RT_NULL, 
+    RT_NULL,
     RT_NULL,
     RT_NULL,
     i2c_bus_device_read,

+ 1 - 1
components/drivers/include/drivers/adc.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/drivers/include/drivers/alarm.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/drivers/include/drivers/audio.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/drivers/include/drivers/can.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/drivers/include/drivers/cputime.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/drivers/include/drivers/crypto.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/drivers/include/drivers/dac.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/drivers/include/drivers/hwtimer.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/drivers/include/drivers/i2c-bit-ops.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/drivers/include/drivers/i2c.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

+ 1 - 1
components/drivers/include/drivers/i2c_dev.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *

Some files were not shown because too many files changed in this diff