[rtems commit] IMFS: Generic device identifier

Joel Sherrill joel at rtems.org
Thu Mar 29 14:14:29 UTC 2012


Module:    rtems
Branch:    master
Commit:    92a6418908025aecdfb03f3636423dfc1c19f7a5
Changeset: http://git.rtems.org/rtems/commit/?id=92a6418908025aecdfb03f3636423dfc1c19f7a5

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon Mar  5 11:49:55 2012 +0100

IMFS: Generic device identifier

---

 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 eca8824..dd7c158 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




More information about the vc mailing list