#2013 closed defect (fixed)

RFS and symlinks not working.

Reported by: Chris Johns Owned by: Chris Johns
Priority: normal Milestone: 4.11
Component: fs Version: 4.11
Severity: normal Keywords:
Cc: sebastian.huber@… Blocked By:
Blocking:

Description

Running fileio.exe for the sis BSP ...

$ sparc-rtems4.11-run sparc-rtems4.11/c/sis/testsuites/samples/fileio/fileio.exe

* TEST FILE I/O SAMPLE *
Press any key to start file I/O sample (20s remaining)
Press any key to start file I/O sample (19s remaining)

=========================
RTEMS FILE I/O Test Menu
=========================

p -> part_table_initialize
f -> mount all disks in fs_table
l -> list file
r -> read file
w -> write file
s -> start shell
Enter your selection ==>s

Creating /etc/passwd and group with three useable accounts
root/pwd , test/pwd, rtems/NO PASSWORD

=========================
starting shell
=========================

RTEMS SHELL (Ver.1.0-FRC):/dev/console. Dec 10 2011. 'help' to list commands.
/ # mkrd
Register RAM Disk Driver [blocks=1024 block-size=512]:successful
/ # ls dev
console console_a console_b rda
/ # mkrfs -v /dev/rda
rtems-rfs: format: /dev/rda
rtems-rfs: format: media size = 524288
rtems-rfs: format: media blocks = 1024
rtems-rfs: format: media block size = 512
rtems-rfs: format: size = 524288
rtems-rfs: format: blocks = 1024
rtems-rfs: format: block size = 512
rtems-rfs: format: bits per block = 4096
rtems-rfs: format: inode size = 56
rtems-rfs: format: inodes = 90 (1.0%)
rtems-rfs: format: groups = 1
rtems-rfs: format: group blocks = 4096
rtems-rfs: format: group inodes = 90
rtems-rfs: format: group 0: base = 1, size = 1023, blocks, inodes
/ # mkdir r
/ # mount -t rfs /dev/rda /r
mounted /dev/rda -> /r
/ # cd r
r # ls
r # mkdir 1
r # cd 1
r/1 # mkdir 2
r/1 # cd ..
r # ls
1
r # ln -s 1/2 2
r # ls -las
total 2
1 drwx--x--x 1 root root 512 Jan 1 00:01 .
1 drwxrwxrwx 2 root root 512 Jan 1 00:02 1
r # cd 2
chdir to '2' failed:No such file or directory
r # cd 1
r/1 # ls
2
r/1 # mkdir 2/3
r/1 # ln -s 2/3 3
r/1 # ls -las
total 3
1 drwxrwxrwx 2 root root 512 Jan 1 00:02 .
1 drwx--x--x 1 root root 512 Jan 1 00:01 ..
1 drwxrwxrwx 2 root root 512 Jan 1 00:03 2

Change History (2)

comment:1 Changed on Mar 13, 2012 at 11:35:46 AM by Sebastian Huber

Resolution: fixed
Status: newclosed, sebastian.huber@embedded-brains.de

The RTEMS shell 'ln' is a POSIX 'ln [-fs] source_file target_file' command. You should use 'ln -s 2 1/2'.

However the symbolic link support had other problems which are now fixed with

http://git.rtems.org/rtems/commit/?id=3b7c123c8d910eb60ab3b38dec6224e2de9847c9

comment:2 Changed on Nov 24, 2014 at 6:58:28 PM by Gedare Bloom

Version: HEAD4.11

Replace Version=HEAD with Version=4.11 for the tickets with Milestone >= 4.11

Note: See TracTickets for help on using tickets.