Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 5.8/5.9 does not handle the "jffs2" filesystem type #268

Closed
JohnGilmour opened this issue Feb 11, 2021 · 1 comment
Closed

Version 5.8/5.9 does not handle the "jffs2" filesystem type #268

JohnGilmour opened this issue Feb 11, 2021 · 1 comment

Comments

@JohnGilmour
Copy link

JohnGilmour commented Feb 11, 2021

Hello,

I had an issue walking the MIB on a linux device that uses a flash card as the primary storage. The flash card is identified in "/etc/mtab" as:
/dev/mtdblock3 /flash jffs2 rw,relatime 0 0

As the "jffs2" filesystem was not recognised the _fsys_type defaulted to NETSNMP_FS_TYPE_IGNORE. This in turn sets the _NETSNMP_FS_TYPE_SKIP_BIT flag which stops the HRFS_entry->flags having the NETSNMP_FS_FLAG_ACTIVE bit set.

When the call to Get_Next_HR_FileSys is activated it ignores the device because the NETSNMP_FS_FLAG_ACTIVE bit is not set.

Might I suggest updating the files to include the JFFS2 file system:
--- a/agent/mibgroup/hardware/fsys/fsys_mntent.c
+++ b/agent/mibgroup/hardware/fsys/fsys_mntent.c
@@ -138,6 +138,7 @@ _fsys_type( char *typename )
!strcmp(typename, MNTTYPE_GFS2) ||
!strcmp(typename, MNTTYPE_XFS) ||
!strcmp(typename, MNTTYPE_JFS) ||

  •          !strcmp(typename, MNTTYPE_JFFS2) ||
             !strcmp(typename, MNTTYPE_VXFS) ||
             !strcmp(typename, MNTTYPE_REISERFS) ||
             !strcmp(typename, MNTTYPE_OCFS2) ||
    

diff --git a/agent/mibgroup/hardware/fsys/mnttypes.h b/agent/mibgroup/hardware/fsys/mnttypes.h
index 53f1cc8964..e975946c04 100644
--- a/agent/mibgroup/hardware/fsys/mnttypes.h
+++ b/agent/mibgroup/hardware/fsys/mnttypes.h
@@ -157,6 +157,9 @@
#ifndef MNTTYPE_ACFS
#define MNTTYPE_ACFS "acfs"
#endif
+#ifndef MNTTYPE_JFFS2
+#define MNTTYPE_JFFS2 "jffs2"
+#endif

Best regards,

John.

@JohnGilmour JohnGilmour changed the title Version 5.8/5.9 does not handle the "jffs2" file type Version 5.8/5.9 does not handle the "jffs2" filesystem type Feb 11, 2021
@bvanassche
Copy link
Contributor

Although this report was closed by the github system, feel free to provide further feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants