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

📄 usrlib.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>copy</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>copy</i>(&nbsp;)</strong> - copy <i>in</i> (or stdin) to <i>out</i> (or stdout)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS copy    (    char * in, /* name of file to read (if NULL assume stdin) */    char * out /* name of file to write (if NULL assume stdout) */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command copies from the input file to the output file, until anend-of-file is reached.<p></blockquote><h4>EXAMPLES</h4><blockquote><p><p>The following example displays the file <b>dog</b>, found on the default filedevice:<pre>    -&gt; copy &lt;dog</pre>This example copies from the console to the file <b>dog</b>, on device <b>/ct0/</b>,until an EOF (default CTRL-D) is typed:<pre>    -&gt; copy &gt;/ct0/dog</pre>This example copies the file <b>dog</b>, found on the default file device, todevice <b>/ct0/</b>:<pre>    -&gt; copy &lt;dog &gt;/ct0/dog</pre>This example makes a conventional copy from the file named <b>file1</b> to the filenamed <b>file2</b>:<pre>    -&gt; copy "file1", "file2"</pre>Remember that standard input and output are global; therefore, spawningthe first three constructs will not work as expected.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>OK, orERROR if <i>in</i> or <i>out</i> cannot be opened/created, or if there is anerror copying from <i>in</i> to <i>out</i>.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrLib.html#top">usrLib</a></b>, <b><i><a href="./usrLib.html#copyStreams">copyStreams</a></i>(&nbsp;)</b>, <b><i><a href="./tyLib.html#tyEOFSet">tyEOFSet</a></i>(&nbsp;)</b>,  <i>VxWorks Programmer's Guide: Target Shell</i><hr><a name="copyStreams"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>copyStreams</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>copyStreams</i>(&nbsp;)</strong> - copy from/to specified streams</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS copyStreams    (    int inFd, /* file descriptor of stream to copy from */    int outFd /* file descriptor of stream to copy to */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command copies from the stream identified by <i>inFd</i> to the streamidentified by <i>outFd</i> until an end of file is reached in <i>inFd</i>.This command is used by <b><i><a href="./usrLib.html#copy">copy</a></i>(&nbsp;)</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if there is an error reading from <i>inFd</i> or writingto <i>outFd</i>.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrLib.html#top">usrLib</a></b>, <b><i><a href="./usrLib.html#copy">copy</a></i>(&nbsp;)</b>,  <i>VxWorks Programmer's Guide: Target Shell</i><p><hr><a name="diskFormat"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>diskFormat</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>diskFormat</i>(&nbsp;)</strong> - format a disk</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS diskFormat    (    char * devName /* name of the device to initialize */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command formats a disk and creates a file system on it.  Thedevice must already have been created by the device driver andinitialized for use with a particular file system, via <b><i><a href="./dosFsLib.html#dosFsDevInit">dosFsDevInit</a></i>(&nbsp;)</b>or <b><i><a href="./rt11FsLib.html#rt11FsDevInit">rt11FsDevInit</a></i>(&nbsp;)</b>.<p>This command calls <b><i><a href="./ioLib.html#ioctl">ioctl</a></i>(&nbsp;)</b> to perform the FIODISKFORMAT function.<p></blockquote><h4>EXAMPLE</h4><blockquote><p><pre>    -&gt; diskFormat "/fd0/"</pre></blockquote><h4>RETURNS</h4><blockquote><p><p>OK, or ERROR if the device cannot be opened or formatted.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrLib.html#top">usrLib</a></b>, <b><a href="./dosFsLib.html#top">dosFsLib</a></b>, <b><a href="./rt11FsLib.html#top">rt11FsLib</a></b>,  <i>VxWorks Programmer's Guide: Target Shell</i><hr><a name="diskInit"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>diskInit</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>diskInit</i>(&nbsp;)</strong> - initialize a file system on a block device</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS diskInit    (    char * devName /* name of the device to initialize */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command creates a new, blank file system on a block device.  Thedevice must already have been created by the device driver andinitialized for use with a particular file system, via <b><i><a href="./dosFsLib.html#dosFsDevInit">dosFsDevInit</a></i>(&nbsp;)</b>or <b><i><a href="./rt11FsLib.html#rt11FsDevInit">rt11FsDevInit</a></i>(&nbsp;)</b>.<p>This command calls <b><i><a href="./ioLib.html#ioctl">ioctl</a></i>(&nbsp;)</b> to perform the FIODISKINIT function.<p></blockquote><h4>EXAMPLE</h4><blockquote><p><pre>    -&gt; diskInit "/fd0/"</pre></blockquote><h4>RETURNS</h4><blockquote><p><p>OK, orERROR if the device cannot be opened or initialized.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrLib.html#top">usrLib</a></b>, <b><a href="./dosFsLib.html#top">dosFsLib</a></b>, <b><a href="./rt11FsLib.html#top">rt11FsLib</a></b>,  <i>VxWorks Programmer's Guide: Target Shell</i><hr><a name="squeeze"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>squeeze</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>squeeze</i>(&nbsp;)</strong> - reclaim fragmented free space on an RT-11 volume</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS squeeze    (    char * devName /* RT-11 device to squeeze, e.g., "/fd0/" */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command moves data around on an RT-11 volume so that any areas offree space are merged.<p></blockquote><h4>NOTE</h4><blockquote><p>No device files should be open when this procedure is called.The subsequent condition of such files would be unknown and writing tothem could corrupt the entire disk.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the device cannot be opened or squeezed.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrLib.html#top">usrLib</a></b>, <i>VxWorks Programmer's Guide: Target Shell</i><hr><a name="ld"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>ld</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>ld</i>(&nbsp;)</strong> - load an object module into memory</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>MODULE_ID ld    (    int    syms,    /* -1, 0, or 1 */    BOOL   noAbort, /* TRUE = don't abort script on error */    char * name     /* name of object module, NULL = standard input */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command loads an object module from a file or from standard input.The object module must be in UNIX <b>a.out</b> format.  External references inthe module are resolved during loading.  The <i>syms</i> parameter determines howsymbols are loaded; possible values are:<p>&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;-&nbsp;Add&nbsp;global&nbsp;symbols&nbsp;to&nbsp;the&nbsp;system&nbsp;symbol&nbsp;table.<br>&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;-&nbsp;Add&nbsp;global&nbsp;and&nbsp;local&nbsp;symbols&nbsp;to&nbsp;the&nbsp;system&nbsp;symbol&nbsp;table.<br>&nbsp;&nbsp;&nbsp;-1&nbsp;-&nbsp;Add&nbsp;no&nbsp;symbols&nbsp;to&nbsp;the&nbsp;system&nbsp;symbol&nbsp;table.<p>If there is an error during loading (e.g., externals undefined, too manysymbols, etc.), then <b><i><a href="./shellLib.html#shellScriptAbort">shellScriptAbort</a></i>(&nbsp;)</b> is called to stop any script thatthis routine was called from.  If <i>noAbort</i> is TRUE, errors are noted butignored.<p>The normal way of using <b><i><a href="./usrLib.html#ld">ld</a></i>(&nbsp;)</b> is to load all symbols (<i>syms</i> = 1) duringdebugging and to load only global symbols later.<p></blockquote><h4>EXAMPLE</h4><blockquote><p>The following example loads the <b>a.out</b> file <b>module</b> from the default filedevice into memory, and adds any global symbols to the symbol table:<pre>    -&gt; ld &lt;module</pre>This example loads <b>test.o</b> with all symbols:<pre>    -&gt; ld 1,0,"test.o"</pre></blockquote><h4>RETURNS</h4><blockquote><p><p><b>MODULE_ID</b>, orNULL if there are too many symbols, the object file format is invalid, orthere is an error reading the file.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrLib.html#top">usrLib</a></b>, <b><a href="./loadLib.html#top">loadLib</a></b>,  <i>VxWorks Programmer's Guide: Target Shell, </i>windsh,  <i>Tornado User's Guide: Shell</i><hr><a name="ls"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>ls</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>ls</i>(&nbsp;)</strong> - list the contents of a directory</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ls    (    char * dirName, /* name of dir to list */    BOOL   doLong   /* if TRUE, do long listing */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command is similar to UNIX ls.  It lists the contents of a directoryin one of two formats.  If <i>doLong</i> is FALSE, only the names of the files(or subdirectories) in the specified directory are displayed.  If <i>doLong</i>is TRUE, then the file name, size, date, and time are displayed.  For a long listing, any entries that describe subdirectories are also flaggedwith the label "DIR".<p>The <i>dirName</i> parameter specifies which directory to list.  If<i>dirName</i> is omitted or NULL, the current working directory is listed.<p>Empty directory entries and dosFs volume label entries are not reported.<p></blockquote><h4>NOTE</h4><blockquote><p>When used with <b><a href="./netDrv.html#top">netDrv</a></b> devices (FTP or RSH), <i>doLong</i> has no effect.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>ERRNO</h4><blockquote><p>OK<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrLib.html#top">usrLib</a></b>, <b><i><a href="./usrLib.html#ll">ll</a></i>(&nbsp;)</b>, <b><i><a href="./usrLib.html#lsOld">lsOld</a></i>(&nbsp;)</b>, <b><i><a href="./dirLib.html#stat">stat</a></i>(&nbsp;)</b>,  <i>VxWorks Programmer's Guide: Target Shell</i>windsh,  <i>Tornado User's Guide: Shell</i><hr><a name="ll"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>ll</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>ll</i>(&nbsp;)</strong> - do a long listing of directory contents</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ll    (    char * dirName /* name of directory to list */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command causes a long listing of a directory's contents to bedisplayed.  It is equivalent to:<pre>    -&gt; ls dirName, TRUE</pre></blockquote><h4>NOTE</h4><blockquote><p>When used with <b><a href="./netDrv.html#top">netDrv</a></b> devices (FTP or RSH), <b><i><a href="./usrLib.html#ll">ll</a></i>(&nbsp;)</b> does not givedirectory information.  It is equivalent to an <b><i><a href="./usrLib.html#ls">ls</a></i>(&nbsp;)</b> call with no long-listing option.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrLib.html#top">usrLib</a></b>, <b><i><a href="./usrLib.html#ls">ls</a></i>(&nbsp;)</b>, <b><i><a href="./dirLib.html#stat">stat</a></i>(&nbsp;)</b>,  <i>VxWorks Programmer's Guide: Target Shell</i><hr><a name="lsOld"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>lsOld</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>lsOld</i>(&nbsp;)</strong> - list the contents of an RT-11 directory</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS lsOld    (    char * dirName /* device to list */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command is the old version of <b><i><a href="./usrLib.html#ls">ls</a></i>(&nbsp;)</b>, which used the old-style <b><i><a href="./ioLib.html#ioctl">ioctl</a></i>(&nbsp;)</b>function FIODIRENTRY to get information about entries in a directory.Since VxWorks 5.0, a new version of <b><i><a href="./usrLib.html#ls">ls</a></i>(&nbsp;)</b>, which uses POSIX directory andfile functions, has replaced the older routine.<p>This version remains in the system to support certain drivers that do notcurrently support the POSIX directory and file functions.  This includes<b><a href="./netDrv.html#top">netDrv</a></b>, which provides the Remote Shell (RSH) and File Transfer Protocol (FTP) mode remote file access (although <b><a href="./nfsDrv.html#top">nfsDrv</a></b>, which uses NFS, doessupport the directory calls).  Also, the new <b><i><a href="./usrLib.html#ls">ls</a></i>(&nbsp;)</b> no longer reports empty

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -