On 2014-06-17 11:08, Chris Johns wrote:
On 17/06/2014 6:51 pm, Sebastian Huber wrote:
On 2014-06-16 21:56, Chris Johns wrote:
On 14/06/2014 2:00 am, Sebastian Huber wrote:
Module:    rtems
Branch:    master
Commit:    73bf499ce7710ff8e75833042f88d1ff5b3e84fa
Changeset:
http://git.rtems.org/rtems/commit/?id=73bf499ce7710ff8e75833042f88d1ff5b3e84fa


Author:    Sebastian Huber <sebastian.hu...@embedded-brains.de>
Date:      Tue Jun 10 10:56:55 2014 +0200

JFFS2: Add device identifier for the flash device

It is used in combination with the inode number to uniquely identify a
file system node in the system.

---

  cpukit/libfs/src/jffs2/include/rtems/jffs2.h |   11 ++++++++++-
  cpukit/libfs/src/jffs2/src/fs-rtems.c        |    7 +++++--
  2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/cpukit/libfs/src/jffs2/include/rtems/jffs2.h
b/cpukit/libfs/src/jffs2/include/rtems/jffs2.h
index e69fc20..7b2f4d5 100644
--- a/cpukit/libfs/src/jffs2/include/rtems/jffs2.h
+++ b/cpukit/libfs/src/jffs2/include/rtems/jffs2.h
@@ -118,7 +118,8 @@ typedef struct rtems_jffs2_flash_control
rtems_jffs2_flash_control;
   *     .flash_size = FLASH_SIZE,
   *     .read = flash_read,
   *     .write = flash_write,
- *     .erase = flash_erase
+ *     .erase = flash_erase,
+ *     .device_identifier = 0xc01dc0fe

I cannot see anything that describes what this field is to contain. A
number is
a bit cryptic. Is this specific to a flash driver, all drivers, or
something
else ?

I cannot find the flash driver used here so maybe a comment about this
and
where to find it would also help.

The description is here:

@@ -265,6 +266,14 @@ struct rtems_jffs2_flash_control {
     * This operation is optional and the pointer may be @c NULL.
     */
    rtems_jffs2_flash_destroy destroy;
+
+  /**
+   * @brief The device identifier of the flash device.
+   *
+   * It is used in combination with the inode number to uniquely
identify a
+   * file system node in the system.
+   */
+  dev_t device_identifier;
  };

  typedef struct rtems_jffs2_compressor_control
rtems_jffs2_compressor_control;

Due to the dev_t type it should be clear what it is.


Is there an example driver in the RTEMS source tree ?

Yes, here:

http://www.rtems.org/onlinedocs/doxygen/cpukit/html/group__JFFS2.html

and here:

http://git.rtems.org/rtems/tree/testsuites/fstests/jffs2_support/fs_support.c

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to