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 2024/09/10 03:32:37 UTC

(nuttx) branch master updated: smartfs procfs: fix double declare g_smartfs_operations

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/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new f56b7b8c06 smartfs procfs: fix double declare g_smartfs_operations
f56b7b8c06 is described below

commit f56b7b8c0678be391cae50e2d3513b9ff94f15d9
Author: Alexey Matveev <ti...@yandex.ru>
AuthorDate: Mon Sep 9 23:07:49 2024 +0300

    smartfs procfs: fix double declare g_smartfs_operations
---
 fs/procfs/fs_procfs.c       | 4 ++--
 fs/smartfs/smartfs_procfs.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/procfs/fs_procfs.c b/fs/procfs/fs_procfs.c
index abf9b0673f..75a46b0a96 100644
--- a/fs/procfs/fs_procfs.c
+++ b/fs/procfs/fs_procfs.c
@@ -81,7 +81,7 @@ extern const struct procfs_operations g_mount_operations;
 extern const struct procfs_operations g_net_operations;
 extern const struct procfs_operations g_netroute_operations;
 extern const struct procfs_operations g_part_operations;
-extern const struct procfs_operations g_smartfs_operations;
+extern const struct procfs_operations g_smartfs_procfs_operations;
 
 /****************************************************************************
  * Private Types
@@ -130,7 +130,7 @@ static const struct procfs_entry_s g_procfs_entries[] =
 #endif
 
 #if defined(CONFIG_FS_SMARTFS) && !defined(CONFIG_FS_PROCFS_EXCLUDE_SMARTFS)
-  { "fs/smartfs**", &g_smartfs_operations,  PROCFS_UNKOWN_TYPE },
+  { "fs/smartfs**", &g_smartfs_procfs_operations,  PROCFS_UNKOWN_TYPE },
 #endif
 
 #ifndef CONFIG_FS_PROCFS_EXCLUDE_USAGE
diff --git a/fs/smartfs/smartfs_procfs.c b/fs/smartfs/smartfs_procfs.c
index 7e4e64afe7..8ab5f47830 100644
--- a/fs/smartfs/smartfs_procfs.c
+++ b/fs/smartfs/smartfs_procfs.c
@@ -168,7 +168,7 @@ static const uint8_t g_direntrycount = sizeof(g_direntry) /
  * with any compiler.
  */
 
-const struct procfs_operations g_smartfs_operations =
+const struct procfs_operations g_smartfs_procfs_operations =
 {
   smartfs_open,       /* open */
   smartfs_close,      /* close */
@@ -349,7 +349,7 @@ static int smartfs_open(FAR struct file *filep, FAR const char *relpath,
    */
 
   if (((oflags & O_WRONLY) != 0 || (oflags & O_RDONLY) == 0) &&
-      (g_smartfs_operations.write == NULL))
+      (g_smartfs_procfs_operations.write == NULL))
     {
       ferr("ERROR: Only O_RDONLY supported\n");
       return -EACCES;