⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c-filesys4.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 2 页
字号:
</dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="85933">Synchronizing Volumes</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="85934"> </a>When a disk is <i class="term">synchronized</i>, all buffered data that is modified is written to the physical device so that the disk is up to date. For the rawFs file system, the only such data is that contained in open file descriptor buffers.</p><dd><p class="Body"><a name="85935"> </a>To avoid loss of data, synchronize a disk before removing it. You may need to explicitly synchronize a disk, depending on when (or if) the <b class="routine"><i class="routine">rawFsVolUnmount</i></b><b>(&nbsp;)</b> call is issued.</p><dd><p class="Body"><a name="85936"> </a>When <b class="routine"><i class="routine">rawFsVolUnmount</i></b><b>(&nbsp;)</b> is called, an attempt is made to synchronize the device before unmounting. If this disk is still present and writable at the time of the call, synchronization takes place automatically; there is no need to synchronize the disk explicitly.</p><dd><p class="Body"><a name="85937"> </a>However, if the <b class="routine"><i class="routine">rawFsVolUnmount</i></b><b>(&nbsp;)</b> call is made after a disk is removed, it is obviously too late to synchronize, and <b class="routine"><i class="routine">rawFsVolUnmount</i></b><b>(&nbsp;)</b> discards the buffered data. Therefore, make a separate <b class="routine"><i class="routine">ioctl</i></b><b>(&nbsp;)</b> call with the <b class="symbol_UC">FIOSYNC</b> function before removing the disk. (For example, this could be done in response to an operator command.) Any open file descriptor to the device can be used during the <b class="routine"><i class="routine">ioctl</i></b><b>(&nbsp;)</b> call. This call writes all modified file descriptor buffers for the device out to the <b></b>disk.</p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="85941">4.4.7  &nbsp;&nbsp;I/O Control Functions Supported by <b class="library">rawFsLib</b></a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="85947"> </a>The rawFs file system supports the <b class="routine"><i class="routine">ioctl</i></b><b>(&nbsp;)</b> functions shown in <a href="c-filesys4.html#85951">Table&nbsp;4-7</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">rawFsLib</b> and for <b class="routine"><i class="routine">ioctl</i></b><b>(&nbsp;)</b> in <b class="library">ioLib</b>.<p class="table"><h4 class="EntityTitle"><a name="85951"><font face="Helvetica, sans-serif" size="-1" class="sans">Table 4-7:&nbsp;&nbsp;I/O Control Functions Supported by <b class="library">rawFsLib&nbsp;</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="85957"> </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="85959"> </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="85961"> </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="85963"> </a><b class="symbol_UC">FIODISKCHANGE</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85965"> </a>13</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85967"> </a>Announce a media change.&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85969"> </a><b class="symbol_UC">FIODISKFORMAT</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85971"> </a>5</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85973"> </a>Format the disk (device driver function).&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85975"> </a><b class="symbol_UC">FIODISKINIT</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85977"> </a>6</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85979"> </a>Initialize a rawFs file system on a disk volume (not required).&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85981"> </a><b class="symbol_UC">FIOFLUSH</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85983"> </a>2</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85985"> </a>Same as <b class="symbol_UC">FIOSYNC</b>.&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85987"> </a><b class="symbol_UC">FIOGETNAME</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85989"> </a>18</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85991"> </a>Get the file name of the <i class="acronym_lc">fd</i>.&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85993"> </a><b class="symbol_UC">FIONREAD</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85995"> </a>1</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85997"> </a>Get the number of unread bytes on the device.&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85999"> </a><b class="symbol_UC">FIOSEEK</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="86001"> </a>7</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86003"> </a>Set the current byte offset on the device.&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="86005"> </a><b class="symbol_UC">FIOSYNC</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="86007"> </a>21</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86009"> </a>Write out all modified file descriptor buffers.&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="86011"> </a><b class="symbol_UC">FIOUNMOUNT</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="86013"> </a>39</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86015"> </a>Unmount a disk volume.&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="86017"> </a><b class="symbol_UC">FIOWHERE</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="86019"> </a>8</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86022"> </a>Return the current byte position on the device.&nbsp;</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><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-filesys3.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="c-filesys5.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 + -