Commit Graph

135 Commits

Author SHA1 Message Date
Sebastian Huber
d51538bdbe dosfs: Fix file name search
Do not use our long file name entry count to optimize the file name
search. The Unicode comparison must be taken into account.

Close #2939.
2017-03-21 16:15:25 +01:00
Sebastian Huber
c38f1fcf8f dosfs: Fix fat_file_write()
Remove forced overwrite which leads to file data corruption.  The logic
to determine a forced overwrite was fundamentally broken.  For simplity,
disable this feature.

Close #2622.
2017-03-21 16:14:44 +01:00
Sebastian Huber
21d7154b07 dosfs: Fix msdos_utf8_normalize_and_fold()
It is all right in case the result uses the full destination buffer.
Without this fix the handling of a maximum 8.3 short file name is
broken.

Close #2928.
2017-03-21 16:14:37 +01:00
Sebastian Huber
f08c71339c libio: Fix deadlock in location management
Perform a context-dependent deferred location release to avoid a
deadlock on the file system instance locks, for example during a
chdir().

Close #2936.
2017-03-21 16:13:11 +01:00
Sebastian Huber
04684cbc43 dosfs: Fix msdos_find_file_in_directory()
For a filename match the entry must match without anything remaining.

Update #2908.
2017-02-14 08:09:57 +01:00
Sebastian Huber
ee4e7f09b4 jffs2: Move into separate library
In case the zlib compression was used, then the librtemscpu.a depended
on libz.a.  To avoid a GCC patch or complicated link flags move the
JFFS2 support into a separate library to use a simple "-ljffs2 -lz" to
link the executable.
2015-05-27 08:53:05 +02:00
Sebastian Huber
f820f22cf0 fstests/fsfseeko01: Fix for long == off_t
Close #2317.
2015-04-08 07:46:10 +02:00
Alexander Krutwig
15031660b8 fstests: Increase stack size for symlink loop test 2015-03-31 15:15:23 +02:00
Alexander Krutwig
260cfe0500 fstests/fssymlink: Typo 2015-03-31 15:15:23 +02:00
Joel Sherrill
57a914a3fb Add simple test for scandir() on all file systems tested
updates 1394
2015-03-04 14:46:14 -06:00
Sebastian Huber
f78549221b IMFS: Add CONFIGURE_IMFS_DISABLE_READDIR 2015-02-14 21:34:42 +01:00
Sebastian Huber
249766c53f IMFS: Rename CONFIGURE_IMFS_DISABLE_FCHMOD
Rename CONFIGURE_IMFS_DISABLE_FCHMOD to CONFIGURE_IMFS_DISABLE_CHMOD.
2015-02-13 21:26:17 +01:00
Sebastian Huber
40a18d7f9a IMFS: Add CONFIGURE_IMFS_DISABLE_MKNOD_FILE 2015-02-13 21:11:55 +01:00
Sebastian Huber
12eee4fdb5 IMFS: CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
Resurrect CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM.
2015-02-13 20:53:41 +01:00
Sebastian Huber
a9df916988 IMFS: Add fine grained configuration
Remove miniIMFS.  Statically initialize the root IMFS.

Add configuration options to disable individual
features of the root IMFS, e.g.
  o CONFIGURE_IMFS_DISABLE_CHOWN,
  o CONFIGURE_IMFS_DISABLE_FCHMOD,
  o CONFIGURE_IMFS_DISABLE_LINK,
  o CONFIGURE_IMFS_DISABLE_MKNOD,
  o CONFIGURE_IMFS_DISABLE_MOUNT,
  o CONFIGURE_IMFS_DISABLE_READLINK,
  o CONFIGURE_IMFS_DISABLE_RENAME,
  o CONFIGURE_IMFS_DISABLE_RMNOD,
  o CONFIGURE_IMFS_DISABLE_SYMLINK,
  o CONFIGURE_IMFS_DISABLE_UNMOUNT, and
  o CONFIGURE_IMFS_DISABLE_UTIME.
2015-02-12 20:53:36 +01:00
Sebastian Huber
60cf8a5c16 IMFS: Add root directory to FS info
Fix memory leak in IMFS_fsunmount().
2015-02-12 20:53:35 +01:00
Sebastian Huber
24ec25d2ae IMFS: Introduce IMFS_mknod_control
Drop IMFS_node_control::node_size field and add node_size parameter to
IMFS_allocate_node() and IMFS_create_node().  This reduces the size of
generic nodes.
2015-02-12 20:53:34 +01:00
Sebastian Huber
b4e52ce90f fstests/fsrename: Avoid double initialization 2015-02-09 15:38:04 +01:00
Sebastian Huber
cf36b70e8d IMFS: Replace node union with individual struct
This reduces the average node size.

Add and use IMFS_GENERIC_INITIALIZER().
2015-01-27 06:54:22 +01:00
Sebastian Huber
c625a64121 Filesystem: Delete node type operation
Use the fstat handler instead.
2015-01-22 07:52:40 +01:00
Sebastian Huber
a0b1b5edb8 Delete CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
This define was superfluous, undocumented and used inconsistently.
2014-12-16 11:34:38 +01:00
Sebastian Huber
1207288022 Update bug report URL 2014-12-05 07:47:32 +01:00
Sebastian Huber
b8bd90f68f Add supplementary groups to user environment 2014-11-20 10:30:23 +01:00
Sebastian Huber
66c1ef9256 Revert "fstests/mdosfs_fstime: Remove test"
This reverts commit bdcf4102f7.
2014-10-23 10:21:28 +02:00
Sebastian Huber
22cd2821de IMFS: Avoid NULL pointer access
Avoid NULL pointer access in IMFS_is_imfs_instance().  File systems
mounted via mount() always have a valid type string.
2014-10-08 11:26:27 +02:00
Joel Sherrill
3324383ce0 testsuites: Remove BSP_SMALL_MEMORY 2014-05-06 18:31:00 -05:00
Chris Johns
1461b648b7 testsuite: Add a per BSP test check for tests not to build.
Provide a file per BSP to list tests that do not build for a BSP. This change
removes the BSP_SMALL_MEMORY hack from the code. That hack was a
mistake.

Provide configuration files for each BSP with tests that cannot build.
2014-05-05 10:24:41 +10:00
Joel Sherrill
2bea49479a fsdosfsname01: Honor BSP_SMALL_MEMORY 2014-04-22 08:37:02 -05:00
Joel Sherrill
97ae79d762 fsdosfsformat01: Honor BSP_SMALL_MEMORY 2014-04-22 08:37:02 -05:00
Christian Mauderer
5c0c0cf2a6 privateenv: Use POSIX keys instead of task variables. 2014-03-27 14:50:36 +01:00
Christian Mauderer
7d5c27e308 privateenv: Remove sharing of user environment between threads. 2014-03-27 14:50:36 +01:00
Chris Johns
c49985691f Change all references of rtems.com to rtems.org. 2014-03-21 08:10:47 +11:00
Sebastian Huber
f68401e3f5 fstests/fsrename: Fix stack corruption
Use snprintf() instead of sprintf().  Include missing header files.
2014-03-20 13:20:44 +01:00
Sebastian Huber
802d3ba712 tests/fstests: Remove duplicate begin/end messages
Fix file system names.  Remove superfluous defines.
2014-03-20 09:10:08 +01:00
Andre Marques
27d240e050 New fstest to check rename POSIX conformance
This patch is a newer version of the test presented on

http://www.rtems.org/pipermail/rtems-devel/2014-February/005318.html

Unchecked error cases:

- EIO (physical error)

- ENOSPC (no space left in the new filepath)

- EROFS (already covered on testsuites/fstests/fsrofs01)

Untested functionality:

- File system lock during rename() operation

- If after rename() the link count of a file becomes 0 it should be
removed and the space ocupied by the file shall be freed and no longer
accessible (the function statvfs() gives "not implemented" on the imfs
file system, so this is postponed for now)
2014-03-17 10:21:56 +01:00
Sebastian Huber
bc75887774 tests/fstests: Use <rtems/test.h> 2014-03-17 09:17:36 +01:00
Cynthia Rempel
73a7713d8c fstests and libtests: Add contents to multiple documentation files 2014-01-08 12:48:37 -06:00
Cynthia Rempel
23d53e8aaa fsdosfsformat01.doc: Add contents 2014-01-07 15:08:48 -06:00
Cynthia Rempel
d8cd49cb8b fsbdpart01.doc: Add contents 2014-01-07 13:33:36 -06:00
Sebastian Huber
2f68778f08 Filesystem: Add readv/writev handlers
The readv() and writev() support was implemented in terms of multiple
calls to the read and write handlers.  This imposes a problem on device
files which use an IO vector as single request entity.  For example a
low-level network device (e.g. BPF(4)) may use an IO vector to create
one frame from multiple protocol layers each with its own IO vector
entry.
2013-12-20 10:31:53 +01:00
Joel Sherrill
d0beb9bac4 Misc tests: Fix scn files and adjust output 2013-11-18 10:55:24 -06:00
Joel Sherrill
a136fb697d testsuites: Add missing .scn files 2013-11-15 11:55:44 -06:00
Joel Sherrill
892abd53f9 Rename imfs_fspathenval.scn to imfs_fspatheval.scn 2013-11-15 11:55:44 -06:00
Ralf Kirchner
a45b2ac992 fsdosfsname01: Improve test for duplicate names 2013-11-15 14:05:59 +01:00
Ralf Kirchner
0098c5221d fsdosfsformat01: Add test for re-mount of a filesystem 2013-10-18 12:07:10 -04:00
Sebastian Huber
0282e83d64 JFFS2: New tests 2013-09-19 13:16:07 +02:00
Sebastian Huber
bdcf4102f7 fstests/mdosfs_fstime: Remove test
The FAT file system is not conformant with the POSIX requirements.
2013-09-16 10:54:51 +02:00
Sebastian Huber
736983f1cc fstests/fstime: Fix according to POSIX
ftruncate() and open() with O_TRUNC shall upon successful completion
mark for update the st_ctime and st_mtime fields of the file.

truncate() shall upon successful completion, if the file size is
changed, mark for update the st_ctime and st_mtime fields of the file.

The POSIX standard "The Open Group Base Specifications Issue 7", IEEE
Std 1003.1, 2013 Edition says nothing about the behaviour of truncate()
if the file size remains unchanged.

Future directions of the standard may mandate the behaviour specified in
ftruncate():

http://austingroupbugs.net/view.php?id=489
2013-09-13 16:47:55 +02:00
Sebastian Huber
2477a39357 fstests/fspermission: Fix resource leak 2013-09-13 16:47:55 +02:00
Chris Johns
2f9cef8819 Check times with a no change truncate via open.
The open path should update the times even if the truncate does not
change the size.
2013-08-08 08:11:57 +10:00