dosfslib.html
来自「vxworks相关论文」· HTML 代码 · 共 1,270 行 · 第 1/5 页
HTML
1,270 行
<dt><b>FIOLABELSET</b><dd>Sets the volume label to the string specified as <i>newLabel</i>. The string mayconsist of up to eleven ASCII characters:<pre> status = ioctl (fd, FIOLABELSET, "newLabel");</pre><dt><b>FIOATTRIBSET</b><dd>Sets the file attribute byte in the DOS directory entry to the new value<i>newAttrib</i>. The file descriptor refers to the file whose entry is to be modified:<pre> status = ioctl (fd, FIOATTRIBSET, newAttrib);</pre><dt><b>FIOCONTIG</b><dd>Allocates contiguous disk space for a file or directory. The number ofbytes of requested space is specified in <i>bytesRequested</i>. In general,contiguous space should be allocated immediately after the file iscreated:<pre> status = ioctl (fd, FIOCONTIG, bytesRequested);</pre><dt><b>FIONCONTIG</b><dd>Copies to <i>maxContigBytes</i> the size of the largest contiguous free space, in bytes, on the volume:<pre> status = ioctl (fd, FIONCONTIG, &maxContigBytes);</pre><dt><b>FIOREADDIR</b><dd>Reads the next directory entry. The argument <i>dirStruct</i> is a DIRdirectory descriptor. Normally, the <b><i><a href="./dirLib.html#readdir">readdir</a></i>( )</b> routine is used to read adirectory, rather than using the FIOREADDIR function directly. See dirLib.<pre> DIR dirStruct; fd = open ("directory", O_RDONLY); status = ioctl (fd, FIOREADDIR, &dirStruct);</pre><dt><b>FIOFSTATGET</b><dd>Gets file status information (directory entry data). The argument<i>statStruct</i> is a pointer to a stat structure that is filled with datadescribing the specified file. Normally, the <b><i><a href="./dirLib.html#stat">stat</a></i>( )</b> or <b><i><a href="./dirLib.html#fstat">fstat</a></i>( )</b> routine isused to obtain file information, rather than using the FIOFSTATGETfunction directly. See dirLib.<pre> struct stat statStruct; fd = open ("file", O_RDONLY); status = ioctl (fd, FIOFSTATGET, &statStruct);</pre></dl><p>Any other <b><i><a href="./ioLib.html#ioctl">ioctl</a></i>( )</b> function codes are passed to the block device driver forhandling.<p></blockquote><h4>MEMORY CONSUMPTION</h4><blockquote><p><p>In order to minimize memory fragmentation in the system memory pool, allmemory consumed by <b><a href="./dosFsLib.html#top">dosFsLib</a></b> will be contained within a dedicated memorypartition. This partition is accessible via the <i>dosFsMemPartId</i> globalvariable.<p>To display the current amount of memory used by <b><a href="./dosFsLib.html#top">dosFsLib</a></b>, callshow(dosFsMemPartId). Please see the manual page for <b><i><a href="./memShow.html#memPartShow">memPartShow</a></i>( )</b> formore details.<p>The following varibles may be set <i>before <b><a href="./dosFsLib.html#top">dosFsLib</a></b> </i>is initialized to change the behavior of the memory management.<p>If the <b><a href="./dosFsLib.html#top">dosFsLib</a></b> memory partition is not provided, one will be allocated fromthe system memory pool. It's size defaults to 8 K, which may be changedvia the <i>dosFsMemPartInitSize</i> global. To provide a memory pool, set <i>dosFsMemPartId</i> to a valid <b>PART_ID</b> returned from <b><i><a href="./memPartLib.html#memPartCreate">memPartCreate</a></i>( )</b>.<p>The global variable <i>dosFsMemPartIdOptions</i> may be modified to change thebehavior of error handling for errors in <b><i><a href="./memPartLib.html#malloc">malloc</a></i>( )</b> and <b><i><a href="./memPartLib.html#free">free</a></i>( )</b>. Theoptions default to <b>MEM_BLOCK_ERROR_LOG_FLAG</b>, which will log informationabout errors detected by <b><i><a href="./memPartLib.html#free">free</a></i>( )</b>. These options only affect operations onthe dosFs memory partition.<p>The private partition will dynamically grow as much as needed, allocatingadditional memory from the system memory pool, in units no smaller than 1 Kilobyte. This minumum unit size may be adjusted via the <i>dosFsMemPartGrowSize</i> global variable.<p>The maximum size for the dosFs memory partition may be limited via the global variable <i>dosFsMemPartCap</i>. Once the cap limit has been reached or surpassed, dosFs will not attempt to allocate more memory from the system memory partition. The default value is -1, which allows uninterupted use of the system memory partition.<p>Additional debugging may be enabled via the global boolean <i>dosFsDebug</i>.Setting this to 1 will enable verbose debug messages from the dosFs memory manager.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>dosFsLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./dosFsLib.html#top">dosFsLib</a></b>, <b><a href="./ioLib.html#top">ioLib</a></b>, <b><a href="./iosLib.html#top">iosLib</a></b>, <b><a href="./dirLib.html#top">dirLib</a></b>, <b><a href="./ramDrv.html#top">ramDrv</a></b>, <i>Microsoft MS-DOS Programmer's Reference </i>(Microsoft Press), <i>Advanced MS-DOS Programming </i>(Ray Duncan, Microsoft Press), <i>VxWorks Programmer's Guide: I/O System, Local File Systems </i><p><hr><a name="dosFsConfigGet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>dosFsConfigGet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>dosFsConfigGet</i>( )</strong> - obtain dosFs volume configuration values</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS dosFsConfigGet ( DOS_VOL_DESC * vdptr, /* ptr to volume descriptor */ DOS_VOL_CONFIG * pConfig /* ptr to config structure to fill */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine obtains the current configuration values for a dosFsdisk volume. The data is obtained from the dosFs volume descriptorspecified by <i>vdptr</i>. No physical I/O to the device takes place.<p>The configuration data is placed into a <b>DOS_VOL_CONFIG</b> structure,whose address is <i>pConfig</i>. This structure must be allocated beforecalling <b><i><a href="./dosFsLib.html#dosFsConfigGet">dosFsConfigGet</a></i>( )</b>.<p>One use for this routine is to obtain the configuration data from aknown good disk, to be used to initialize a new disk (using <b><i><a href="./dosFsLib.html#dosFsDevInit">dosFsDevInit</a></i>( )</b>).<p>The volume is not locked while the data is being read from the volumedescriptor, so it is conceivable that another task may modify theconfiguration information while this routine is executing.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./dosFsLib.html#top">dosFsLib</a></b><hr><a name="dosFsConfigInit"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>dosFsConfigInit</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>dosFsConfigInit</i>( )</strong> - initialize dosFs volume configuration structure</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS dosFsConfigInit ( DOS_VOL_CONFIG * pConfig, /* pointer to volume config structure */ char mediaByte, /* media descriptor byte */ UINT8 secPerClust, /* sectors per cluster */ short nResrvd, /* number of reserved sectors */ char nFats, /* number of FAT copies */ UINT16 secPerFat, /* number of sectors per FAT copy */ short maxRootEnts, /* max number of entries in root dir */ UINT nHidden, /* number of hidden sectors */ UINT options /* volume options */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes a dosFs volume configuration structure(<b>DOS_VOL_CONFIG</b>). This structure is used by the <b><i><a href="./dosFsLib.html#dosFsDevInit">dosFsDevInit</a></i>( )</b> routineto specify the file system configuration for the disk.<p>The <b>DOS_VOL_CONFIG</b> structure must have been allocated prior to callingthis routine. Its address is specified by <i>pConfig</i>. The specifiedconfiguration variables are placed into their respective fields in thestructure.<p>This routine is provided only to allow convenient initialization of the<b>DOS_VOL_CONFIG</b> structure (particularly from the VxWorks shell). Astructure which is properly initialized by other means may be usedequally well by <b><i><a href="./dosFsLib.html#dosFsDevInit">dosFsDevInit</a></i>( )</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if there is an invalid parameter or <i>pConfig</i> is NULL.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./dosFsLib.html#top">dosFsLib</a></b>, <b><i><a href="./dosFsLib.html#dosFsDevInit">dosFsDevInit</a></i>( )</b><hr><a name="dosFsConfigShow"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>dosFsConfigShow</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>dosFsConfigShow</i>( )</strong> - display dosFs volume configuration data</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS dosFsConfigShow ( char * devName /* name of device */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine obtains the dosFs volume configuration for the nameddevice, formats the data, and displays it on the standard output.The information which is displayed is that which is contained ina <b>DOS_VOL_CONFIG</b> structure, along with other configuration values(for example, from the <b>BLK_DEV</b> structure which describes the device).<p>If no device name is specified, the current default device is described.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./dosFsLib.html#top">dosFsLib</a></b><hr><a name="dosFsDateSet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>dosFsDateSet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>dosFsDateSet</i>( )</strong> - set the dosFs file system date</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS dosFsDateSet ( int year, /* year (1980...2099) */ int month, /* month (1...12) */ int day /* day (1...31) */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets the date for the dosFs file system, which remains ineffect until changed. All files created or modified are assignedthis date in their directory entries.<p></blockquote><h4>NOTE</h4><blockquote><p>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?