You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/01/25 16:27:02 UTC

[incubator-nuttx] 09/12: include: nuttx: fs: fix nxstyle errors

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

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

commit 4c2920e76061c5b5672cbcd2a0a9f5200503e2e6
Author: Alin Jerpelea <al...@sony.com>
AuthorDate: Mon Jan 25 13:39:14 2021 +0100

    include: nuttx: fs: fix nxstyle errors
    
    Fix nxstyle errors for headers
    
    Signed-off-by: Alin Jerpelea <al...@sony.com>
---
 include/nuttx/fs/automount.h |  5 ++++-
 include/nuttx/fs/binfs.h     |  3 ++-
 include/nuttx/fs/dirent.h    | 19 ++++++++++++-------
 include/nuttx/fs/fat.h       |  4 ++--
 include/nuttx/fs/loop.h      |  4 ++--
 include/nuttx/fs/nxffs.h     |  7 +++++--
 include/nuttx/fs/procfs.h    | 28 ++++++++++++++++++----------
 7 files changed, 45 insertions(+), 25 deletions(-)

diff --git a/include/nuttx/fs/automount.h b/include/nuttx/fs/automount.h
index 7af5c7b..8fa1646 100644
--- a/include/nuttx/fs/automount.h
+++ b/include/nuttx/fs/automount.h
@@ -50,6 +50,7 @@
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
+
 /* Configuration ************************************************************
  * Automounter configuration
  *   CONFIG_FS_AUTOMOUNTER - Enables automount support
@@ -71,6 +72,7 @@
 /****************************************************************************
  * Public Types
  ****************************************************************************/
+
 /* This is the type of the automount media change handler.  The lower level
  * code will intercept the interrupt and provide the upper level with the
  * private data that was provided when the interrupt was attached and will
@@ -161,7 +163,8 @@ extern "C"
  *   lower - Persistent board configuration data
  *
  * Returned Value:
- *   A void* handle.  The only use for this handle is with automount_uninitialize().
+ *   A void* handle.
+ *           The only use for this handle is with automount_uninitialize().
  *   NULL is returned on any failure.
  *
  ****************************************************************************/
diff --git a/include/nuttx/fs/binfs.h b/include/nuttx/fs/binfs.h
index 2a708e6..ad2bac6 100644
--- a/include/nuttx/fs/binfs.h
+++ b/include/nuttx/fs/binfs.h
@@ -64,7 +64,8 @@ extern "C"
 #define EXTERN extern
 #endif
 
-/* The "bindir" is file system that supports access to the builtin applications.
+/* The "bindir" is file system that supports access to the builtin
+ * applications.
  * It is typically mounted under /bin.
  */
 
diff --git a/include/nuttx/fs/dirent.h b/include/nuttx/fs/dirent.h
index f0192f3..0c2661c 100644
--- a/include/nuttx/fs/dirent.h
+++ b/include/nuttx/fs/dirent.h
@@ -136,8 +136,8 @@ struct fs_binfsdir_s
 #endif
 
 #ifdef CONFIG_FS_NXFFS
-/* NXFFS is the tiny NuttX wear-leveling FLASH file system.  The state value is
- * the offset in FLASH memory to the next inode entry.
+/* NXFFS is the tiny NuttX wear-leveling FLASH file system.
+ * The state value is the offset in FLASH memory to the next inode entry.
  */
 
 struct fs_nxffsdir_s
@@ -173,7 +173,10 @@ struct fs_smartfsdir_s
 #endif
 
 #ifdef CONFIG_FS_SPIFFS
-/* SPIFFS is an SPI-oriented FLASH file system originally by Peter Andersson */
+
+/* SPIFFS is an SPI-oriented FLASH file system
+ * originally by Peter Andersson
+ */
 
 struct fs_spiffsdir_s
 {
@@ -199,8 +202,8 @@ struct fs_unionfsdir_s
 #endif
 
 #ifdef CONFIG_FS_USERFS
-/* The UserFS uses an opaque representation since the actual userspace representation
- * of the directory state structure is unknowable.
+/* The UserFS uses an opaque representation since the actual userspace
+ * representation of the directory state structure is unknowable.
  */
 
 struct fs_userfsdir_s
@@ -302,9 +305,11 @@ struct fs_dirent_s
       struct fs_hostfsdir_s  hostfs;
 #endif
 #endif /* !CONFIG_DISABLE_MOUNTPOINT */
-   } u;
+  } u;
 
-  /* In any event, this the actual struct dirent that is returned by readdir */
+  /* In any event, this the actual struct dirent that is returned by
+   * readdir
+   */
 
   struct dirent fd_dir;              /* Populated when readdir is called */
 };
diff --git a/include/nuttx/fs/fat.h b/include/nuttx/fs/fat.h
index a6163ea..fb3084e 100644
--- a/include/nuttx/fs/fat.h
+++ b/include/nuttx/fs/fat.h
@@ -106,8 +106,8 @@ int fat_setattrib(FAR const char *path, fat_attrib_t setbits,
  *   is the corresponding function that will be called to free the DMA-
  *   capable memory.
  *
- *   This functions may be simple wrappers around gran_alloc() and gran_free()
- *   (See nuttx/mm/gran.h).
+ *   This functions may be simple wrappers around gran_alloc() and
+ *   gran_free()  (See nuttx/mm/gran.h).
  *
  ****************************************************************************/
 
diff --git a/include/nuttx/fs/loop.h b/include/nuttx/fs/loop.h
index ee1efd6..a38ea44 100644
--- a/include/nuttx/fs/loop.h
+++ b/include/nuttx/fs/loop.h
@@ -122,8 +122,8 @@ void loop_register(void);
  * Name: losetup
  *
  * Description:
- *   Setup the loop device so that it exports the file referenced by 'filename'
- *   as a block device.
+ *   Setup the loop device so that it exports the file referenced by
+ *   'filename' as a block device.
  *
  ****************************************************************************/
 
diff --git a/include/nuttx/fs/nxffs.h b/include/nuttx/fs/nxffs.h
index 53bec45..b37224e 100644
--- a/include/nuttx/fs/nxffs.h
+++ b/include/nuttx/fs/nxffs.h
@@ -49,7 +49,9 @@
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
+
 /* Configuration ************************************************************/
+
 /* If the erased state of FLASH memory is anything other than 0xff, then this
  * configuration should be provided.
  */
@@ -144,8 +146,9 @@ int nxffs_initialize(FAR struct mtd_dev_s *mtd);
  * Name: nxffs_dump
  *
  * Description:
- *   Dump a summary of the contents of an NXFFS file system.  CONFIG_DEBUG_FEATURES
- *   and CONFIG_DEBUG_FS must be enabled for this function to do anything.
+ *   Dump a summary of the contents of an NXFFS file system.
+ *   CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_FS must be enabled for this
+ *   function to do anything.
  *
  * Input Parameters:
  *   mtd - The MTD device that provides the interface to NXFFS-formatted
diff --git a/include/nuttx/fs/procfs.h b/include/nuttx/fs/procfs.h
index 550f087..9595e2e 100644
--- a/include/nuttx/fs/procfs.h
+++ b/include/nuttx/fs/procfs.h
@@ -46,6 +46,7 @@
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
+
 /* Data entry declaration prototypes ****************************************/
 
 /* Procfs operations are a subset of the mountpt_operations */
@@ -61,14 +62,18 @@ struct procfs_operations
   int     (*open)(FAR struct file *filep, FAR const char *relpath,
                   int oflags, mode_t mode);
 
-  /* The following methods must be identical in signature and position because
-   * the struct file_operations and struct mountp_operations are treated like
-   * unions.
+  /* The following methods must be identical in signature and position
+   * because the struct file_operations and struct mountp_operations are
+   * treated like unions.
    */
 
   int     (*close)(FAR struct file *filep);
-  ssize_t (*read)(FAR struct file *filep, FAR char *buffer, size_t buflen);
-  ssize_t (*write)(FAR struct file *filep, FAR const char *buffer, size_t buflen);
+  ssize_t (*read)(FAR struct file *filep,
+                  FAR char *buffer,
+                  size_t buflen);
+  ssize_t (*write)(FAR struct file *filep,
+                   FAR const char *buffer,
+                   size_t buflen);
 
   /* The two structures need not be common after this point. The following
    * are extended methods needed to deal with the unique needs of mounted
@@ -77,11 +82,13 @@ struct procfs_operations
    * Additional open-file-specific procfs operations:
    */
 
-  int     (*dup)(FAR const struct file *oldp, FAR struct file *newp);
+  int     (*dup)(FAR const struct file *oldp,
+                 FAR struct file *newp);
 
   /* Directory operations */
 
-  int     (*opendir)(FAR const char *relpath, FAR struct fs_dirent_s *dir);
+  int     (*opendir)(FAR const char *relpath,
+                     FAR struct fs_dirent_s *dir);
   int     (*closedir)(FAR struct fs_dirent_s *dir);
   int     (*readdir)(FAR struct fs_dirent_s *dir);
   int     (*rewinddir)(FAR struct fs_dirent_s *dir);
@@ -161,9 +168,10 @@ extern "C"
  *
  *   procfs_memcpy() is a helper function.  Each read() method should
  *   provide data in a local data buffer ('src' and 'srclen').  This
- *   will transfer the data to the user receive buffer ('dest' and 'destlen'),
- *   respecting both (1) the size of the destination buffer so that it will
- *   write beyond the user receiver and (1) the file position, 'offset'.
+ *   will transfer the data to the user receive buffer ('dest' and
+ *   'destlen'), respecting both (1) the size of the destination buffer so
+ *   that it will write beyond the user receiver and (1) the file position,
+ *   'offset'.
  *
  *   This function will skip over data until the under of bytes specified
  *   by 'offset' have been skipped.  Then it will transfer data from the