Skip to content

Commit

Permalink
smartfs procfs: fix double declare g_smartfs_operations
Browse files Browse the repository at this point in the history
  • Loading branch information
shizacat authored and xiaoxiang781216 committed Sep 10, 2024
1 parent fbc8605 commit f56b7b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions fs/procfs/fs_procfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions fs/smartfs/smartfs_procfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit f56b7b8

Please sign in to comment.