summaryrefslogtreecommitdiffstats
path: root/cpukit/libblock/src/blkdev.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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
* libblock: Add RTEMS_DEPRECATEDSebastian Huber2018-08-071-0/+2
| | | | Close #3358.
* basdefs.h: Add and use RTEMS_UNUSEDSebastian Huber2015-10-261-8/+8
|
* libblock: Doxygen Enhancement Task #1Mathew Kallada2012-12-211-2/+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.
* Filesystem: Change type of ioctl_returnSebastian Huber2012-04-031-2/+2
| | | | | Change the ioctl_return type of rtems_libio_ioctl_args_t to match the ioctl() return value type.
* libblock: Split file and simplifySebastian Huber2012-03-131-77/+11
|
* libblock: Change bdbuf APISebastian Huber2012-03-131-6/+4
| | | | | | | | | | | | | | | | | | | | 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.
* libblock: New IO control RTEMS_BLKIO_GETDISKDEVSebastian Huber2012-03-131-0/+5
|
* fixed disk deleteThomas Doerfler2010-04-091-85/+44
| | | | Obtain/release disk during open/close
* Update for block device API changeThomas Doerfler2009-12-181-6/+9
|
* Whitespace removal.Ralf Corsepius2009-11-291-2/+2
|
* Changed set and get IO controls to use the buffer argument for data exchange.Thomas Doerfler2009-11-121-4/+8
|
* - - Reorderd AVL node fields to save spaceThomas Doerfler2009-10-291-22/+28
| | | | | - Fixed printf() formats. New structure for waiters synchronization. Added BDBUF_INVALID_DEV define. New error handling in rtems_bdbuf_init(). - Release disk in case of an error.
* * libblock/include/rtems/diskdevs.h: Added driver data pointer to IOThomas Doerfler2009-10-131-16/+5
| | | | | | | | | control function. The IO control handler takes now the disk device as first parameter instead of the physical device number. * cpukit/libblock/include/rtems/blkdev.h, libblock/src/bdbuf.c, libblock/src/blkdev.c, libblock/src/diskdevs.c, libblock/src/nvdisk.c, libblock/src/flashdisk.c, libblock/src/ramdisk.c: Update for block device API change.
* 2009-10-08 Chris Johns <chrisj@rtems.org>Chris Johns2009-10-081-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.am, preinstall.am: Added statvfs.h. * libcsupport/Makefile.am: Add statvfs.c. * libcsupport/include/sys/statvfs.h, libcsupport/src/statvfs.c: New. * libcsupport/include/rtems/libio.h: Add a file system handler for the statvfs call. * libfs/src/devfs/devfs_init.c, libfs/src/dosfs/msdos_init.c, libfs/src/imfs/imfs_init.c, libfs/src/nfsclient/src/nfs.c: Set the statvfs handler to NULL. * include/rtems/fs.h: Add a second node access field for the RFS file system to hold a directory offset while the existing field holds the inode number. This save a rescan of the directory when working with directories. * libblock/include/rtems/bdbuf.h: Added references and user fields to the buffer descriptor. * libblock/src/bdbuf.c: Added dynamic buffer support for different block sizes. Fixed a number of bugs. * libblock/src/blkdev.c: Release the disk device on an error. * libblock/src/diskdevs.c: Set the block size to the media block size during initialisation of the disk device. * libblock/src/flashdisk.c, libblock/src/nvdisk.c, libblock/src/ramdisk.c: Updated the drivers to handle variable block sizes. * libfs/src/dosfs/fat.c, libfs/src/dosfs/fat.h: Release any buffers when an error occurs. The FAT buffer layer hangs onto a single buffer while mounted. This should be fixed. * sapi/inline/rtems/chain.inl: Added rtems_chain_set_off_chain, rtems_chain_is_node_off_chain, and rtems_chain_previous. * score/inline/rtems/score/chain.inl: Added _Chain_Set_off_chain, and _Chain_Is_node_off_chain. * libmisc/shell/main_ln.c, libmisc/shell/main_mknod.c, libmisc/shell/mknod-pack_dev.c, libmisc/shell/mknod-pack_dev.h: New shell commands. * libmisc/Makefile.am, libmisc/shell/shellconfig.h: Added ln and mknod commands. * libmisc/shell/hexdump-display.c: Fixed the reopen bug which showed up as a free with a bad pointer. * libmisc/shell/main_mount.c: List the user adding file system when listing the available file systems to mount. * libmisc/shell/utils-cp.c: Remove the fixed static copy buffer and use a large dynamic buffer. * score/inline/rtems/score/address.inl, score/src/coremsgsubmit.c, score/src/objectallocate.c, score/src/objectfree.c: Remove warnings.
* 2009-08-06 Chris Johns <chrisj@rtems.org>Chris Johns2009-08-061-0/+51
| | | | | | | * libblock/src/bdbuf.c: Fix group user logic. * libblock/include/rtems/blkdev.h, libblock/src/blkdev.c, libblock/src/nvdisk.c, libblock/src/flashdisk.c: Add set block size, and get media block size support.
* 009-08-05 Chris Johns <chrisj@rtems.org>Chris Johns2009-08-051-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | * libmisc/dummy/dummy-networking.c: New. * libmisc/dummy/dummy.c, libmisc/Makefile.am: Move trhe networking configuration into a separate file so configuration varations do not cause conflicts. * score/inline/rtems/score/object.inl, score/include/rtems/score/object.h: Remove warnings. * score/inline/rtems/score/object.inl: Add _Chain_First, _Chain_Last, _Chain_Mext, and _Chain_Previous. * sapi/inline/rtems/chain.inl: Add rtems_chain_first, rtems_chain_last, rtems_chain_mext, and rtems_chain_previous. * libblock/include/rtems/diskdevs.h: Remove the bdbuf pool id and block_size_log2. Add media_block_size. * libblock/src/diskdevs.c: Remove size restrictions on block size. Add media block size initialisation. Remove comment to clean up the bdbuf cache. * libblock/src/blkdev.c: Remove references to block_size_log2. Allow any block size. * libblock/include/rtems/bdbuf.h, libblock/src/bdbuf.c: Remove all references to pools and make the cache handle demand driver variable buffer size allocation. Added worker threads support the swapout task. * sapi/include/confdefs.h: Updated the bdbuf configutation.
* 2009-05-15 Sebastian Huber <sebastian.huber@embedded-brains.de>Joel Sherrill2009-05-151-2/+2
| | | | | | | | | | | | * Doxygen.in: Fixed project name. Added project number. Enabled auto brief. Disabled include graphs. * include/rtems/irq-extension.h, libblock/include/rtems/bdpart.h, libblock/include/rtems/bdbuf.h, libblock/include/rtems/bdpart.h, libblock/include/rtems/blkdev.h, libblock/include/rtems/diskdevs.h, libblock/include/rtems/ramdisk.h, libblock/src/bdbuf.c, libblock/src/blkdev.c, libblock/src/diskdevs.c, libblock/src/ramdisk.c: Documentation. * libblock/src/bdpart.c: Documentation. Fixed NULL pointer access.
* 2009-04-29 Sebastian Huber <sebastian.huber@embedded-brains.de>Chris Johns2009-04-291-0/+6
| | | | | | | | | | | | | | | * sapi/include/confdefs.h, libblock/include/rtems/bdbuf.h: Changed type of rtems_bdbuf_pool_configuration_size to size_t. * libblock/include/rtems/bdbuf.h, libblock/include/rtems/blkdev.h, libblock/include/rtems/diskdevs.h, libblock/src/bdbuf.c, libblock/src/blkdev.c, libblock/src/diskdevs.c: Buffer pool allocation is now cache aligned. The cache functions are currently not available on all platforms so the cache line size is fixed to 32 bytes for now. Changed various integer types which refer to block sizes, numbers and indexes. Fixed logical block indexes in buffer get and read function. It is now possible to delete logical disks. Modified documentation
* Add __attribute__((unused)) to unused function args.Ralf Corsepius2009-01-021-2/+2
|
* 2008-08-21 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill2008-08-211-8/+8
| | | | | | * libblock/include/rtems/bdbuf.h, libblock/include/rtems/diskdevs.h, libblock/src/bdbuf.c, libblock/src/blkdev.c, libblock/src/diskdevs.c, libblock/src/ramdisk.c: Eliminate sign mismatch warnings.
* 2008-08-02 Chris Johns (chrisj@rtems.org>Chris Johns2008-08-021-1/+0
| | | | | | | | | | | | | * libblock/include/rtems/blkdev.h: Remove count and start from rtems_blkdev_request. Add RTEMS_BLKDEV_START_BLOCK macro. * libblock/src/bdbuf.c: Add read ahead blocks always consecutive comment. Change count to bufnum and remove start references. Sort the transfer list so blocks are consecutive where possible. * libblock/src/blkdev.c, libblock/src/nvdisk.c, libblock/src/ramdisk.c: Change count to bufnum and remove start references.
* 2008-07-29 Chris Johns <chrisj@rtems.org>Chris Johns2008-07-291-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-2/+2
| | | | | | | | * 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.
* 2005-02-01 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2005-02-021-2/+2
| | | | | | | | * libblock/include/rtems/bdbuf.h, libblock/include/rtems/ide_part_table.h, libblock/src/blkdev.c, libcsupport/include/rtems/termiostypes.h, libcsupport/src/termios.c, posix/macros/rtems/posix/cond.inl, posix/macros/rtems/posix/mutex.inl : Remove warnings.
* Remove stray white spaces.Ralf Corsepius2004-04-171-5/+5
|
* Remove stray white spaces.Ralf Corsepius2004-04-151-29/+29
|
* 2003-11-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>Ralf Corsepius2003-11-201-0/+4
| | | | | | | | | | | * Makefile.am: AM_CPPFLAGS += -I$(top_builddir). Use AM_CPPFLAGS instead of AM_CFLAGS. * src/ata.c: Include config.h. * src/bdbuf.c: Ditto. * src/blkdev.c: Ditto. * src/diskdevs.c: Ditto. * src/ide_part_table.c: Ditto. * src/ramdisk.c: Ditto.
* 2003-01-27 Eugeny S. Mints <Eugeny.Mints@oktet.ru>Joel Sherrill2003-01-271-1/+1
| | | | | * src/blkdev.c: Per PR331 fix bug which is tripped by writing 512 byte blocks to 512 byte aligned positions.
* 2002-04-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>Joel Sherrill2002-04-081-0/+2
| | | | | * src/ramdisk.c: include <string.h>. * src/blkdev.c: include <string.h>.
* 2002-02-28 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2002-02-281-0/+243
* Submitted by Victor V. Vengerov <vvv@oktet.ru> and merged into the RTEMS source. * ChangeLog, Makefile.am, README, configure.ac, include/Makefile.am, include/rtems/bdbuf.h, include/rtems/blkdev.h, include/rtems/diskdevs.h, include/rtems/ramdisk.h, include/rtems/.cvsignore, include/.cvsignore, src/Makefile.am, src/bdbuf.c, src/blkdev.c, src/diskdevs.c, src/ramdisk.c, src/.cvsignore, .cvsignore: New files.