summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/dosfs/msdos_misc.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* cpukit/dosfs: Remove unused internal function argKinsey Moore2024-01-161-2/+0
|
* cpukit: Remove or use unused variable assignmentsKinsey Moore2024-01-161-1/+2
|
* Update company nameSebastian Huber2023-05-201-1/+1
| | | | | The embedded brains GmbH & Co. KG is the legal successor of embedded brains GmbH.
* cpukit: occured -> occurredSebastian Huber2021-07-161-9/+9
|
* dosfs: Fix Doxygen group placementSebastian Huber2020-12-021-1/+1
| | | | Update #3706.
* doxygen: Switch @brief and @ingroupSebastian Huber2020-04-281-1/+2
| | | | This order change fixes the Latex documentation build via Doxygen.
* Canonicalize config.h includeSebastian Huber2020-04-161-1/+1
| | | | | | | | Use the following variant which was already used by most source files: #ifdef HAVE_CONFIG_H #include "config.h" #endif
* dosfs: Use self-contained recursive mutexSebastian Huber2018-02-021-6/+2
| | | | Update #2843.
* dosfs: Allow creating a file with similar name.Christian Mauderer2017-12-071-3/+7
| | | | | | | | If there is already a file with a long file name it isn't possible to create a second file which has a name that ends on the first files name (for example ets.beam and sets.beam). This patch fixes that. Update #3258.
* dosfs: Fix files with same name as volume name.Christian Mauderer2017-12-051-1/+2
| | | | | | | Take care that a file in the root directory with the same name as the volume name can be found. Update #3257.
* dosfs: Fix find name next entry preparationSebastian Huber2017-09-061-25/+50
| | | | Update #2964.
* dosfs: Fix file name searchSebastian Huber2017-03-161-17/+7
| | | | | | | Do not use our long file name entry count to optimize the file name search. The Unicode comparison must be taken into account. Update #2939.
* dosfs: Rename fat_entries to lfn_entriesSebastian Huber2017-03-161-20/+20
| | | | | The name "fat_entries" for long file name directory entries is quite misleading.
* dosfs: Fix long file name paddingSebastian Huber2017-03-161-3/+3
| | | | Update #2934.
* dosfs: Fix msdos_add_file()Sebastian Huber2017-03-161-245/+155
| | | | | | Make sure that long file names work accross cluster boundaries. Update #2929.
* dosfs: Simplify msdos_add_file()Sebastian Huber2017-03-161-4/+2
| | | | Update #2929.
* dosfs: Add and use msdos_lfn_checksum()Sebastian Huber2017-03-161-14/+21
| | | | Update #2929.
* dosfs: Directories should have a file size of 0Sebastian Huber2017-02-281-1/+6
| | | | Close #2755.
* dosfs: Fix msdos_find_file_in_directory()Sebastian Huber2017-02-141-1/+1
| | | | | | For a filename match the entry must match without anything remaining. Close #2908.
* DOSFS - LENGHT -> LENGTHJoel Sherrill2016-07-121-3/+3
| | | | closes #2756,
* dosfs: avoid buffer-overread. closes #2292.Gedare Bloom2015-05-271-2/+2
|
* dosfs/msdos_misc.c: Remove unnecessary operationJosh Oguin2014-11-261-1/+1
| | | | | CodeSonar flagged the increment of this pointer as unneeded. The pointer is not used past this point.
* dosfs: Support ctime and mtimeSebastian Huber2014-10-231-39/+61
| | | | | | | Implement ctime and mtime updates according to POSIX. The ctime is mapped to the FAT create time and date. The mtime is mapped to the FAT last modified time and date. For the atime use the mtime for simplicity.
* dosfs: Check error statusSebastian Huber2014-09-111-14/+16
|
* Change all references of rtems.com to rtems.org.Chris Johns2014-03-211-1/+1
|
* dosfs: Eliminate empty case statements that fall through to default.Gedare Bloom2013-09-051-2/+0
| | | | | | | Also eliminates possibly dead code in case the name_type can never actually be MSDOS_NAME_INVALID. 1063860 Logically dead code.
* dosfs: UTF-8 Support: Multibyte conversionsRalf Kirchner2013-06-031-9/+15
| | | | | | | | | | | | Add optional conversion methods for multibyte strings. With these conversions which make use of iconv and utf8proc it becomes possible to use strings from any language (Czech, Chinese, Arabian, Hebrew, Corean, ...) for file names and directory names. NOTE: Iconv support must be activated during the build of the tool chain for these conversion methods (options --enable-newlib-iconv --enable-newlib-iconv-encodings=[ENCODINGS_YOU_WANT]). Alternatively you can provide your own conversion methods.
* dosfs: UTF-8 Support: UI, backwards compatibilityRalf Kirchner2013-06-031-289/+739
| | | | | | | | | User interface and backwards compatibility for UTF-8 support in the FAT file system. Purpose of UTF-8 support is to permit file names and directory names with characters from all kinds of languages (Czech, Chinese, Arabian, Hebrew, Korean, ...). This commit does not yet support multibyte characters. It only contains the user interface and the backwards compatibility.
* dosfs: Fix typoRalf Kirchner2013-05-241-1/+1
|
* libfs: Doxygen Enhancement Task #6"Mathew Kallada2012-12-201-2/+7
|
* dosfs: Cluster write optimizationRalf Kirchner2012-12-051-9/+9
| | | | | | Separate cluster write from sector write for quick file write. New test fstests/fsdosfswrite01.
* dosfs: Lazy update of FAT32 FS info sectorSebastian Huber2012-11-131-14/+1
| | | | | | | | | | | | | | | | | | | | | The FAT32 FS info sector contains hints for the free cluster count and the next free cluster. The previous code read these values during mount and replaced them with invalid values. The shutdown operation updated them with the current values. These values are only hints. Every FAT implementation must cope with arbitrary values. They are intended to speed up certain operations. Now we update the free cluster count and next free culster in the FAT32 FS info sector only during unmount or sync operations and only if the values have changed. This avoids writes to the FS info sector and conforms to the behaviour of Linux and Windows. The application can force an update of these values now with the fsync() and fdatasync() operations. Applications that only read will perform not write operations to the FAT32 FS info sector. The new fat_sync() function performs all non-file specific synchronizations.
* dosfs: Use fs_info instead of mt_entrySebastian Huber2012-07-111-41/+41
|
* Fix C files which had two semi-colons at EOLJoel Sherrill2012-05-311-1/+1
|
* Remove All CVS Id Strings Possible Using a ScriptJoel Sherrill2012-05-111-2/+0
| | | | | | | | | | | | Script does what is expected and tries to do it as smartly as possible. + remove occurrences of two blank comment lines next to each other after Id string line removed. + remove entire comment blocks which only exited to contain CVS Ids + If the processing left a blank line at the top of a file, it was removed.
* dosfs: Remove fat_file_datasync()Sebastian Huber2012-05-111-0/+31
| | | | | | | | | | | | | | | The fat_file_datasync() read every cluster of the file into the cache and then synchronized it step-by-step. For unmodified buffers this is a non-operation. For modified buffers this will wake-up the swapout task which performs then a single buffer write operation. This is usually quite inefficient. Firstly we do single buffer writes, secondly we may perform a lot of unnecessary read operations (for huge files this is really bad), and thirdly this leads likely to cache evictions. The synchronization procedure is replaced by a simple rtems_bdbuf_sync_dev(). This has the side-effect that also buffers not related to the file are synchronized, but since the modified list is normally short this should be acceptable.
* Filesystem: PR1893: Fix write and truncate handlerSebastian Huber2012-05-111-2/+2
| | | | | Space that grows due to truncate or write offsets beyond the current file size must be zero filled.
* Filesystem: Reference counting for locationsSebastian Huber2012-03-131-90/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o A new data structure rtems_filesystem_global_location_t was introduced to be used for o the mount point location in the mount table entry, o the file system root location in the mount table entry, o the root directory location in the user environment, and o the current directory location in the user environment. During the path evaluation global start locations are obtained to ensure that the current file system instance will be not unmounted in the meantime. o The user environment uses now reference counting and is protected from concurrent access. o The path evaluation process was completely rewritten and simplified. The IMFS, RFS, NFS, and DOSFS use now a generic path evaluation method. Recursive calls in the path evaluation have been replaced with iteration to avoid stack overflows. Only the evaluation of symbolic links is recursive. No dynamic memory allocations and intermediate buffers are used in the high level path evaluation. No global locks are held during the file system instance specific path evaluation process. o Recursive symbolic link evaluation is now limited by RTEMS_FILESYSTEM_SYMLOOP_MAX. Applications can retrieve this value via sysconf(). o The device file system (devFS) uses now no global variables and allocation from the workspace. Node names are allocated from the heap. o The upper layer lseek() performs now some parameter checks. o The upper layer ftruncate() performs now some parameter checks. o unmask() is now restricted to the RWX flags and protected from concurrent access. o The fchmod_h and rmnod_h file system node handlers are now a file system operation. o The unlink_h operation has been removed. All nodes are now destroyed with the rmnod_h operation. o New lock_h, unlock_h, clonenod_h, and are_nodes_equal_h file system operations. o The path evaluation and file system operations are now protected by per file system instance lock and unlock operations. o Fix and test file descriptor duplicate in fcntl(). o New test fstests/fsnofs01.
* Remove stray whitespaces.Ralf Corsepius2011-11-061-3/+3
|
* 2011-02-23 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-02-231-3/+0
| | | | * libfs/src/dosfs/msdos_misc.c: Don't include <strings.h>.
* 2010-12-28 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2010-12-281-4/+14
| | | | | * libfs/src/dosfs/msdos_misc.c: Create short file names acceptable for Windows.
* 2010-12-27 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2010-12-271-2/+4
| | | | | | * libfs/src/dosfs/msdos.h, libfs/src/dosfs/msdos_misc.c, libfs/src/dosfs/msdos_create.c: Create valid create and modfied date and time.
* 2010-08-23 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-08-231-2/+2
| | | | | | | | | | CID 99 CID 100 CID 101 CID 102 * libfs/src/dosfs/fat_file.c, libfs/src/dosfs/msdos.h, libfs/src/dosfs/msdos_misc.c: Resolve invalid use of const identified by Coverity scanner.
* 2010-03-30 Chris Johns <chrisj@rtems.org>Chris Johns2010-03-301-12/+79
| | | | * libfs/src/dosfs/msdos_misc.c: Fix PR1491.
* 2010-03-26 Chris Johns <chrisj@rtems.org>Chris Johns2010-03-261-11/+11
| | | | * libfs/src/dosfs/msdos_misc.c: Part fix to PR1491.
* 2010-03-12 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-03-121-1/+1
| | | | | | | | | | | | | | | | | | | * ftpd/ftpd.c, httpd/asp.c, httpd/ejparse.c, httpd/emfdb.c, httpd/misc.c, httpd/um.c, httpd/webs.c, httpd/websuemf.c, libfs/src/dosfs/msdos_dir.c, libfs/src/dosfs/msdos_format.c, libfs/src/dosfs/msdos_misc.c, libfs/src/nfsclient/src/nfs.c, libmisc/capture/capture-cli.c, libmisc/monitor/mon-network.c, libmisc/shell/hexdump-odsyntax.c, libmisc/shell/main_ifconfig.c, libmisc/shell/shell.c, libmisc/shell/shell_makeargs.c, libmisc/uuid/parse.c, libnetworking/libc/gethostbydns.c, libnetworking/libc/gethostbyht.c, libnetworking/libc/gethostnamadr.c, libnetworking/libc/getnetnamadr.c, libnetworking/libc/inet_addr.c, libnetworking/libc/inet_network.c, libnetworking/libc/res_debug.c, libnetworking/libc/res_init.c, libnetworking/libc/res_query.c, libnetworking/rtems/rtems_mii_ioctl.c, score/src/objectgetnameasstring.c: Readdress use of ctype methods per recommendation from D.J. Delorie on the newlib mailing list. We should pass an unsigned char into these methods.
* Do not overwrite errno in case fat_file_write() returns with an error status.Thomas Doerfler2010-03-121-2/+6
|
* 010-03-04 Chris Johns <chrisj@rtems.org>Chris Johns2010-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libcsupport/include/rtems/libio.h, libcsupport/src/_rename_r.c: Add a rename file op and have rename use it. * libfs/Makefile.am, libfs/src/dosfs/msdos_rename.c, libfs/src/imfs/imfs_rename.c: New files to support the rename file op. * libfs/src/imfs/imfs.h: Add rename interface. * libfs/src/imfs/imfs_init.c: Add rename handler. * libfs/src/imfs/miniimfs_init.c: Fix up ops struct. * libfs/src/dosfs/msdos.h: Add msdos_rename and remove msdos_file_link. * libfs/src/dosfs/msdos_create.c: Remove the link call. * libfs/src/dosfs/msdos_eval.c: Fix a path parsing bug. * libfs/src/dosfs/msdos_init.c: Add rename handler and clean up the struct naming. * libfs/src/rfs/rtems-rfs-link.c, libfs/src/rfs/rtems-rfs-link.h: Change the link call to allow linking of directories if told to and change the unlink to handle unlink directories that are not empty so rename can be supported. * libfs/src/rfs/rtems-rfs-rtems-dir.c: Fix the link/unlink calls. * libfs/src/rfs/rtems-rfs-rtems.c: Add a rename handler. Fix the link/unlink calls. * libfs/src/dosfs/msdos_dir.c, libfs/src/dosfs/msdos_format.c, libfs/src/dosfs/msdos_misc.c, httpd/asp.c, libfs/src/nfsclient/src/nfs.c: Work around a newlib warning when using the is*() family of calls.
* Whitespace removal.Ralf Corsepius2009-11-291-38/+38
|
* Use uint16_t instead of "unsigned short" to circumvent warning onRalf Corsepius2009-11-021-2/+2
| | | | 16bit targets.