mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
OS modules: Add basic procfs support. A module registry that will eventually be used to support lsmod
This commit is contained in:
@@ -32,6 +32,13 @@ config FS_PROCFS_EXCLUDE_PROCESS
|
||||
This will reduce code space, but then giving access to process info
|
||||
was kinda the whole point of procfs, but hey, whatever.
|
||||
|
||||
config FS_PROCFS_EXCLUDE_MODULE
|
||||
bool "Exclude module information"
|
||||
depends on MODULE
|
||||
default n
|
||||
---help---
|
||||
Causes the module information to be excluded from the procfs system.
|
||||
|
||||
config FS_PROCFS_EXCLUDE_UPTIME
|
||||
bool "Exclude uptime"
|
||||
default n
|
||||
|
||||
@@ -77,6 +77,7 @@
|
||||
|
||||
extern const struct procfs_operations proc_operations;
|
||||
extern const struct procfs_operations cpuload_operations;
|
||||
extern const struct procfs_operations module_operations;
|
||||
extern const struct procfs_operations uptime_operations;
|
||||
|
||||
/* This is not good. These are implemented in other sub-systems. Having to
|
||||
@@ -119,6 +120,10 @@ static const struct procfs_entry_s g_procfs_entries[] =
|
||||
{ "cpuload", &cpuload_operations },
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_MODULE) && !defined(CONFIG_FS_PROCFS_EXCLUDE_MODULE)
|
||||
{ "modules", &module_operations },
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_FS_SMARTFS) && !defined(CONFIG_FS_PROCFS_EXCLUDE_SMARTFS)
|
||||
//{ "fs/smartfs", &smartfs_procfsoperations },
|
||||
{ "fs/smartfs**", &smartfs_procfsoperations },
|
||||
|
||||
Reference in New Issue
Block a user