summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/rfs/rtems-rfs-file-system.h
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2010-02-26 05:54:59 +0000
committerChris Johns <chrisj@rtems.org>2010-02-26 05:54:59 +0000
commit3cfa6368c3211eed83df08850f0af26481f161f6 (patch)
tree822cfa7d031cb1d644172cff41ab8f952c038a34 /cpukit/libfs/src/rfs/rtems-rfs-file-system.h
parent combine all checks for missing MAC address (diff)
downloadrtems-3cfa6368c3211eed83df08850f0af26481f161f6.tar.bz2
010-02-26 Chris Johns <chrisj@rtems.org>
* libfs/src/rfs/rtems-rfs-block.c: Reset a buffer handle after moving down an indirection level. * libfs/src/rfs/rtems-rfs-dir.c: Move directory entry validation into a macro and use the macro. Fix the range check on the ino so all inodes can be used. * libfs/src/rfs/rtems-rfs-file-system.c, libfs/src/rfs/rtems-rfs-file-system.h:: Add a version number to the superblock. Use RTEMS_RFS_INODE_SIZE. * libfs/src/rfs/rtems-rfs-file.c: Fix the size offset on partial block lengths. Set the size in the file handle on a truncate to 0. * libfs/src/rfs/rtems-rfs-format.c: Add a version number to the superblock. Use RTEMS_RFS_INODE_SIZE. A better set of defaults for small disks. * libfs/src/rfs/rtems-rfs-inode.c: Use RTEMS_RFS_INODE_SIZE. Free the allocated inode if it cannot be opened. * libfs/src/rfs/rtems-rfs-inode.h: Add RTEMS_RFS_INODE_SIZE. * libfs/src/rfs/rtems-rfs-rtems-file.c: Move some of the iop acceses inside the fs lock. * libfs/src/rfs/rtems-rfs-shell.c: Use RTEMS_RFS_INODE_SIZE.
Diffstat (limited to 'cpukit/libfs/src/rfs/rtems-rfs-file-system.h')
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-file-system.h27
1 files changed, 20 insertions, 7 deletions
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-file-system.h b/cpukit/libfs/src/rfs/rtems-rfs-file-system.h
index 8590d108aa..7d85a43401 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-file-system.h
+++ b/cpukit/libfs/src/rfs/rtems-rfs-file-system.h
@@ -27,13 +27,26 @@
*/
#define RTEMS_RFS_SB_OFFSET_MAGIC (0)
#define RTEMS_RFS_SB_MAGIC (0x28092001)
-#define RTEMS_RFS_SB_OFFSET_BLOCK_SIZE (4)
-#define RTEMS_RFS_SB_OFFSET_BLOCKS (8)
-#define RTEMS_RFS_SB_OFFSET_BAD_BLOCKS (12)
-#define RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH (16)
-#define RTEMS_RFS_SB_OFFSET_GROUPS (20)
-#define RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS (24)
-#define RTEMS_RFS_SB_OFFSET_GROUP_INODES (28)
+#define RTEMS_RFS_SB_OFFSET_VERSION (RTEMS_RFS_SB_OFFSET_MAGIC + 4)
+#define RTEMS_RFS_SB_OFFSET_BLOCK_SIZE (RTEMS_RFS_SB_OFFSET_VERSION + 4)
+#define RTEMS_RFS_SB_OFFSET_BLOCKS (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE + 4)
+#define RTEMS_RFS_SB_OFFSET_BAD_BLOCKS (RTEMS_RFS_SB_OFFSET_BLOCKS + 4)
+#define RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS + 4)
+#define RTEMS_RFS_SB_OFFSET_GROUPS (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH + 4)
+#define RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS (RTEMS_RFS_SB_OFFSET_GROUPS + 4)
+#define RTEMS_RFS_SB_OFFSET_GROUP_INODES (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS + 4)
+#define RTEMS_RFS_SB_OFFSET_INODE_SIZE (RTEMS_RFS_SB_OFFSET_GROUP_INODES + 4)
+
+/**
+ * RFS Version Number.
+ */
+#define RTEMS_RFS_VERSION (0x00000000)
+
+/**
+ * RFS Version Number Mask. The mask determines which bits of the version
+ * number indicate compatility issues.
+ */
+#define RTEMS_RFS_VERSION_MASK (0x00000000)
/**
* The root inode number. Do not use 0 as this has special meaning in some Unix