summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/imfs/imfs.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-01-31 21:27:01 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-02-04 19:31:55 +0100
commit924cbd4f42c8284899523903934d5db785919fdc (patch)
tree5e253e3620c49ae0e6c773c9d6abb6c0c16bba7d /cpukit/libfs/src/imfs/imfs.h
parentIMFS: Use rtems_filesystem_make_dev_t_from_pointer (diff)
downloadrtems-924cbd4f42c8284899523903934d5db785919fdc.tar.bz2
IMFS: Simplify ino generation
The type of ino_t is unsigned long, so it can store a pointer. Avoid a potential integer overflow.
Diffstat (limited to 'cpukit/libfs/src/imfs/imfs.h')
-rw-r--r--cpukit/libfs/src/imfs/imfs.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/cpukit/libfs/src/imfs/imfs.h b/cpukit/libfs/src/imfs/imfs.h
index c296bffc06..f258ae05a7 100644
--- a/cpukit/libfs/src/imfs/imfs.h
+++ b/cpukit/libfs/src/imfs/imfs.h
@@ -244,7 +244,6 @@ struct IMFS_jnode_tt {
mode_t st_mode; /* File mode */
unsigned short reference_count;
nlink_t st_nlink; /* Link count */
- ino_t st_ino; /* inode */
uid_t st_uid; /* User ID of owner */
gid_t st_gid; /* Group ID of owner */
@@ -372,7 +371,6 @@ static inline void IMFS_mtime_ctime_update( IMFS_jnode_t *jnode )
}
typedef struct {
- ino_t ino_count;
const IMFS_node_control *node_controls [IMFS_TYPE_COUNT];
} IMFS_fs_info_t;
@@ -960,6 +958,11 @@ static inline bool IMFS_is_hard_link( mode_t mode )
return ( mode & S_IFMT ) == IMFS_STAT_FMT_HARD_LINK;
}
+static inline ino_t IMFS_node_to_ino( const IMFS_jnode_t *node )
+{
+ return (ino_t) node;
+}
+
/** @} */
/**