summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/dosfs/fat_file.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* dosfs: Write meta-data only if it changedSebastian Huber2014-10-231-12/+10
|
* dosfs: Support ctime and mtimeSebastian Huber2014-10-231-0/+34
| | | | | | | 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: Use unprotected chain operationsSebastian Huber2013-08-211-2/+2
| | | | This area is protected by the FAT file system instance lock.
* dosfs: Fix file length updateSebastian Huber2013-02-201-2/+3
|
* dosfs: Fix file extendSebastian Huber2013-02-151-23/+24
| | | | | | Only append a valid cluster chain (cluster added > 0), otherwise we overwrite the root directory cluster (cluster 0) of a FAT12 or FAT16 with arbitrary data.
* dosfs: Always release the buffersSebastian Huber2013-01-301-22/+23
| | | | | Release the buffers also if this is not the last reference to the file object since otherwise we may hold modified data indefinitely.
* libfs: Doxygen Enhancement Task #6"Mathew Kallada2012-12-201-4/+7
|
* dosfs: Cluster write optimizationRalf Kirchner2012-12-051-75/+156
| | | | | | Separate cluster write from sector write for quick file write. New test fstests/fsdosfswrite01.
* dosfs: Use fs_info instead of mt_entrySebastian Huber2012-07-111-73/+64
|
* dosfs: Fix for no space left on device conditionSebastian Huber2012-06-041-3/+5
| | | | | | The file size was wrong in the no space left on device condition. This resulted in turn in a read of an invalid block which lead to an EIO error status.
* 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-59/+0
| | | | | | | | | | | | | | | 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-7/+29
| | | | | Space that grows due to truncate or write offsets beyond the current file size must be zero filled.
* libblock: Change bdbuf APISebastian Huber2012-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | The functions o rtems_bdbuf_get(), o rtems_bdbuf_read(), o rtems_bdbuf_syncdev(), and o rtems_bdbuf_purge_dev(), use now the disk device instead of the device identifier. This makes bdbuf independent of rtems_disk_obtain() and rtems_disk_release(). It is the responsiblity of the file system to obtain the disk device. This also reduces the overhead to get a buffer. The key for the AVL tree uses now the disk device instead of the device identifier. The pointer is interpreted as an unsigned integer. This reduces the memory overhead and makes the comparison operation a bit faster. Removed function rtems_bdbuf_purge_major(). This function was too destructive and could have unpredictable side effects.
* 2011-07-21 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2011-07-211-2/+2
| | | | | | * libfs/src/dosfs/fat_file.c, libmisc/monitor/monitor.h, score/cpu/m68k/rtems/score/cpu.h: Remove stray spaces from unsigned32 to uint32_t conversion.
* 2010-11-25 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2010-11-251-1/+1
| | | | | | | | | | | | | | | | | | * libfs/src/dosfs/fat_file.c, libfs/src/imfs/imfs_debug.c, libfs/src/imfs/imfs_directory.c, libfs/src/imfs/imfs_getchild.c, posix/src/killinfo.c, score/inline/rtems/score/schedulerpriority.inl, score/inline/rtems/score/watchdog.inl, score/src/apiext.c, score/src/chain.c, score/src/coremsgflushsupp.c, score/src/coremsginsert.c, score/src/objectshrinkinformation.c, score/src/schedulerpriorityyield.c, score/src/threadqdequeuepriority.c, score/src/threadqenqueuepriority.c, score/src/threadqextractpriority.c, score/src/threadqfirstfifo.c, score/src/threadqfirstpriority.c, score/src/threadyieldprocessor.c, score/src/userextthreadbegin.c, score/src/userextthreadcreate.c, score/src/userextthreaddelete.c, score/src/userextthreadrestart.c, score/src/userextthreadstart.c, score/src/userextthreadswitch.c, score/src/watchdogreportchain.c: Avoid chain API violations.
* 2010-08-23 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-08-231-1/+1
| | | | | * libblock/src/flashdisk.c, libblock/src/nvdisk.c, libcsupport/src/ioctl.c, libfs/src/dosfs/fat_file.c: Add va_end().
* 2010-08-23 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-08-231-3/+7
| | | | | | | | | | 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.
* Whitespace removal.Ralf Corsepius2009-11-291-2/+2
|
* 2009-04-29 Chris Johns <chrisj@rtems.org>Chris Johns2009-04-291-22/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libcsupport/include/rtems/libio.h: Add rtems_off64_t for internal use. Update the internal off_t to the 64bit offset. * libnetworking/lib/ftpfs.c, libnetworking/lib/tftpDriver.c, libfs/src/nfsclient/src/nfs.c, libfs/src/imfs/imfs_fifo.c, libfs/src/imfs/memfile.c, libfs/src/imfs/imfs_directory.c, libfs/src/imfs/imfs.h, libfs/src/imfs/deviceio.c: Change off_t to rtems_off64_t. * libmisc/shell/main_msdosfmt.c: Add an info level so the format code can tell the user what is happening. Add more options to control the format configuration. * libfs/src/dosfs/msdos_format.c: Add a print function to display the format progress and print statements. Select a better default cluster size depending on the size of the disk. This lowers the size of the FAT on large disks. Read and maintain the MRB partition information. * libfs/src/dosfs/dosfs.h, libfs/src/dosfs/fat.h, libfs/src/dosfs/fat_file.c, libfs/src/dosfs/fat_file.h, libfs/src/dosfs/msdos.h, libfs/src/dosfs/msdos_conv.c, libfs/src/dosfs/msdos_create.c, libfs/src/dosfs/msdos_file.c, libfs/src/dosfs/msdos_handlers_dir.c, libfs/src/dosfs/msdos_handlers_file.c, libfs/src/dosfs/msdos_init.c, libfs/src/dosfs/msdos_initsupp.c, libfs/src/dosfs/msdos_misc.c, libfs/src/dosfs/msdos_mknod.c: Add long file name support. Change off_t to rtems_off64_t.
* 2009-03-09 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill2009-03-091-2/+2
| | | | | | | | | | PR 1376/filesystem * libcsupport/include/rtems/libio.h, libfs/src/dosfs/fat_file.c, libfs/src/dosfs/msdos.h, libfs/src/dosfs/msdos_dir.c, libfs/src/dosfs/msdos_file.c, libfs/src/imfs/deviceio.c, libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_directory.c, libfs/src/imfs/imfs_fifo.c, libfs/src/imfs/memfile.c, libfs/src/nfsclient/src/nfs.c: lseek handlers should return off_t.
* 2008-07-29 Chris Johns <chrisj@rtems.org>Chris Johns2008-07-291-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libblock/Makefile.am: Removed src/show_bdbuf.c. * libblock/src/show_bdbuf.c: Removed. * libblock/include/rtems/bdbuf.h, cpukit/libblock/src/bdbuf.c: Rewritten the bdbuf code. Remove pre-emption disable, score access, fixed many bugs and increased performance. * libblock/include/rtems/blkdev.h: Added RTEMS_BLKDEV_CAPABILITIES block device request. Cleaned up comments. Added block and user fields to the sg buffer request. Move to rtems_* namespace. * libblock/include/rtems/diskdevs.h, cpukit/libblock/src/diskdevs.c: Move to rtems_* namespace. Add a capabilities field for drivers. Change rtems_disk_lookup to rtems_disk_obtain to match the release call. You do not lookup and release a disk, you obtain and release a disk. * libblock/include/rtems/ide_part_table.h, libblock/include/rtems/ramdisk.h, libblock/src/ide_part_table.c: Move to rtems_* namespace. * libblock/include/rtems/nvdisk.h: Formatting change. * libblock/src/blkdev.c: Move to rtems_* namespace. Change rtems_disk_lookup to rtems_disk_obtain * libblock/src/flashdisk.c: Move to rtems_* namespace. Use the new support for the block number in the scatter/grather request struct. This allows non-continuous buffer requests for those drivers that can support increasing performance. * libblock/src/nvdisk.c: Move to rtems_* namespace. Removed warnings. Added better error checking. Fixed some comments. * libblock/src/ramdisk.c: Move to rtems_* namespace. Added some trace functions to help debugging upper layers. Use the new support for the block number in the scatter/grather request struct. This allows non-continuous buffer requests for those drivers that can support increasing performance. * libfs/src/dosfs/fat.c, libfs/src/dosfs/fat.h: Use new chains API. Removed temporary hack and changed set_errno_and_return_minus_one to rtems_set_errno_and_return_minus_one. Move fat_buf_access from header and stopped it being inlined. Updated to libblock changes. * libfs/src/dosfs/fat_fat_operations.c, libfs/src/dosfs/fat_file.c, libfs/src/dosfs/msdos_create.c, libfs/src/dosfs/msdos_dir.c, libfs/src/dosfs/msdos_eval.c, libfs/src/dosfs/msdos_file.c, libfs/src/dosfs/msdos_format.c, libfs/src/dosfs/msdos_free.c, libfs/src/dosfs/msdos_initsupp.c, libfs/src/dosfs/msdos_misc.c, libfs/src/dosfs/msdos_mknod.c: Use new chains API. Removed temporary hack and changed set_errno_and_return_minus_one to rtems_set_errno_and_return_minus_one. Updated to libblock changes. * libmisc/Makefile.am: Add new ls and rm command files. * libmisc/shell/cmp-ls.c, libmisc/shell/extern-ls.h, libmisc/shell/filemode.c, libmisc/shell/print-ls.c, libmisc/shell/pwcache.c, libmisc/shell/utils-ls.c, libmisc/shell/vis.c, shell/vis.h: New. * libmisc/shell/extern-cp.h, libmisc/shell/main_cp.c, libmisc/shell/utils-cp.c: Fixed the usage call bug. * libmisc/shell/main_blksync.c: Updated to the new block IO ioctl command. * libmisc/shell/main_ls.c, libmisc/shell/main_rm.c: Updated to BSD commands with more features. * score/src/coremutex.c: Fix the strick order mutex code. * libmisc/shell/shell.c: Change shell tasks mode to be timeslice and no ASR. * sapi/include/confdefs.h: Change ata_driver_task_priority to rtems_ata_driver_task_priority. Add the new BD buf cache parameters with defaults. * score/src/interr.c: Do not return if the CPU halt call returns.
* 2005-05-06 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2005-05-061-3/+3
| | | | | | | | * libblock/src/blkdev.c, libfs/src/dosfs/fat_file.c, libfs/src/dosfs/fat_file.h, libfs/src/dosfs/msdos.h, libfs/src/dosfs/msdos_create.c, libfs/src/dosfs/msdos_dir.c, libfs/src/dosfs/msdos_initsupp.c, libfs/src/dosfs/msdos_misc.c: Removed warnings.
* Cosmetics.Ralf Corsepius2005-01-191-1/+1
|
* Remove stray white spaces.Ralf Corsepius2004-04-171-196/+196
|
* 2004-03-22 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius2004-03-221-68/+68
| | | | | | | | | | | | | * libfs/src/dosfs/fat.c, libfs/src/dosfs/fat.h, libfs/src/dosfs/fat_fat_operations.c, libfs/src/dosfs/fat_fat_operations.h, libfs/src/dosfs/fat_file.c, libfs/src/dosfs/fat_file.h, libfs/src/dosfs/msdos.h, libfs/src/dosfs/msdos_create.c, libfs/src/dosfs/msdos_dir.c, libfs/src/dosfs/msdos_file.c, libfs/src/dosfs/msdos_initsupp.c, libfs/src/dosfs/msdos_misc.c, libfs/src/imfs/deviceio.c, libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_directory.c, libfs/src/imfs/imfs_fchmod.c, libfs/src/imfs/linearfile.c, libfs/src/imfs/memfile.c: Convert to using c99 fixed-size types.
* 2003-09-26 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2003-09-261-2/+2
| | | | | PR 492/filesystem * src/dosfs/fat_file.c: Fix inconsistent types in va_args call.
* 2003-09-09 Ralf Corsepius <ralf_corsepius@rtems.com>Joel Sherrill2003-09-091-4/+4
| | | | | PR 487/filesystem * src/dosfs/fat_file.c: Correct typing per gcc 3.3 warnings.
* 2003-08-05 Thomas Doerfler <Thomas.Doerfler@imd-systems.de>Jennifer Averett2003-08-051-0/+5
| | | | | PR 439/filesystem *src/dosfs/fat_file.c: flush temporary buffer when closing files
* 2003-07-08 Ralf Corsepius <corsepiu@faw.uni-ulm.de>Ralf Corsepius2003-07-081-0/+4
| | | | | | | * src/dosfs/fat.c: include config-header "config.h". * src/dosfs/fat_fat_operations.c: Ditto. * src/dosfs/fat_file.c: Ditto. * src/dosfs/msdos_conv.c: Ditto.
* 2003-03-25 Thomas Doerfler <Thomas.Doerfler@imd-systems.de>Joel Sherrill2003-03-251-2/+2
| | | | | | | | | | | PR 367/filesystem * src/dosfs/Makefile.am, src/dosfs/fat.c, src/dosfs/fat.h, src/dosfs/fat_fat_operations.c, src/dosfs/fat_file.c, src/dosfs/msdos.h, src/dosfs/msdos_dir.c: Some bugs were still present in the DOSFS implementation: - FAT12 did not work properly on Big-Endian machines - Some synchronization and error handling problems were present - Some legal codings for EOC were not recognized
* 2002-03-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>Joel Sherrill2002-03-281-3/+2
| | | | | | * src/dosfs/fat_file.c: Remove bsp.h. fat_file_write(.. const char*buf ..). * src/dosfs/fat_file.h: fat_file_write(.. const char*buf ..).
* 2002-02-28 Victor V. Vengerov <vvv@oktet.ru>Joel Sherrill2002-02-281-0/+979
* DOS filesystem including FAT12, FAT16, and FAT32 support submitted. * src/dosfs, src/dosfs/Makefile.am, src/dosfs/stamp-h2.in, src/dosfs/config.h.in, src/dosfs/dosfs.h, src/dosfs/fat.c, src/dosfs/fat.h, src/dosfs/fat_fat_operations.c, src/dosfs/fat_fat_operations.h, src/dosfs/fat_file.c, src/dosfs/fat_file.h, src/dosfs/msdos.h, src/dosfs/msdos_create.c, src/dosfs/msdos_dir.c, src/dosfs/msdos_eval.c, src/dosfs/msdos_file.c, src/dosfs/msdos_free.c, src/dosfs/msdos_fsunmount.c, src/dosfs/msdos_handlers_dir.c, src/dosfs/msdos_handlers_file.c, src/dosfs/msdos_init.c, src/dosfs/msdos_initsupp.c, src/dosfs/msdos_misc.c, src/dosfs/msdos_mknod.c, src/dosfs/msdos_node_type.c, src/dosfs/.cvsignore: New files. * configure.ac, src/Makefile.am, wrapup/Makefile.am: Modified to reflect addition.