diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-03-05 11:49:55 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-03-13 12:24:16 +0100 |
commit | 04ca77e31d6ac1f5b1cfa9da3b7ac5f8492d4171 (patch) | |
tree | 3b80701940a8bad7747c4dcfc7595c3572352939 /cpukit | |
parent | IMFS: Add make generic node support (diff) | |
download | rtems-04ca77e31d6ac1f5b1cfa9da3b7ac5f8492d4171.tar.bz2 |
IMFS: Generic device identifier
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/libfs/src/imfs/imfs.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cpukit/libfs/src/imfs/imfs.h b/cpukit/libfs/src/imfs/imfs.h index eca8824ca3..dd7c158383 100644 --- a/cpukit/libfs/src/imfs/imfs.h +++ b/cpukit/libfs/src/imfs/imfs.h @@ -198,6 +198,8 @@ typedef struct { */ #define IMFS_DEVICE_MAJOR_NUMBER (0xfffe) +#define IMFS_GENERIC_DEVICE_MAJOR_NUMBER (0xfffd) + /* * Maximum length of a "basename" of an IMFS file/node. */ @@ -619,6 +621,16 @@ static inline void *IMFS_generic_get_context_by_iop( return IMFS_generic_get_context_by_location( &iop->pathinfo ); } +static inline dev_t IMFS_generic_get_device_identifier_by_node( + const IMFS_jnode_t *node +) +{ + return rtems_filesystem_make_dev_t( + IMFS_GENERIC_DEVICE_MAJOR_NUMBER, + node->st_ino + ); +} + #ifdef __cplusplus } #endif |