Commit Graph

703 Commits

Author SHA1 Message Date
Sebastian Huber
dfd879fa42 dosfs: Fix race condition msdos_dir_read()
Obtain file system instance lock before member access.

Update #2937.
2017-03-16 15:33:58 +01:00
Sebastian Huber
6c988987f6 dosfs: Rename fat_entries to lfn_entries
The name "fat_entries" for long file name directory entries is quite
misleading.
2017-03-16 15:33:58 +01:00
Sebastian Huber
5f8ed0d8da dosfs: Fix long file name padding
Update #2934.
2017-03-16 15:33:58 +01:00
Sebastian Huber
e625a57ff8 dosfs: msdos_filename_utf8_to_short_name_for_save
Simplify.
2017-03-16 15:33:58 +01:00
Sebastian Huber
b1daf0f095 dosfs: Fix msdos_add_file()
Make sure that long file names work accross cluster boundaries.

Update #2929.
2017-03-16 15:33:58 +01:00
Sebastian Huber
1a9483e2db dosfs: Simplify msdos_add_file()
Update #2929.
2017-03-16 15:33:57 +01:00
Sebastian Huber
3efe74953f dosfs: Add and use msdos_lfn_checksum()
Update #2929.
2017-03-16 15:33:57 +01:00
Sebastian Huber
063eb574b9 dosfs: Simplify fat_file_open()
Update #2929.
2017-03-16 15:33:57 +01:00
Sebastian Huber
ccd4a7f397 dosfs: Simplify msdos_creat_node()
Update #2929.
2017-03-16 15:33:57 +01:00
Sebastian Huber
e69ee3629d 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.

Update #2622.
2017-03-16 15:33:57 +01:00
Sebastian Huber
1becaa953e 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.

Update #2928.
2017-03-16 15:33:57 +01:00
Sebastian Huber
a60db6958f dosfs: Fix FAT32 formatter
The second FAT entry contains a bit to indicate if the FAT32 filesystem
is not dirty and a bit to indicate if there was no IO error.  Set both
bits for a fresh filesystem.  This prevents a warning if mounted on
Windows.

Close #2913.
2017-02-28 09:31:04 +01:00
Sebastian Huber
267de79ad2 dosfs: Directories should have a file size of 0
Close #2755.
2017-02-28 09:31:04 +01:00
Sebastian Huber
5bfeddc0c2 termios: Add kqueue() and poll() support
Real implementation is provided by libbsd.
2017-02-23 07:27:43 +01:00
Nick Withers
df184ebea1 Remove old CVS keywords
Update #2388.
2017-02-15 14:52:15 +01:00
Sebastian Huber
d9c6542970 dosfs: Fix msdos_find_file_in_directory()
For a filename match the entry must match without anything remaining.

Close #2908.
2017-02-14 08:07:22 +01:00
Sebastian Huber
2711914f82 Use <sys/endian.h>
Update #2803.
2017-01-24 08:39:22 +01:00
Sebastian Huber
c0151e6c64 nfsclient: Fix suspicious condition
Close #2700.
2017-01-23 14:38:35 +01:00
Sebastian Huber
66bd19eaf1 JFFS2: Fix typo 2017-01-19 14:10:42 +01:00
Sebastian Huber
ab834d65e4 JFFS2: RTEMS_JFFS2_ON_DEMAND_GARBAGE_COLLECTION
Update #2844.
2016-12-20 08:28:23 +01:00
Sebastian Huber
ade135d455 JFFS2: Add RTEMS_JFFS2_FORCE_GARBAGE_COLLECTION
Add IO control to force a garbage collection.

Update #2844.
2016-12-20 08:26:25 +01:00
Sebastian Huber
07c833f8f9 JFFS2: Add RTEMS_JFFS2_GET_INFO
Add IO control RTEMS_JFFS2_GET_INFO to get some JFFS2 filesystem
instance information.

Update #2844.
2016-12-20 08:26:21 +01:00
Sebastian Huber
d496e0979a imfs: Untangle dependencies
This helps to use IMFS_make_generic_node() without pulling in the
complete IMFS implementation.
2016-09-19 07:22:01 +02:00
Sebastian Huber
a3e9ae5d0d imfs: Fix IMFS_stat_file()
Use the adjusted and not the requested memfile bytes per block.
Untangle dependencies.
2016-09-16 14:02:41 +02:00
Sebastian Huber
da15db787b score: Improve red-black tree debug support
Ensure that we extract a node only from the right tree.
2016-09-06 10:52:19 +02:00
Sebastian Huber
aaaf9610db score: Add debug support to red-black trees
This helps to detect double insert and extract errors.
2016-08-08 09:34:29 +02:00
Joel Sherrill
612297e813 Misc: Spell length correctly 2016-07-12 05:44:17 -05:00
Joel Sherrill
665f03acb3 DOSFS - LENGHT -> LENGTH
closes #2756,
2016-07-12 05:43:06 -05:00
Sebastian Huber
ede1a4182d Make rtems/print.h independent of rtems/bspIo.h 2016-06-22 07:29:26 +02:00
Sebastian Huber
c75aa864cf pipe: Use proper semaphore attr for mutex
Close #2728.
2016-06-06 12:57:07 +02:00
Sebastian Huber
a7f0096b73 dosfs: Use proper semaphore attr for mutex
Close #2727.
2016-06-06 12:57:06 +02:00
Chris Johns
c16e54a983 libfs/jff2: Avoid printk format warnings.
This change does not fix the printk format warnings rather
it ignores them.
2016-05-25 15:47:34 +10:00
Sebastian Huber
452b7f83c4 fat: Fix for invalid cluster sizes
A cluster size > 32KiB resulted in an infinite loop in
fat_init_volume_info() due to an integer overflow.

Close #2717.
2016-05-20 07:50:38 +02:00
Sebastian Huber
a2aa9207af nfsclient: Fix warnings 2016-04-22 09:25:10 +02:00
Sebastian Huber
d8ec270b33 libblock: Drop superfluous <stdlib.h> include
Drop superfluous <stdlib.h> include from <rtems/diskdevs.h> since this
leads to conflicts with the latest Newlib in case this header file is
used in the FreeBSD kernel space, e.g. for USB mass storage support.
2016-04-07 10:29:09 +02:00
Sebastian Huber
f9f7321e0a Filesystem: Remove superfluous permission checks
The permission is check by the upper layer.
2016-01-05 14:29:09 +01:00
Pavel Pisa
9394aa5ed7 untar: do not exit with error when created directory already exists.
The problem exists for both RTEMS untar implementations and their
variants: Untar_FromMemory(), Untar_FromFile() and rtems_tarfs_load().

If filesystem object already exists at extracted directory path
then if it is directory, creation is ignored. Attempt
to delete/unlink object and make directory is tried for other cases.

This simple approach problem reported in ticket fixes #2413.
Behavior follows GNU tar and BSD tar practice for directories
but much more work is required to achieve full semantics
of the full featured tar implementation still.
2015-11-23 10:40:15 -05:00
Sebastian Huber
f97536dcd3 basdefs.h: Add and use RTEMS_UNUSED 2015-10-26 09:13:19 +01:00
Sebastian Huber
7d59bb6229 RFS: Fix resource leak
Close #2433.
2015-10-26 07:29:47 +01:00
Sebastian Huber
f820227372 JFFS2: Use RTEMS red-black tree implementation 2015-09-03 14:00:26 +02:00
Nick Withers
040ddd23b5 Respect 2^32 - 1 B NFSv2 maximum file size
closes #2384
2015-08-06 10:49:37 -04:00
Sebastian Huber
1cfe012543 nfsclient: Use an interrupt lock 2015-06-19 14:24:27 +02:00
Gedare Bloom
92422be16c dosfs: avoid buffer-overread. closes #2292. 2015-05-27 11:21:12 -04: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
f60b4f9344 dosfs: Fix warning fix 2015-04-27 09:10:49 +02:00
Sebastian Huber
9f10911d2b score: Delete Thread_queue_Control::state
Use a parameter for _Thread_queue_Enqueue() instead to reduce memory
usage.
2015-04-23 08:55:43 +02:00
Joel Sherrill
4727585092 imfs.h: Add cast to remove warning for pointer/integer size mismatch 2015-03-24 08:16:22 -05:00
Sebastian Huber
e6f4a612d8 IMFS: NUL-terminate name returned by readdir() 2015-03-17 16:18:03 +01:00
Joel Sherrill
4b7df86b8e cpukit/libdl/rtl-obj-comp.c: Use correct printf() specification 2015-03-17 10:05:03 -05:00
Jamie Iles
674f8b1b05 IMFS: don't strlen() an unterminated string in IMFS_dir_read().
a43a3466 (IMFS: Implement variable length node names) introduced a
changed to IMFS_jnode_t from being a null terminated string to a
separate unterminated string and length.  IMFS_dir_read() was still
performing a strlen() on this unterminated string though and when doing
an 'ls' in the fileio example I saw that some filenames had garbage
suffixes.
2015-03-16 19:17:35 +01:00