summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-01-31 21:23:26 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-02-04 19:31:52 +0100
commit4c14ace6dd8988696481e484575dcbad06f4a158 (patch)
treec6eda4fc17ac7a9d9073678727467a0d2b39c933
parentefd2965abf0beaa66e918107be0b667f086d6ea4 (diff)
downloadrtems-4c14ace6dd8988696481e484575dcbad06f4a158.tar.bz2
Add rtems_filesystem_make_dev_t_from_pointer()
-rw-r--r--cpukit/libcsupport/include/rtems/libio.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h
index a4607de0e9..a959cfec77 100644
--- a/cpukit/libcsupport/include/rtems/libio.h
+++ b/cpukit/libcsupport/include/rtems/libio.h
@@ -1442,6 +1442,15 @@ static inline dev_t rtems_filesystem_make_dev_t(
return temp.device;
}
+static inline dev_t rtems_filesystem_make_dev_t_from_pointer(
+ const void *pointer
+)
+{
+ uint64_t temp = (((uint64_t) 1) << 63) | (((uintptr_t) pointer) >> 1);
+
+ return rtems_filesystem_make_dev_t((uint32_t) (temp >> 32), (uint32_t) temp);
+}
+
static inline rtems_device_major_number rtems_filesystem_dev_major_t(
dev_t device
)