Warning, /testsuites/samples/fileio/fileio.doc is written in an unsupported language. File is not indexed.
0001 # SPDX-License-Identifier: BSD-2-Clause
0002
0003 #
0004 # fileio.doc,v
0005 #
0006 # COPYRIGHT (c) 1989-1999.
0007 # On-Line Applications Research Corporation (OAR).
0008 #
0009 # Redistribution and use in source and binary forms, with or without
0010 # modification, are permitted provided that the following conditions
0011 # are met:
0012 # 1. Redistributions of source code must retain the above copyright
0013 # notice, this list of conditions and the following disclaimer.
0014 # 2. Redistributions in binary form must reproduce the above copyright
0015 # notice, this list of conditions and the following disclaimer in the
0016 # documentation and/or other materials provided with the distribution.
0017 #
0018 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
0019 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
0020 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
0021 # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
0022 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
0023 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
0024 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
0025 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
0026 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
0027 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
0028 # POSSIBILITY OF SUCH DAMAGE.
0029 #
0030
0031 This sample implements some basic tests for the file systems
0032 available. It provides the following functionality:
0033
0034 - perform basic file read/write tests on arbitrary file paths with
0035 selectable I/O buffer size
0036 - perform functions to evaluate FAT disk partition tables
0037 - perform functions to mount FAT disks to the file system tree
0038
0039 A sample session might look like this:
0040
0041 - start this system
0042
0043 - select "p" (part_table_initialize) to read in the partition table of
0044 first harddisk, enter the device name "/dev/hda", when prompted
0045
0046 - select "f" (fsmount) to try to mount the partitions
0047 /dev/hda1../dev/hdc4 to corresponding mount points. Non-existant
0048 partitions will report an error, but will not abort the tests
0049
0050 - select "w" (write file) to create a new file on the mounted disk (or
0051 in the IMFS). Enter the file name (e.g. "/mnt/hda1/test_1M.txt"),
0052 the file size (e.g. 64K or 2M) and the buffer size to use for the
0053 write calls (e.g. 32 or 4K). Then the sample will try to write the
0054 corresponding file and print the time consumed and data rate achived.
0055
0056 - select "r" (read file) to read a file (without displaying the
0057 contents). It has similar parameters as "write file", but does not
0058 query the file size.
0059
0060 - select "s" to call the rtems shell with its various capabilities.
0061
0062
0063
0064