summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/dosfs/msdos_format.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* dosfs/msdos_format.c: Dead code removal (Coverity ID 1255325)Joel Sherrill2014-11-211-75/+61
| | | | | Coverity identified that ret_val was never set except to be initialized to 0. Thus the code could not be executed.
* Change all references of rtems.com to rtems.org.Chris Johns2014-03-211-1/+1
|
* dosfs: Unintentional integer overflowGedare Bloom2013-09-051-1/+1
| | | | Explicitly promote 32-bit integer to 64-bits for multiplication.
* dosfs: PR2091: Fix warningAndreas Heinig2013-02-271-2/+2
|
* libfs: Doxygen Enhancement Task #6"Mathew Kallada2012-12-201-22/+20
|
* dosfs: Add sync_device option for msdos_format()Sebastian Huber2012-12-131-0/+5
|
* dosfs: Fix error status handlingSebastian Huber2012-12-131-16/+18
|
* dosfs: Bugfix for disks of for example 100MB sizeRalf Kirchner2012-12-131-49/+101
|
* dosfs: Whitespace changeRalf Kirchner2012-12-131-1/+0
|
* dosfs: Fix request evaluationRalf Kirchner2012-12-131-4/+0
| | | | | Return the ability to set a cluster size other than one sector for unaligned volumes.
* dosfs: Delete fattype parameter for msdos_format()Ralf Kirchner2012-12-051-137/+161
| | | | | | | | Delete fattype parameter of msdos_format_request_param_t because the FAT type is determined by cluster and disk size. Estimate FAT type and re-evaluate FAT type after exact parameter determination.
* dosfs: Add skip_alignment for msdos_format()Ralf Kirchner2012-12-051-25/+86
| | | | | | | | | | Add skip_alignment parameter of msdos_format_request_param_t. Delete cluster_align parameter of msdos_format_request_param_t. By default the FAT, data cluster, and root directory for FAT12 and FAT16 is aligned on a cluster boundary to optimize performance. Format changes throughout.
* dosfs: Fix msdos_format()Ralf Kirchner2012-12-031-1/+1
| | | | | | For FAT32 msdos_format() used to initialize first FAT entries to non-zero values only if a volume label was given. Absence of these entries made mounting such a FAT32 volume fail.
* dosfs: Fix format request with sectors per clusterSebastian Huber2012-05-311-2/+10
|
* dosfs: Fix print format stringSebastian Huber2012-05-291-1/+2
|
* libblock: Change bdbuf APISebastian Huber2012-03-131-19/+13
| | | | | | | | | | | | | | | | | | | | 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-03-15 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2011-03-151-19/+16
| | | | | | | * libfs/src/dosfs/msdos_format.c: Address Coverity issue 183 which was where an expression evaluated to a constant and issue 185 which was a potential (although unlikely in expected usage) time-of-check, time-of-use race condition.
* 2010-07-04 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-07-041-1/+0
| | | | | | | | | | | | | | | | * libblock/include/rtems/ide_part_table.h, libblock/src/bdbuf.c, libcsupport/src/__times.c, libcsupport/src/libio_init.c, libcsupport/src/mallocfreespace.c, libcsupport/src/mount-mgr.c, libcsupport/src/mount.c, libcsupport/src/rewinddir.c, libcsupport/src/seekdir.c, libcsupport/src/telldir.c, libcsupport/src/unmount.c, libfs/src/dosfs/fat.c, libfs/src/dosfs/fat_fat_operations.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_fsunmount.c, libfs/src/dosfs/msdos_initsupp.c, libfs/src/dosfs/msdos_rename.c, libmisc/cpuuse/cpuusagereport.c, libmisc/shell/vis.c, libmisc/stackchk/check.c, sapi/src/posixapi.c, telnetd/telnetd.c: Remove include of assert.h when it is not needed.
* 2010-04-30 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2010-04-301-0/+1
| | | | * libfs/src/dosfs/msdos_format.c: Added missing va_end().
* 2010-03-12 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-03-121-2/+2
| | | | | | | | | | | | | | | | | | | * 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.
* 010-03-04 Chris Johns <chrisj@rtems.org>Chris Johns2010-03-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* 2010-02-24 Chris Johns <chrisj@rtems.org>Chris Johns2010-02-241-1/+1
| | | | | | | * libmisc/shell/main_msdosfmt.c, libmisc/shell/shellconfig.h: Fix the alias as I did understand how it worked. * libfs/src/dosfs/msdos_format.c: Test for a block device.
* 2009-12-17 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2009-12-171-3/+3
| | | | | | | | | * libcsupport/src/termios.c, libfs/src/dosfs/msdos_format.c, libfs/src/nfsclient/src/nfs.c, libfs/src/pipe/fifo.c, libnetworking/lib/rtems_bsdnet_ntp.c, libnetworking/lib/tftpDriver.c, libnetworking/rtems/rtems_glue.c, libnetworking/rtems/rtems_select.c: Eliminate uses of deprecated rtems_clock_get() and replace with properly typed routine.
* Whitespace removal.Ralf Corsepius2009-11-291-77/+77
|
* 2009-11-09 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2009-11-091-1/+2
| | | | | * libfs/src/dosfs/msdos_format.c: Rework to avoid overflow on 16-bit targets.
* 2009-06-12 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2009-06-121-2/+2
| | | | | | | | * libblock/src/flashdisk.c, libblock/src/nvdisk.c, libblock/src/ramdisk.c, libfs/src/dosfs/fat.c, libfs/src/dosfs/msdos_format.c: Eliminate using the GNU/Linux specific error numbers EBADRQC and ENOTBLK. Switch to EINVAL and ENOTTY as appropriate.
* 2009-06-12 Chris Johns <chrisj@rtems.org>Chris Johns2009-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libblock/src/bdbuf.c: Update comments. * libblock/src/bdpart.c, libblock/src/ide_part_table.c: Get the device from the rdev field of the stat buf. * libcsupport/include/rtems/libio.h: Add a path length to evalpath handler. Add parent locations to rmmod and unlink handlers. * libcsupport/include/rtems/libio_.h: Add a path length to rtems_filesystem_evaluate_path. Add rtems_filesystem_evaluate_relative_path, rtems_filesystem_dirname, and rtems_filesystem_prefix_separators. Remove rtems_filesystem_evaluate_parent. * libcsupport/src/base_fs.c, libcsupport/src/chdir.c, libcsupport/src/chmod.c, libcsupport/src/chown.c, libcsupport/src/chroot.c, libcsupport/src/fchdir.c, libcsupport/src/link.c, libcsupport/src/mount.c, libcsupport/src/open.c, libcsupport/src/privateenv.c, libcsupport/src/readlink.c, libcsupport/src/unmount.c, libcsupport/src/utime.c, libcsupport/src/unmount.c, libcsupport/src/utime.c, libfs/src/devfs/devfs.h, libfs/src/devfs/devfs_eval.c, libfs/src/devfs/devstat.c, libfs/src/dosfs/msdos_create.c, libfs/src/dosfs/msdos_misc.c, libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_eval.c, libfs/src/imfs/imfs_load_tar.c, libfs/src/imfs/ioman.c, libfs/src/pipe/pipe.c, libmisc/fsmount/fsmount.c, libnetworking/lib/ftpfs.c: Add the length parameter to the eval call. * libcsupport/src/eval.c: Add rtems_filesystem_prefix_separators, rtems_filesystem_dirname, rtems_filesystem_evaluate_relative_path. Add the length parameter to the eval call. * libcsupport/src/rmdir.c: Find the parent pathloc then the node pathloc from that node. Remove the call to find the parent given the node pathloc. * libcsupport/src/stat.c: Add the length parameter to the eval call. Set the device into the rdev field. * libcsupport/src/unlink.c: Find the parent pathloc then the node pathloc from that node. Remove the call to find the parent given the node pathloc. * libfs/src/dosfs/fat.c, libfs/src/dosfs/msdos_format.c: Get the disk device number from the stat rdev field. * libfs/src/dosfs/msdos.h: Add the length parameter to the eval call. Add the parent pathloc to the rmnod handler. * libfs/src/dosfs/msdos_dir.c: Add the parent pathloc to the rmnod handler. * libfs/src/dosfs/msdos_eval.c: Add the length parameter to the eval and token call. * libfs/src/imfs/imfs_directory.c: Add the parent pathloc to the rmnod handler. * libfs/src/imfs/imfs_fchmod.c: Do not test the mode flags for only the allowed flags. Add the missing flags spec'ed in the POSIX standard. * libfs/src/imfs/imfs_fsunmount.c, libfs/src/imfs/imfs_rmnod.c, libfs/src/imfs/imfs_unlink.c, libfs/src/imfs/memfile.c: Add the parent node. Currently ignored in the IMFS. * libfs/src/imfs/imfs_stat.c: Return the device number in the rdev field. * libfs/src/imfs/imfs_mknod.c, libfs/src/imfs/imfs_symlink.c : Add the length parameter to the token call. * libfs/src/nfsclient/src/nfs.c: Add the length parameter to the eval call and parent node to the rmnod and unlink command. * libmisc/shell/internal.h: Remove the libc mounter decl to make public. * libmisc/shell/main_mount.c: Add support for hooking external mount support for new file systems. * libmisc/shell/shell.h: Add helper functions for the mount command.
* Added check for NULL.Thomas Doerfler2009-05-051-1/+1
|
* 2009-04-29 Chris Johns <chrisj@rtems.org>Chris Johns2009-04-291-47/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Use "bool" instead of "rtems_boolean|boolean".Ralf Corsepius2008-09-041-6/+6
|
* 2008-07-29 Chris Johns <chrisj@rtems.org>Chris Johns2008-07-291-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-02 Jennifer Averett <jennifer.averett@oarcorp.com>Jennifer Averett2005-05-021-1/+1
| | | | | * libfs/src/dosfs/msdos_format.c, librpc/src/xdr/xdr.c: Added initialization to remove warnings.
* 2004-11-20 Ralf Corsepius <ralf.corsepius@rtems.org>Ralf Corsepius2004-11-201-3/+3
| | | | | | * libfs/src/dosfs/dosfs.h: Add doxygen preamble. * libfs/src/dosfs/msdos.h: Remove RC_OK. * libfs/src/dosfs/msdos_format.c: Remove unnecessary casts.
* 2004-11-20 Ralf Corsepius <ralf.corsepiu@rtems.org>Ralf Corsepius2004-11-201-45/+45
| | | | | | | | | | | | PR 720/filesystem: * libfs/src/dosfs/dosfs.h, libfs/src/dosfs/fat.c, libfs/src/dosfs/fat.h, libfs/src/dosfs/msdos_format.c: Adaptations to msdos_format. (From Thomas Doerfler <Thomas.Doerfler@imd-systems.de>). * libfs/src/dosfs/dosfs.h, libfs/src/dosfs/fat.c, libfs/src/dosfs/fat.h, libfs/src/dosfs/msdos_format.c: Adaptations to RTEMS-4.7.
* 2004-11-20 Ralf Corsepius <ralf.corsepiu@rtems.org>Ralf Corsepius2004-11-201-0/+1007
PR 720/filesystem: * libfs/src/dosfs/msdos_format.c: New (From Thomas Doerfler <Thomas.Doerfler@imd-systems.de>). * libfs/Makefile.am: Reflect changes above: