📄 rt11fslib.html
字号:
<b>FIODIRENTRY</b><dd>Copies information about the specified directory entries to a<b>REQ_DIR_ENTRY</b> structure that is defined in <b>ioLib.h</b>. The argument <i>req</i>is a pointer to a <b>REQ_DIR_ENTRY</b> structure. On entry, the structurecontains the number of the directory entry for which information isrequested. On return, the structure contains the information on therequested entry. For example, after the following:<pre> REQ_DIR_ENTRY req; req.entryNum = 0; status = ioctl (fd, FIODIRENTRY, &req);</pre>the request structure contains the name, size, and creation date of thefile in the first entry (0) of the directory.<dt><b>FIOREADDIR</b><dd>Reads the next directory entry. The argument <i>dirStruct</i> is a DIRdirectory descriptor. Normally, <b><a href="./dirLib.html#readdir">readdir</a>( )</b> is used to read adirectory, rather than using the FIOREADDIR function directly. See <b><a href="./dirLib.html#top">dirLib</a></b>.<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><a href="./dirLib.html#stat">stat</a>( )</b> or <b><a href="./dirLib.html#fstat">fstat</a>( )</b> routineis used to obtain file information, rather than using the FIOFSTATGETfunction directly. See <b><a href="./dirLib.html#top">dirLib</a></b>.<pre> struct stat statStruct; fd = open ("file", O_RDONLY); status = ioctl (fd, FIOFSTATGET, &statStruct);</pre></dl>Any other <b><a href="./ioLib.html#ioctl">ioctl</a>( )</b> function codes are passed to the block device driverfor handling.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>rt11FsLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ioLib.html#top">ioLib</a></b>, <b><a href="./iosLib.html#top">iosLib</a></b>, <b><a href="./ramDrv.html#top">ramDrv</a></b>,<i>VxWorks Programmer's Guide: I/O System, Local File Systems </i><hr><a name="rt11FsDevInit"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>rt11FsDevInit( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>rt11FsDevInit( )</strong> - initialize the rt11Fs device descriptor</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>RT_VOL_DESC *rt11FsDevInit ( char * devName, /* device name */ BLK_DEV * pBlkDev, /* pointer to block device info */ BOOL rt11Fmt, /* TRUE if RT-11 skew & interleave */ int nEntries, /* no. of dir entries incl term entry */ BOOL changeNoWarn /* TRUE if no disk change warning */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes the device descriptor. The <i>pBlkDev</i> parameter isa pointer to an already-created <b>BLK_DEV</b> device structure. This structurecontains definitions for various aspects of the physical device format,as well as pointers to the sector read, sector write, <b><a href="./ioLib.html#ioctl">ioctl</a>( )</b>, status check,and reset functions for the device.<p>The <i>rt11Fmt</i> parameter is TRUE if the device is to be accessed usingstandard RT-11 skew and interleave.<p>The device directory will consist of one segment able to contain atleast as many files as specified by <i>nEntries</i>.If <i>nEntries</i> is equal to <b>RT_FILES_FOR_2_BLOCK_SEG</b>, strict RT-11compatibility is maintained.<p>The <i>changeNoWarn</i> parameter is TRUE if the disk may be changed withoutannouncing the change via <b><a href="./rt11FsLib.html#rt11FsReadyChange">rt11FsReadyChange</a>( )</b>. Setting <i>changeNoWarn</i> toTRUE causes the disk to be regularly remounted, in case it has beenchanged. This results in a significant performance penalty.<p></blockquote><h4>NOTE</h4><blockquote><p>An ERROR is returned if <i>rt11Fmt</i> is TRUE and the <b>bd_blksPerTrack</b>(sectors per track) field in the <b>BLK_DEV</b> structure is odd.This is because an odd number of sectors per track is incompatible with theRT-11 interleaving algorithm.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>A pointer to the volume descriptor (<b>RT_VOL_DESC</b>), orNULL if invalid device parameters were specified,or the routine runs out of memory.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./rt11FsLib.html#top">rt11FsLib</a></b><hr><a name="rt11FsInit"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>rt11FsInit( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>rt11FsInit( )</strong> - prepare to use the rt11Fs library</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS rt11FsInit ( int maxFiles /* max no. of simultaneously open rt11Fs files */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes the rt11Fs library. It must be called exactlyonce, before any other routine in the library. The <i>maxFiles</i> parameterspecifies the number of rt11Fs files that may be open at once. Thisroutine initializes the necessary memory structures and semaphores.<p>This routine is called automatically from the root task, <b><a href="./usrConfig.html#usrRoot">usrRoot</a>( )</b>,in <b>usrConfig.c</b> when the configuration macro <b>INCLUDE_RT11FS</b> is defined.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>OK, or ERROR if memory is insufficient.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./rt11FsLib.html#top">rt11FsLib</a></b><hr><a name="rt11FsMkfs"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>rt11FsMkfs( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>rt11FsMkfs( )</strong> - initialize a device and create an rt11Fs file system</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>RT_VOL_DESC *rt11FsMkfs ( char * volName, /* volume name to use */ BLK_DEV * pBlkDev /* pointer to block device struct */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine provides a quick method of creating an rt11Fs file system ona device. It is used instead of the two-step procedure of calling<b><a href="./rt11FsLib.html#rt11FsDevInit">rt11FsDevInit</a>( )</b> followed by an <b><a href="./ioLib.html#ioctl">ioctl</a>( )</b> call with an FIODISKINIT functioncode.<p>This routine provides defaults for the rt11Fs parameters expected by<b><a href="./rt11FsLib.html#rt11FsDevInit">rt11FsDevInit</a>( )</b>. The directory size is set to <b>RT_FILES_FOR_2_BLOCK_SEG</b>(defined in <b>rt11FsLib.h</b>). No standard disk format is assumed; thisallows the use of rt11Fs on block devices with an odd number of sectors pertrack. The <i>changeNoWarn</i> parameter is defined as FALSE, indicating that the disk will not be replaced without <b><a href="./rt11FsLib.html#rt11FsReadyChange">rt11FsReadyChange</a>( )</b> being called first.<p>If different values are needed for any of these parameters, the routine<b><a href="./rt11FsLib.html#rt11FsDevInit">rt11FsDevInit</a>( )</b> must be used instead of this routine, followed by arequest for disk initialization using the <b><a href="./ioLib.html#ioctl">ioctl</a>( )</b> function FIODISKINIT.<p></blockquote><h4>RETURNS</h4><blockquote><p>A pointer to an rt11Fs volume descriptor (<b>RT_VOL_DESC</b>),or NULL if there is an error.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./rt11FsLib.html#top">rt11FsLib</a></b>, <b><a href="./rt11FsLib.html#rt11FsDevInit">rt11FsDevInit</a>( )</b><hr><a name="rt11FsDateSet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>rt11FsDateSet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>rt11FsDateSet( )</strong> - set the rt11Fs file system date</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void rt11FsDateSet ( int year, /* year (72...03 (RT-11's days are numbered)) */ int month, /* month (0, or 1...12) */ int day /* day (0, or 1...31) */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets the date for the rt11Fs file system, which remains ineffect until changed. All files created are assigned this creation date.<p>To set a blank date, invoke the command:<pre> rt11FsDateSet (72, 0, 0); /* a date outside RT-11's epoch */</pre></blockquote><h4>NOTE</h4><blockquote><p>No automatic incrementing of the date is performed; each new date mustbe set with a call to this routine.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./rt11FsLib.html#top">rt11FsLib</a></b><hr><a name="rt11FsReadyChange"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>rt11FsReadyChange( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>rt11FsReadyChange( )</strong> - notify rt11Fs of a change in ready status</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void rt11FsReadyChange ( RT_VOL_DESC * vdptr /* pointer to device descriptor */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets the volume descriptor state to <b>RT_VD_READY_CHANGED</b>.It should be called whenever a driver senses that a device has come on-lineor gone off-line (e.g., a disk has been inserted or removed).<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./rt11FsLib.html#top">rt11FsLib</a></b><hr><a name="rt11FsModeChange"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>rt11FsModeChange( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>rt11FsModeChange( )</strong> - modify the mode of an rt11Fs volume</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void rt11FsModeChange ( RT_VOL_DESC * vdptr, /* pointer to volume descriptor */ int newMode /* O_RDONLY, O_WRONLY, or O_RDWR (both) */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets the volume descriptor mode to <i>newMode</i>.It should be called whenever the read and write capabilities are determined,usually after a ready change. See the manual entry for <b><a href="./rt11FsLib.html#rt11FsReadyChange">rt11FsReadyChange</a>( )</b>.<p>The <b><a href="./rt11FsLib.html#rt11FsDevInit">rt11FsDevInit</a>( )</b> routine initially sets the mode to <b>O_RDWR</b>,(e.g., both <b>O_RDONLY</b> and <b>O_WRONLY</b>).<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./rt11FsLib.html#top">rt11FsLib</a></b>, <b><a href="./rt11FsLib.html#rt11FsDevInit">rt11FsDevInit</a>( )</b>, <b><a href="./rt11FsLib.html#rt11FsReadyChange">rt11FsReadyChange</a>( )</b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -