📄 tapefslib.html
字号:
<dt>MTFSR<dd>Forward space over a data block and position the tape head in the gap betweenthe block just skipped and the next block.Any buffered data is flushed out to the tape if the tape is in writemode.<p><dt>MTBSR<dd>Backward space over a data block and position the tape head right before theblock just skipped.Any buffered data is flushed out to the tape if the tape is in writemode.<p><dt>MTREW<dd>Rewind the tape to the beginning of the medium.Any buffered data is flushed out to the tape if the tape is in writemode.<p><dt>MTOFFL<dd>Rewind and unload the tape.Any buffered data is flushed out to the tape if the tape is in writemode.<p><dt>MTNOP<dd>No operation, but check the status of the device, thus setting the appropriate<b>SEQ_DEV</b> fields.<p><dt>MTRETEN<dd>Retension the tape. This command usually sets tape tension and can beused in either read or write mode.Any buffered data is flushed out to tape if the tape is in writemode.<p><dt>MTERASE<dd>Erase the entire tape and rewind it.<p><dt>MTEOM<dd>Position the tape at the end of the medium and unload the tape.Any buffered data is flushed out to the tape if the tape is in writemode.<p> </dl></blockquote><h4>INCLUDE FILES</h4><blockquote><p><p> <b>tapeFsLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tapeFsLib.html#top">tapeFsLib</a></b>, <b><a href="./ioLib.html#top">ioLib</a></b>, <b><a href="./iosLib.html#top">iosLib</a></b>, <i>VxWorks Programmer's Guide: I/O System, Local File Systems</i><hr><a name="tapeFsDevInit"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>tapeFsDevInit</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>tapeFsDevInit</i>( )</strong> - associate a sequential device with tape volume functions</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>TAPE_VOL_DESC *tapeFsDevInit ( char * volName, /* volume name */ SEQ_DEV * pSeqDev, /* pointer to sequential device info */ TAPE_CONFIG * pTapeConfig /* pointer to tape config info */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine takes a sequential device created by a device driver anddefines it as a tape file system volume. As a result, when high-level I/O operations, such as <b><i><a href="./ioLib.html#open">open</a></i>( )</b> and <b><i><a href="./ioLib.html#write">write</a></i>( )</b>, are performed on thedevice, the calls will be routed through tapeFsLib.<p>This routine associates <b>volName</b> with a device and installs it inthe VxWorks I/O system-device table. The driver number used whenthe device is added to the table is that which was assigned to thetape library during <b><i><a href="./tapeFsLib.html#tapeFsInit">tapeFsInit</a></i>( )</b>. (The driver number is kept inthe global variable <b>tapeFsDrvNum</b>.)<p>The <b>SEQ_DEV</b> structure specified by <b>pSeqDev</b> contains configurationdata describing the device and the addresses of the routines whichare called to read blocks, write blocks, write file marks, reset the device, check device status, perform other I/O control functions (<b><i><a href="./ioLib.html#ioctl">ioctl</a></i>( )</b>),reserve and release devices, load and unload devices, and rewind devices.These routines are not called until they are required by subsequent I/Ooperations. The <b>TAPE_CONFIG</b> structure is used to define configurationparameters for the <b>TAPE_VOL_DESC</b>. The configuration parameters are definedand described in <b>tapeFsLib.h</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>A pointer to the volume descriptor (<b>TAPE_VOL_DESC</b>),or NULL if there is an error.<p></blockquote><h4>ERRNO</h4><blockquote><p>S_tapeFsLib_NO_SEQ_DEV, S_tapeFsLib_ILLEGAL_TAPE_CONFIG_PARM</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tapeFsLib.html#top">tapeFsLib</a></b><hr><a name="tapeFsInit"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>tapeFsInit</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>tapeFsInit</i>( )</strong> - initialize the tape volume library</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS tapeFsInit ()</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes the tape volume library. It must be called exactlyonce, before any other routine in the library. Only one file descriptorper volume is assumed. <p>This routine also installs tape volume library routines in the VxWorks I/Osystem driver table. The driver number assigned to <b><a href="./tapeFsLib.html#top">tapeFsLib</a></b> is placed inthe global variable <b>tapeFsDrvNum</b>. This number is later associatedwith system file descriptors opened to tapeFs devices.<p>To enable this initialization, simply call the routine <b><i><a href="./tapeFsLib.html#tapeFsDevInit">tapeFsDevInit</a></i>( )</b>, whichautomatically calls <b><i><a href="./tapeFsLib.html#tapeFsInit">tapeFsInit</a></i>( )</b> in order to initialize the tape file system.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tapeFsLib.html#top">tapeFsLib</a></b><hr><a name="tapeFsReadyChange"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>tapeFsReadyChange</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>tapeFsReadyChange</i>( )</strong> - notify <b><a href="./tapeFsLib.html#top">tapeFsLib</a></b> of a change in ready status</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS tapeFsReadyChange ( TAPE_VOL_DESC * pTapeVol /* pointer to volume descriptor */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets the volume descriptor state to <b>TAPE_VD_READY_CHANGED</b>.It should be called whenever a driver senses that a device has come on-lineor gone off-line (for example, that a tape has been inserted or removed).<p>After this routine has been called, the next attempt to use the volumeresults in an attempted remount.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK if the read change status is set, or ERROR if the file descriptoris in use.<p></blockquote><h4>ERRNO</h4><blockquote><p>S_tapeFsLib_FILE_DESCRIPTOR_BUSY</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tapeFsLib.html#top">tapeFsLib</a></b><hr><a name="tapeFsVolUnmount"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>tapeFsVolUnmount</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>tapeFsVolUnmount</i>( )</strong> - disable a tape device volume</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS tapeFsVolUnmount ( TAPE_VOL_DESC * pTapeVol /* pointer to volume descriptor */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine is called when I/O operations on a volume are to bediscontinued. This is commonly done before changing removable tape.All buffered data for the volume is written to the device (if possible),any open file descriptors are marked obsolete, and the volume ismarked not mounted.<p>Because this routine flushes data from memory to the physicaldevice, it should not be used in situations where the tape-change isnot recognized until after a new tape has been inserted. In thesecircumstances, use the ready-change mechanism. (See the manual entry for <b><i><a href="./tapeFsLib.html#tapeFsReadyChange">tapeFsReadyChange</a></i>( )</b>.)<p>This routine may also be called by issuing an <b><i><a href="./ioLib.html#ioctl">ioctl</a></i>( )</b> call using theFIOUNMOUNT function code.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the routine cannot access the volume.<p></blockquote><h4>ERRNO</h4><blockquote><p><p>S_tapeFsLib_VOLUME_NOT_AVAILABLE,S_tapeFsLib_FILE_DESCRIPTOR_BUSY,S_tapeFsLib_SERVICE_NOT_AVAILABLE<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tapeFsLib.html#top">tapeFsLib</a></b>, <b><i><a href="./tapeFsLib.html#tapeFsReadyChange">tapeFsReadyChange</a></i>( )</b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -