#2190 closed defect (invalid)

an external fat16 image does not work properly, getcwd() fails

Reported by: Marco Owned by: Chris Johns
Priority: low Milestone: Indefinite
Component: fs/fat Version:
Severity: normal Keywords:
Cc: sebastian.huber@… Blocked By:
Blocking:

Description (last modified by Sebastian Huber)

getcwd() syscall fails when browsing deeper in the mounted filesystem.
A wrong path is returned (also in rtems4.10 which is our target platform)

Discussion was on mailing list:
http://lists.rtems.org/pipermail/users/2014-October/028297.html

Test case:
an external fat16 image is created with a default content using the following tools:
dd
mkfs.vfat
mcopy
xxd

the mkfs generated image is converted to a C data array and compiled to an object file.
This object file is then linked into the rtems application.

Steps to compile the test case:
The above tools need to be installed on a Linx build machine (debian wheezy used here)

The top level Makefile in the src folder expects the sparc rtems 4.11 toolchain in the $(project_root_dir)/build/toolchain/

Toolchain is not attached as it is very big. But if desired I can provide a link to download it.

The top level Makefile calls the fatfs image generation Makefile and then the application Makefile.

The test case app sets up two ramdisks.
One under /sdram -> this one id formated using rtems dosfs functions
and one under /mram -> this should contain the default content

then a dummy thread and the rtems shell is started.

We suppose it is getcwd() as we had this behaviour in our final application using this system call.

If something is missing or so please contact me.

Attachments (1)

testcase.tar.gz (11.7 KB) - added by Marco on Oct 17, 2014 at 7:59:01 AM.
test project

Download all attachments as: .zip

Change History (7)

Changed on Oct 17, 2014 at 7:59:01 AM by Marco

Attachment: testcase.tar.gz added

test project

comment:1 Changed on Oct 24, 2014 at 5:46:45 AM by Sebastian Huber

Cc: Sebastian Huber added

comment:2 Changed on Oct 28, 2014 at 12:40:42 PM by Marco

ok
I will create one in addition to the attached test case. It will be a Makefile approach and also a native linux app demonstrating that the fatfs image is ok.
It will take me a week or two.

comment:3 Changed on Dec 18, 2014 at 12:39:14 PM by Sebastian Huber

Description: modified (diff)
Milestone: 4.115.0
Priority: normallow

comment:4 Changed on Aug 14, 2017 at 12:43:19 AM by Chris Johns

Milestone: 5.0Indefinite
Version: 4.11

comment:5 Changed on Aug 24, 2017 at 10:00:58 AM by Sebastian Huber

Resolution: invalid
Status: newclosed

We fixed a couple of FAT bugs. Maybe it works now.

comment:6 Changed on Oct 10, 2017 at 6:50:58 AM by Sebastian Huber

Component: fsfs/fat
Note: See TracTickets for help on using tickets.