📄 c-filesys3.html
字号:
</p></dl><dl class="margin"><dd><p class="Body"><a name="85723"> </a>The ready-change announcement does not cause buffered data to be flushed to the disk; it merely marks the volume as needing remounting. As a result, data written to files or directory entry changes can be lost. To avoid this loss of data, close all files on the volume before changing the disk.</p><dd><p class="Body"><a name="85725"> </a>Ready-change can be used in ISRs, because it does not attempt to flush data or perform other operations that could cause delay.</p><dd><p class="Body"><a name="85726"> </a>The block device driver status-check routine (identified by the <b class="symbol_lc">bd_statusChk</b> field in the <b class="symbol_UC">BLK_DEV</b> structure) can be useful for asserting ready-change for devices that only detect a disk change after the new disk is inserted. This routine is called at the start of each <b class="routine"><i class="routine">open</i></b><b>( )</b> or <b class="routine"><i class="routine">creat</i></b><b>( )</b>, before the file system checks for ready-change.</p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="85728">Disks with No Change Notification</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="85730"> </a>If it is not possible for a ready-change to be announced each time the disk is changed, the device must be specially identified when it is initialized for use with the file system. This is done by setting the <b class="symbol_lc">changeNoWarn</b> parameter to TRUE when calling <b class="routine"><i class="routine">rt11FsDevInit</i></b><b>( )</b>.</p><dd><p class="Body"><a name="85731"> </a>When this parameter is defined as TRUE, the disk is checked regularly to obtain the current directory information (in case the disk is removed and a new one inserted). As a result, this option causes a significant loss in performance. <p class="table"><h4 class="EntityTitle"><a name="85736"><font face="Helvetica, sans-serif" size="-1" class="sans">Table 4-6: I/O Control Functions Supported by <b class="library">rt11FsLib</b></font></a></h4><table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="85742"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Function</font></b></div></th><th rowspan="1" colspan="1"><div class="CellHeadingC" align="center"><a name="85744"> </a><b><font face="Helvetica, sans-serif" size="-1" class="sans">Decimal Value</font></b></div></th><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="85746"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Description</font></b></div></th></tr><tr><td colspan="20"><hr class="tablerule2"></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85748"> </a><b class="symbol_UC">FIODIRENTRY</b> </div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85750"> </a>9</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85752"> </a>Get information about specified device directory entries. </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85754"> </a><b class="symbol_UC">FIODISKCHANGE</b> </div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85756"> </a>13</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85758"> </a>Announce a media change. </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85760"> </a><b class="symbol_UC">FIODISKFORMAT</b> </div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85762"> </a>5</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85764"> </a>Format the disk. </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85766"> </a><b class="symbol_UC">FIODISKINIT</b> </div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85768"> </a>6</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85770"> </a>Initialize an rt11Fs file system on a disk volume. </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85772"> </a><b class="symbol_UC">FIOFLUSH</b> </div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85774"> </a>2</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85776"> </a>Flush the file output buffer. </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85778"> </a><b class="symbol_UC">FIOFSTATGET</b> </div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85780"> </a>38</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85782"> </a>Get file status information (directory entry data). </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85784"> </a><b class="symbol_UC">FIOGETNAME</b> </div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85786"> </a>18</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85788"> </a>Get the file name of the <i class="acronym_lc">fd</i>. </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85790"> </a><b class="symbol_UC">FIONREAD</b> </div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85792"> </a>1</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85794"> </a>Get the number of unread bytes in a file. </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85796"> </a><b class="symbol_UC">FIOREADDIR</b> </div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85798"> </a>37</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85800"> </a>Read the next directory entry. </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85802"> </a><b class="symbol_UC">FIORENAME</b> </div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85804"> </a>10</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85806"> </a>Rename a file. </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85808"> </a><b class="symbol_UC">FIOSEEK</b> </div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85810"> </a>7</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85812"> </a>Reset the current byte offset in a file. </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85814"> </a><b class="symbol_UC">FIOSQUEEZE</b> </div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85816"> </a>15</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85818"> </a>Coalesce fragmented free space on an rt11Fs volume. </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85820"> </a><b class="symbol_UC">FIOWHERE</b> </div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85822"> </a>8</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85825"> </a>Return the current byte position in a file. </div></td></tr><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p></p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="85826">4.3.9 I/O Control Functions Supported by <b class="library">rt11FsLib</b></a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="85831"> </a>The rt11Fs file system supports the <b class="routine"><i class="routine">ioctl</i></b><b>( )</b> functions shown in <a href="c-filesys3.html#85736">Table 4-6</a>. The functions listed are defined in the header file <b class="file">ioLib.h.</b> For more information, see the manual entries for <b class="library">rt11FsLib</b> and for <b class="routine"><i class="routine">ioctl</i></b><b>( )</b> in <b class="library">ioLib</b>.</p></dl></dl><a name="foot"><hr></a><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a><a href="GuideIX.html"><img border="0" alt="[Index]" src="icons/index.gif"></a><a href="c-filesys.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="c-filesys2.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="c-filesys4.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p></body></html><!---by WRS Documentation (), Wind River Systems, Inc. conversion tool: Quadralay WebWorks Publisher 4.0.11 template: CSS Template, Jan 1998 - Jefro --->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -