From f56b7b8c0678be391cae50e2d3513b9ff94f15d9 Mon Sep 17 00:00:00 2001 From: Alexey Matveev Date: Mon, 9 Sep 2024 23:07:49 +0300 Subject: [PATCH] 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;