📄 dosfslib.html
字号:
status = ioctl (fd, FIOREADDIR, &dirStruct);</pre><dt>FIOFSTATGET<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> routine isused 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, (int)&statStruct);</pre><dt>FIOTIMESET<dd>Update time on a file. <i>arg</i> shall be a pointer to a utimbuf structure, see <b>utime.h</b>. If <i>arg</i> is value NULL, the current system time is used forboth actime and modtime members. If <i>arg</i> is not NULL then the utimbuf structure members actime and modtime are used as passed. If actime is zero value, the file access time is not updated (the operation is ignored). If modtime is zero, the file modification time is not updated (the operation is ignored). See also <b><a href="./dirLib.html#utime">utime</a>( )</b>..CS<br> struct utimbuf newTimeBuf;;<br> newTimeBuf.modtime = newTimeBuf.actime = fileNewTime;<br> fd = open ("file", <b>O_RDONLY</b>);<br> status = ioctl (fd, FIOTIMESET, (int)&newTimeBuf);\ce<dt>FIOCHKDSK<dd>This function invokes the integral consistency checking.During the test, the file system will be blocked from application codeaccess, and will emit messages describing any inconsistencies found onthe disk, as well as some statistics, depending on the verbositylevel in the <i>flags</i> argument.Depending on the repair permission value in <i>flags</i> argument,the inconsistencies will be repaired, and changes written to diskor only reported.Argument <i>flags</i> should be composed of bitwise or-edverbosity level value and repair permission value.Possible repair levels are:<p><dt><b>DOS_CHK_ONLY</b> (1)<dd>Only report errors, do not modify disk.<dt><b>DOS_CHK_REPAIR</b> (2)<dd>Repair any errors found.</dl>Possible verbosity levels are:<dl><dt><b>DOS_CHK_VERB_SILENT</b> (0xff00)<dd>Do not emit any messages, except errors encountered.<dt><b>DOS_CHK_VERB_1</b> (0x0100)<dd>Display some volume statistics when done testing, as well<dt><b>DOS_CHK_VERB_2</b> (0x0200)<dd>In addition to the above option, display path of every file, while itis being checked. This option may significantly slow down the testprocess.<dt>NOTE<dd>In environments with reduced RAM size check disk uses reservedFAT copy as temporary buffer, it can cause respectively longtime of execution on a slow CPU architectures..</dl><p>See also the reference manual <b><a href="./usrFsLib.html#top">usrFsLib</a></b> for the <b><a href="./usrFsLib.html#chkdsk">chkdsk</a>( )</b> user levelutility which may be used to invoke the FIOCHKDSK <b><a href="./ioLib.html#ioctl">ioctl</a>( )</b>.The volume root directory should be opened, and the resulting filedescriptor should be used:<pre> int fd = open (device_name, O_RDONLY, 0); status = ioctl (fd, FIOCHKDSK, DOS_CHK_REPAIR | DOS_CHK_VERB_1); close (fd);</pre><p>Any other <b><a href="./ioLib.html#ioctl">ioctl</a>( )</b> function codes are passed to the underlying<i>CBIO </i>modules for handling.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>dosFsLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><p><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="./usrFsLib.html#top">usrFsLib</a></b>, dcacheCbio, dpartCbio, <b><a href="./dosFsFmtLib.html#top">dosFsFmtLib</a></b>,<b>dosChkLib</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="dosSetVolCaseSens"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>dosSetVolCaseSens( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>dosSetVolCaseSens( )</strong> - set case sensitivity of volume</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS dosSetVolCaseSens ( DOS_VOLUME_DESC_ID pVolDesc, BOOL sensitivity )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>Pass TRUE to setup a case sensitive volume. Pass FALSE to setup a case insensitive volume. Note this affects rename lookups only.<p></blockquote><h4>RETURNS</h4><blockquote><p>TRUE if pVolDesc pointed to a DOS volume.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./dosFsLib.html#top">dosFsLib</a></b><hr><a name="dosFsVolDescGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>dosFsVolDescGet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>dosFsVolDescGet( )</strong> - convert a device name into a DOS volume descriptor pointer.</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>DOS_VOLUME_DESC_ID dosFsVolDescGet ( void * pDevNameOrPVolDesc, /* device name or pointer to dos vol desc */ u_char * * ppTail /* return ptr for name, used in iosDevFind */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine validates <i>pDevNameOrPVolDesc</i> to be a DOS volumedescriptor pointer else a path to a DOS device. This routine uses the standard <b><a href="./iosLib.html#top">iosLib</a></b> function <b><a href="./iosLib.html#iosDevFind">iosDevFind</a>( )</b> to obtain a pointer to the device descriptor. If device is eligible, <i>ppTail</i> is filled with the pointer to the first character followingthe device name. Note that ppTail is passed to <b><a href="./iosLib.html#iosDevFind">iosDevFind</a>( )</b>.<i>ppTail</i> may be passed as NULL, in which case it is ignored.<p></blockquote><h4>RETURNS</h4><blockquote><p>A <b>DOS_VOLUME_DESC_ID</b> or NULL if not a DOSFS device.<p></blockquote><h4>ERRNO</h4><blockquote><p><p><b>S_dosFsLib_INVALID_PARAMETER</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./dosFsLib.html#top">dosFsLib</a></b><hr><a name="dosFsChkDsk"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>dosFsChkDsk( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>dosFsChkDsk( )</strong> - make volume integrity checking.</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS dosFsChkDsk ( DOS_FILE_DESC_ID pFd, /* file descriptor of root dir */ u_int params /* check level and verbosity */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library does not makes integrity check process itself, butinstead uses routine provided by <b>dosChkLib</b>. This routine prepares parameters and invokes checking routinevia preinitialized function pointer. If <b>dosChkLib</b> does not configuredinto vxWorks, this routine returns ERROR.<p>Ownership on device should be taken by an upper level routine.<p></blockquote><h4>RETURNS</h4><blockquote><p>STATUS as returned by volume checking routine or<br> ERROR, if such routine does not installed.<p></blockquote><h4>ERRNO</h4><blockquote><p><p><b>S_dosFsLib_UNSUPPORTED</b>.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./dosFsLib.html#top">dosFsLib</a></b><hr><a name="dosFsLastAccessDateEnable"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>dosFsLastAccessDateEnable( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>dosFsLastAccessDateEnable( )</strong> - enable last access date updating for this volume</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS dosFsLastAccessDateEnable ( DOS_VOLUME_DESC_ID dosVolDescId, /* dosfs volume ID to alter */ BOOL enable /* TRUE = enable update, FALSE = */ /* disable update */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function enables or disables updating of the last access date directoryentry field on open-read-close operations for the given dosFs volume. The last access date file indicates the last date that a file has been read or written. When the optional last access date field update is enabled, read operations on a file will cause a write to the media. <p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR if the volume is invalid or enable is not TRUE or FALSE.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./dosFsLib.html#top">dosFsLib</a></b><hr><a name="dosFsLibInit"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>dosFsLibInit( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>dosFsLibInit( )</strong> - prepare to use the dosFs library</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS dosFsLibInit ( int ignored )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes the dosFs library.This routine installs <b><a href="./dosFsLib.html#top">dosFsLib</a></b> as a driver in the I/O system driver table, and allocates and sets upthe necessary structures.The driver number assigned to <b><a href="./dosFsLib.html#top">dosFsLib</a></b> is placedin the global variable <i>dosFsDrvNum</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR, if driver can not be installed.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./dosFsLib.html#top">dosFsLib</a></b><hr><a name="dosFsDevCreate"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>dosFsDevCreate( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>dosFsDevCreate( )</strong> - create file system device.</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS dosFsDevCreate ( char * pDevName, /* device name */ CBIO_DEV_ID cbio, /* CBIO or cast blkIo device */ u_int maxFiles, /* max no. of simultaneously open files */ u_int autoChkLevel /* automate volume integrity check level */ /* via mounting 0 - default: DOS_CHK_REPAIR DOS_CHK_VERB_1 */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine associates a CBIO device with a logical I/O device nameand prepare it to perform file system functions.It takes a <b>CBIO_DEV_ID</b> device handle, typically created by<b><a href="./dcacheCbio.html#dcacheDevCreate">dcacheDevCreate</a>( )</b>, and defines it as a dosFs volume. As a result, whenhigh-level I/O operations (e.g., <b><a href="./ioLib.html#open">open</a>( )</b>, <b><a href="./ioLib.html#write">write</a>( )</b>) are performed onthe device, the calls will be routed through <b><a href="./dosFsLib.html#top">dosFsLib</a></b>. The <i>pCbio</i>parameter is the handle of the underlying cache or blockdevice.<p>The argument <i>maxFiles</i> specifies the number of filesthat can be opened at once on the device.<p>The volume structure integrity can be automatically checkedduring volume mounting. Parameter <i>autoChkLevel</i>defines checking level (<b>DOS_CHK_ONLY</b> or <b>DOS_CHK_REPAIR</b>),that can be bitwise or-ed with check verbosity level value(<b>DOS_CHK_VERB_SILENT</b>, <b>DOS_CHK_VERB_1</b> or <b>DOS_CHK_VERB_2</b>).If value of <i>autoChkLevel</i> is 0, this means default level, that is<b>DOS_CHK_REPAIR</b> | <b>DOS_CHK_VERB_1</b>. To prevent check diskautocall set <i>autoChkLevel</i> to NONE.<p>Note that actual disk accesses are deferred to the timewhen <b><a href="./ioLib.html#open">open</a>( )</b> or <b><a href="./ioLib.html#creat">creat</a>( )</b> are first called. That is also whenthe automatic disk checking will take place.Therefore this function will succeed in cases where a removabledisk is not present in the drive.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the device name is already in use or insufficient memory.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./dosFsLib.html#top">dosFsLib</a></b><hr><a name="dosFsShow"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>dosFsShow( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>dosFsShow( )</strong> - display dosFs volume configuration data.</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS dosFsShow ( void * pDevName, /* name of device */ u_int level /* detail level */ )</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.<p>If no device name is specified, the current default deviceis described.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR, if no valid device specified.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./dosFsLib.html#top">dosFsLib</a></b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -