You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/09/05 06:59:12 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6997: net/procfs: add entry mapping table

xiaoxiang781216 commented on code in PR #6997:
URL: https://github.com/apache/incubator-nuttx/pull/6997#discussion_r962322618


##########
net/procfs/net_procfs.c:
##########
@@ -98,6 +112,26 @@ static int     netprocfs_rewinddir(FAR struct fs_dirent_s *dir);
 
 static int     netprocfs_stat(FAR const char *relpath, FAR struct stat *buf);
 
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+/* Netprocfs component mappings */
+
+static const struct netprocfs_entry_s g_net_entries[] =
+{
+#ifdef CONFIG_NET_STATISTICS
+  { NETPROCFS_SUBDIR_STAT, DTYPE_FILE, "stat" , netprocfs_read_netstats},
+# ifdef CONFIG_NET_MLD
+  { NETPROCFS_SUBDIR_MLD, DTYPE_FILE, "mld" , netprocfs_read_mldstats},
+# endif

Review Comment:
   ```suggestion
   #  endif
   ```



##########
net/procfs/net_procfs.c:
##########
@@ -98,6 +112,26 @@ static int     netprocfs_rewinddir(FAR struct fs_dirent_s *dir);
 
 static int     netprocfs_stat(FAR const char *relpath, FAR struct stat *buf);
 
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+/* Netprocfs component mappings */
+
+static const struct netprocfs_entry_s g_net_entries[] =
+{
+#ifdef CONFIG_NET_STATISTICS
+  { NETPROCFS_SUBDIR_STAT, DTYPE_FILE, "stat" , netprocfs_read_netstats},
+# ifdef CONFIG_NET_MLD

Review Comment:
   ```suggestion
   #  ifdef CONFIG_NET_MLD
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org