[jbossnative-commits] JBoss Native SVN: r971 - trunk/sight/native/os/linux.
jbossnative-commits at lists.jboss.org
jbossnative-commits at lists.jboss.org
Wed Sep 5 05:06:55 EDT 2007
Author: mladen.turk at jboss.com
Date: 2007-09-05 05:06:55 -0400 (Wed, 05 Sep 2007)
New Revision: 971
Modified:
trunk/sight/native/os/linux/volume.c
Log:
Linux volume flags
Modified: trunk/sight/native/os/linux/volume.c
===================================================================
--- trunk/sight/native/os/linux/volume.c 2007-09-05 08:34:08 UTC (rev 970)
+++ trunk/sight/native/os/linux/volume.c 2007-09-05 09:06:55 UTC (rev 971)
@@ -203,10 +203,17 @@
if (!e || !thiz)
return;
if (getmntent_r(e->fp, &ent, buf, SIGHT_MBUFFER_LEN)) {
+ int flags = 0;
SET_IFIELD_S(0000, thiz, ent.mnt_fsname);
- SET_IFIELD_S(0001, thiz, ent.mnt_type);
SET_IFIELD_S(0002, thiz, ent.mnt_dir);
CALL_METHOD1(0000, thiz, sight_get_fs_type(ent.mnt_type));
+
+ if (strstr(ent.mnt_opts, "ro"))
+ flags |= SIGHT_READ_ONLY_VOLUME;
+ if (strstr(ent.mnt_opts, "rw"))
+ flags |= SIGHT_READ_WRITE_VOLUME;
+
+ CALL_METHOD1(0001, thiz, flags);
}
}
More information about the jbossnative-commits
mailing list