Skip to content
Browse files
src/main.c (Init): chmod /ssd to YAFFS_ROOT_MODE to keep up with RTEM…
…S changes

RTEMS now enforces permissions and RTEMS-YFFS got them wrong before,
making all M1 /ssd file systems created before this change de facto
inaccessible for Flickernoise.

With this commit, we change the permission to the YAFFS default (0777)
when mounting /ssd, transparently migrating all older installations.
  • Loading branch information
wpwrak committed Apr 18, 2012
1 parent e807609 commit c1a99feeed387466cbb1cd5c9f734763d25aa450
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/main.c
@@ -187,6 +187,16 @@ rtems_task Init(rtems_task_argument argument)
mkdir("/ssd", 0777);
mount("/dev/flash5", "/ssd", "yaffs", RTEMS_FILESYSTEM_READ_WRITE, "");
* Older versions of RTEMS-YAFFS created the file system with the
* (persistent) root inode set to 0666. RTEMS didn't check permissions
* at that time but does now, causing most operations to fail (EACCES)
* on file systems created before the transition.
* The "chmod" below transparently updates the permission of /ssd files
* systems.
chmod("/ssd", YAFFS_ROOT_MODE);


0 comments on commit c1a99fe

Please sign in to comment.