mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 13:27:01 +08:00
/proc task directories can now have sub-directories
This commit is contained in:
@@ -75,7 +75,7 @@
|
||||
* External Definitons
|
||||
****************************************************************************/
|
||||
|
||||
extern const struct procfs_operations process_operations;
|
||||
extern const struct procfs_operations proc_operations;
|
||||
extern const struct procfs_operations uptime_operations;
|
||||
extern const struct procfs_operations mtd_procfsoperations;
|
||||
extern const struct procfs_operations part_procfsoperations;
|
||||
@@ -89,8 +89,8 @@ extern const struct procfs_operations smartfs_procfsoperations;
|
||||
static const struct procfs_entry_s g_procfsentries[] =
|
||||
{
|
||||
#ifndef CONFIG_FS_PROCFS_EXCLUDE_PROCESS
|
||||
{ "[0-9]*/*", &process_operations },
|
||||
{ "[0-9]*", &process_operations },
|
||||
{ "[0-9]*/**", &proc_operations },
|
||||
{ "[0-9]*", &proc_operations },
|
||||
#endif
|
||||
#if defined(CONFIG_FS_SMARTFS) && !defined(CONFIG_FS_PROCFS_EXCLUDE_SMARTFS)
|
||||
//{ "fs/smartfs", &smartfs_procfsoperations },
|
||||
@@ -694,7 +694,7 @@ static int procfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir)
|
||||
|
||||
/* Are we reading an intermediate subdirectory? */
|
||||
|
||||
else if (priv->level == 1 && priv->procfsentry == NULL)
|
||||
else if (priv->level > 0 && priv->procfsentry == NULL)
|
||||
{
|
||||
FAR struct procfs_level1_s *level1;
|
||||
|
||||
@@ -763,7 +763,7 @@ static int procfs_rewinddir(struct inode *mountpt, struct fs_dirent_s *dir)
|
||||
DEBUGASSERT(mountpt && dir && dir->u.procfs);
|
||||
priv = dir->u.procfs;
|
||||
|
||||
if (priv->level == 1 && priv->procfsentry == NULL)
|
||||
if (priv->level > 0 && priv->procfsentry == NULL)
|
||||
{
|
||||
priv->index = ((struct procfs_level1_s *) priv)->firstindex;
|
||||
}
|
||||
|
||||
+371
-212
File diff suppressed because it is too large
Load Diff
@@ -353,8 +353,6 @@ static int uptime_dup(FAR const struct file *oldp, FAR struct file *newp)
|
||||
|
||||
static int uptime_stat(const char *relpath, struct stat *buf)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* "uptime" is the only acceptable value for the relpath */
|
||||
|
||||
if (strcmp(relpath, "uptime") != 0)
|
||||
|
||||
@@ -77,7 +77,7 @@ extern "C"
|
||||
* be used for both the kernel- and user-mode objects.
|
||||
*/
|
||||
|
||||
/* This familiy of allocators is used to manage user-accessible memory
|
||||
/* This family of allocators is used to manage user-accessible memory
|
||||
* from the kernel. In the flat build, the following are declared in
|
||||
* stdlib.h and are directly callable. In the kernel-phase of the kernel
|
||||
* build, the following are defined in userspace.h as macros that call
|
||||
@@ -114,7 +114,7 @@ extern "C"
|
||||
|
||||
#endif
|
||||
|
||||
/* This familiy of allocators is used to manage kernel protected memory */
|
||||
/* This family of allocators is used to manage kernel protected memory */
|
||||
|
||||
#if !defined(CONFIG_NUTTX_KERNEL)
|
||||
/* If this is not a kernel build, then these map to the same interfaces
|
||||
|
||||
Reference in New Issue
Block a user