亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? usrfslib.c

?? vxwork源代碼
?? C
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
/* usrFsLib.c - file system user interface subroutine library *//* Copyright 1984-2002 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01r,16jan02,chn  SPR#24332, add check to avoid copy() to a directory name dest01q,12dec01,jkf  SPR#72133, add FIOMOVE to dosFsLib, use it in mv()01p,17oct01,jkf  SPR#74904, function cleanup.01o,20sep01,jkf  SPR#69031, common code for both AE & 5.x.01n,15mar01,jkf  SPR#33973, copy not preserving time/date.01m,15mar01,jkf  SPR#33557, ls returning error on first invocation01l,29aug00,jgn  add const to function signatures (SPR #30492) +		 clean up coding standard violations01k,17mar00,dgp  modify attrib and xattrib synopsis comments for syngen                 processing01j,16mar00,jkf  removed reference to dosFsVolFormat() from diskInit().01i,26dec99,jkf  T3 KHEAP_ALLOC01h,31jul99,jkf  T2 merge, tidiness & spelling.01g,07dec98,lrn  fixed netDrv spurious error message (SPR#22554)01f,23nov98,vld  print '/' after directory name in long output01e,13jul98,lrn  fixed diskInit() to call dosFsVolFormat() if open() fails01d,02jul98,lrn  corrected parameters for chkdsk()01c,28jun98,lrn  added recursive xcopy, xdelete, added wildcards to                 cp(), mv(), added attrib and xattrib(), added help01b,23jun98,lrn  rewrite ls, add more utils01a,19feb98,vld	 initial version, derived from usrLib.c*//*DESCRIPTIONThis library provides user-level utilities for managing file systems.These utilities may be used from Tornado Shell, the Target Shell or froman application.USAGE FROM TORNADOSome of the functions in this library have counterparts of the samenames built into the Tornado Shell (aka Windsh). The built-in functionsperform similar functions on the Tornado host computer's I/O systems.Hence if one of such functions needs to be executed in order to performany operation on the Target's I/O system, it must be preceded with an'@' sign, e.g.:.CE-> @ls "/sd0".CEwill list the directory of a disk named "/sd0" on the target, wile.CS-> ls "/tmp".CEwill list the contents of the "/tmp" directory on the host.The target I/O system and the Tornado Shell running on the host, eachhave their own notion of current directory, which are not related,hence.CS-> pwd.CEwill display the Tornado Shell current directory on the host filesystem, while.CS-> @pwd.CEwill display the target's current directory on the target's console.WILDCARDSSome of the functions herein support wildcard characters in argumentstrings where file or directory names are expected. The wildcards arelimited to "*" which matches zero or more characters and "?" whichmatches any single characters. Files or directories with names beginningwith a "." are not normally matched with the "*" wildcard.DIRECTORY LISTINGDirectory listing is implemented in one function dirList(), which can beaccessed using one of these four front-end functions:.iP ls()produces a short list of files.iP lsr()is like ls() but ascends into subdirectories.iP ll()produces a detailed list of files, with file size, modification dateattributes etc..iP llr()is like ll() but also ascends into subdirectoriesAll of the directory listing functions accept a name of a directory or asingle file to list, or a name which contain wildcards, which willresult in listing of all objects that match the wildcard stringprovided.SEE ALSOioLib, dosFsLib, netDrv, nfsLib,.pG "Target Shell".pG "Tornado Users's Guide"*//* includes */#include <vxWorks.h>#include <fioLib.h>#include "ctype.h"#include "stdio.h"#include "ioLib.h"#include "memLib.h"#include "string.h"#include "ftpLib.h"#include "usrLib.h"#include "dirent.h"#include "sys/stat.h"#include "errnoLib.h"#include "iosLib.h"#include "taskLib.h"#include "logLib.h"#include "netDrv.h"#include "time.h"#include "nfsLib.h"#include "pathLib.h"#include "private/dosFsVerP.h"#include "dosFsLib.h"#include "stat.h"#include "utime.h"/* types */LOCAL int mvFile (const char *oldname, const char *newname);/* defines *//******************************************************************************** usrPathCat - concatenate directory path to filename.** This routine constructs a valid filename from a directory path* and a filename.* The resultant path name is put into <result>.* No arcane rules are used to derive the concatenated result.** RETURNS: N/A.*/LOCAL void usrPathCat    (    const char *	dirName,    const char *	fileName,    char *		result    )    {    *result = EOS ;    if(dirName[0] != EOS && dirName != NULL && strcmp(dirName,".") != 0)	{	strcpy( result, dirName );	strcat( result,  "/" );	}    strcat( result, fileName );    } /* usrPathCat() *//********************************************************************************* cd - change the default directory** .iP NOTE* This is a target resident function, which manipulates the target I/O* system. It must be preceded with the* '@' letter if executed from the Tornado Shell (windsh), which has a* built-in command of the same name that operates on the Host's I/O* system.** This command sets the default directory to <name>.  The default directory* is a device name, optionally followed by a directory local to that* device.** To change to a different directory, specify one of the following:* .iP "" 4* an entire path name with a device name, possibly followed by a directory* name.  The entire path name will be changed.* .iP* a directory name starting with a `~' or `/' or `$'.  The directory part* of the path, immediately after the device name, will be replaced with the new* directory name.* .iP* a directory name to be appended to the current default directory.* The directory name will be appended to the current default directory.* .LP** An instance of ".." indicates one level up in the directory tree.** Note that when accessing a remote file system via RSH or FTP, the* VxWorks network device must already have been created using* netDevCreate().** WARNING* The cd() command does very little checking that <name> represents a valid* path.  If the path is invalid, cd() may return OK, but subsequent* calls that depend on the default path will fail.** EXAMPLES* The following example changes the directory to device `/fd0/':* .CS*     -> cd "/fd0/"* .CE* This example changes the directory to device `wrs:' with the local* directory `~leslie/target':* .CS*     -> cd "wrs:~leslie/target"* .CE* After the previous command, the following changes the directory to* `wrs:~leslie/target/config':* .CS*     -> cd "config"* .CE* After the previous command, the following changes the directory to* `wrs:~leslie/target/demo':* .CS*     -> cd "../demo"* .CE* After the previous command, the following changes the directory to* `wrs:/etc'.* .CS*     -> cd "/etc"* .CE* Note that `~' can be used only on network devices (RSH or FTP).** RETURNS: OK or ERROR.** SEE ALSO: pwd(),* .pG "Target Shell"*/STATUS cd    (    const char *	name		/* new directory name */    )    {    if (ioDefPathCat ((char *)name) != OK)	{	printf ("cd: error = %#x.\n", errno);	return (ERROR);	}    return (OK);    }/******************************************************************************** dirNameWildcard - check if file or dir name contains wildcards** RETURNS: TRUE if "*" or "?" are contained in the <name> string*/LOCAL BOOL dirNameWildcard    (    const char *	name    )    {    if (index(name, '*') != NULL ||	index(name, '?') != NULL)	return TRUE ;    else	return FALSE ;    }/******************************************************************************** nameIsDir - check if name is a directory** RETURNS: TRUE if the name is an existing directory*/LOCAL BOOL nameIsDir    (    const char *	name    )    {    struct stat fStat ;    if ((name == NULL) || (*name == EOS))	return FALSE ;    /* if it does not exist, it ain't a directory */    if (stat ((char *) name, &fStat) == ERROR)        {	errno = OK ;    	return FALSE;        }    if (S_ISDIR (fStat.st_mode))        {        return TRUE;        }    return FALSE ;    }/********************************************************************************* pwd - print the current default directory** This command displays the current working device/directory.** .iP NOTE* This is a target resident function, which manipulates the target I/O* system. It must be preceded with the* '@' letter if executed from the Tornado Shell (windsh), which has a* built-in command of the same name that operates on the Host's I/O* system.** RETURNS: N/A** SEE ALSO: cd(),* .pG "Target Shell,"* windsh,* .tG "Shell"*/void pwd (void)    {    char name [MAX_FILENAME_LENGTH];    ioDefPathGet (name);    printf ("%s\n", name);    }/********************************************************************************* mkdir - make a directory** This command creates a new directory in a hierarchical file system.* The <dirName> string specifies the name to be used for the* new directory, and can be either a full or relative pathname.** This call is supported by the VxWorks NFS and dosFs file systems.** RETURNS: OK, or ERROR if the directory cannot be created.** SEE ALSO: rmdir(),* .pG "Target Shell"*/STATUS mkdir    (    const char *	dirName		/* directory name */    )    {    int fd;    if ((fd = open (dirName, O_RDWR | O_CREAT, FSTAT_DIR | DEFAULT_DIR_PERM))	 == ERROR)	{	return (ERROR);	}    return (close (fd));    }/********************************************************************************* rmdir - remove a directory** This command removes an existing directory from a hierarchical file* system.  The <dirName> string specifies the name of the directory to* be removed, and may be either a full or relative pathname.** This call is supported by the VxWorks NFS and dosFs file systems.** RETURNS: OK, or ERROR if the directory cannot be removed.** SEE ALSO: mkdir(),* .pG "Target Shell"*/STATUS rmdir    (    const char *	dirName		/* name of directory to remove */    )    {    return (remove (dirName));    }/********************************************************************************* rm - remove a file** This command is provided for UNIX similarity.  It simply calls remove().** RETURNS: OK, or ERROR if the file cannot be removed.** SEE ALSO: remove(),* .pG "Target Shell"*/STATUS rm    (    const char *	fileName	/* name of file to remove */    )    {    return (remove (fileName));    }/********************************************************************************* copyStreams - copy from/to specified streams** This command copies from the stream identified by <inFd> to the stream* identified by <outFd> until an end of file is reached in <inFd>.* This command is used by copy().** INTERNAL* The size of an array buffer can have a dramatic impact on the throughput* achieved by the copyStreams() routine.  The default is 1 Kbyte, but this* can be increased as long as the calling task (usually the VxWorks shell)* has ample stack space.  Alternately, copyStreams() can be modified to use a* static buffer, as long as the routine is guaranteed not to be called in* the context of more than one task simultaneously.** RETURNS: OK, or ERROR if there is an error reading from <inFd> or writing* to <outFd>.** SEE ALSO: copy(),* .pG "Target Shell"** INTERNAL* Note use of printErr since printf's would probably go to the output stream* outFd!*/STATUS copyStreams    (    int inFd,		/* file descriptor of stream to copy from */    int outFd 		/* file descriptor of stream to copy to */    )    {    char * buffer;    int totalBytes = 0;    int nbytes;    size_t	dSize;    /* update file size */    if (ioctl( inFd, FIONREAD, (int)&dSize ) == ERROR)    	dSize = 1024;    /* transferring buffer */    dSize = min( 0x10000, dSize );    buffer = KHEAP_ALLOC( dSize );    if (buffer == NULL)    	return ERROR;    while ((nbytes = fioRead (inFd, buffer, dSize)) > 0)	{	if (write (outFd, buffer, nbytes) != nbytes)	    {	    printErr ("copy: error writing file. errno %p\n", (void *)errno);     	    KHEAP_FREE( buffer );	    return (ERROR);	    }	totalBytes += nbytes;    	}    KHEAP_FREE( buffer );    if (nbytes < 0)	{	printErr ("copy: error reading file after copying %d bytes.\n",		 totalBytes);	return (ERROR);	}    printf("Copy OK: %u bytes copied\n", totalBytes );    return (OK);    }/********************************************************************************* copy - copy <in> (or stdin) to <out> (or stdout)** This command copies from the input file to the output file, until an* end-of-file is reached.** EXAMPLES:* The following example displays the file `dog', found on the default file* device:* .CS*     -> copy <dog* .CE* This example copies from the console to the file `dog', on device `/ct0/',* until an EOF (default ^D) is typed:* .CS*     -> copy >/ct0/dog* .CE* This example copies the file `dog', found on the default file device, to* device `/ct0/':* .CS*     -> copy <dog >/ct0/dog* .CE* This example makes a conventional copy from the file named `file1' to the file* named `file2':* .CS*     -> copy "file1", "file2"* .CE* Remember that standard input and output are global; therefore, spawning* the first three constructs will not work as expected.** RETURNS:* OK, or* ERROR if <in> or <out> cannot be opened/created, or if there is an* error copying from <in> to <out>.** SEE ALSO: copyStreams(), tyEOFSet(), cp(), xcopy()* .pG "Target Shell"

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
免费看日韩a级影片| 欧美性感一类影片在线播放| 国产精品久久久久aaaa| 成人av午夜影院| 亚洲精品美腿丝袜| 欧美三级中文字幕| 六月丁香婷婷色狠狠久久| 久久精品免视看| 9人人澡人人爽人人精品| 悠悠色在线精品| 欧美高清视频一二三区| 久久国产欧美日韩精品| 国产欧美日产一区| 欧美在线观看一二区| 麻豆91精品视频| 国产精品剧情在线亚洲| 欧美日韩在线观看一区二区 | 午夜精品久久久久久久久久| 欧美精品 国产精品| 国产在线一区观看| 亚洲品质自拍视频| 欧美一区二区三区喷汁尤物| 高清久久久久久| 亚洲成a人v欧美综合天堂| 欧美白人最猛性xxxxx69交| 丁香五精品蜜臀久久久久99网站 | 中文字幕一区视频| 欧美色区777第一页| 国产真实乱子伦精品视频| 亚洲女爱视频在线| 精品日韩欧美在线| 99精品视频一区二区| 日韩av中文字幕一区二区| 国产目拍亚洲精品99久久精品| 在线观看91视频| 日韩欧美视频一区| 国产成人av影院| 亚洲国产日韩一区二区| 久久久精品国产免大香伊| 欧美伊人久久大香线蕉综合69| 久久91精品久久久久久秒播| 亚洲美女视频一区| 久久久久久日产精品| 在线日韩国产精品| 国产成人日日夜夜| 日韩中文字幕亚洲一区二区va在线 | 亚洲国产精品天堂| 国产亚洲一区二区三区在线观看| 欧美综合亚洲图片综合区| 麻豆免费看一区二区三区| 亚洲蜜臀av乱码久久精品蜜桃| 精品国产乱码91久久久久久网站| 在线观看视频91| 国产91丝袜在线18| 蜜臀久久99精品久久久久宅男| 亚洲女性喷水在线观看一区| 久久女同互慰一区二区三区| 欧美日韩精品欧美日韩精品一 | 中文字幕电影一区| 日韩午夜在线影院| 在线观看视频91| 成人精品鲁一区一区二区| 美腿丝袜亚洲三区| 亚洲福中文字幕伊人影院| 国产精品嫩草影院com| 日韩美女在线视频| 欧美三级一区二区| 91色乱码一区二区三区| 国产不卡视频一区二区三区| 久久99精品网久久| 日本欧美一区二区三区乱码| 亚洲精品国产一区二区精华液 | 色94色欧美sute亚洲线路二| 国产成人亚洲综合a∨猫咪| 美女一区二区三区| 在线观看视频一区| 成人黄色小视频在线观看| 精品制服美女丁香| 人人精品人人爱| 亚洲成av人在线观看| 亚洲日穴在线视频| 中文字幕日本乱码精品影院| 久久先锋影音av| 欧美成人性战久久| 日韩三级在线观看| 3d成人h动漫网站入口| 欧美日韩日本视频| 欧美亚洲综合色| 91极品美女在线| 91久久人澡人人添人人爽欧美 | 欧美一区二区高清| 欧美剧情片在线观看| 欧美三级电影在线看| 欧美在线免费观看视频| 日本韩国精品一区二区在线观看| 99久久精品国产一区| 成人精品一区二区三区中文字幕| 国产丶欧美丶日本不卡视频| 国产一区二区剧情av在线| 狠狠久久亚洲欧美| 国产米奇在线777精品观看| 精品亚洲欧美一区| 激情欧美日韩一区二区| 久久精品国产精品青草| 毛片av一区二区| 蜜臀av一区二区在线免费观看| 蜜臀av一级做a爰片久久| 美女一区二区久久| 久久99精品网久久| 国产乱淫av一区二区三区| 国产成人精品免费视频网站| 国产成人免费视| 成人激情午夜影院| 97久久精品人人做人人爽| 色婷婷精品大在线视频| 欧美亚洲自拍偷拍| 欧美精品99久久久**| 精品少妇一区二区三区| 久久午夜免费电影| 国产精品看片你懂得| 亚洲女性喷水在线观看一区| 亚洲大片在线观看| 免费成人在线观看视频| 国产精品综合一区二区三区| 成人午夜在线播放| 91免费视频网| 欧美精选一区二区| 亚洲精品一区二区三区99| 国产日韩综合av| 自拍偷拍国产精品| 亚洲国产成人av网| 捆绑调教美女网站视频一区| 国产精品综合视频| 99re热这里只有精品免费视频| 欧美伊人久久大香线蕉综合69| 欧美一区二区不卡视频| 久久影视一区二区| 日韩美女视频一区二区 | 666欧美在线视频| 精品久久久久久久人人人人传媒 | 国产精品一区二区在线看| 成人激情小说乱人伦| 欧美午夜电影网| 日韩亚洲欧美中文三级| 中文字幕av免费专区久久| 亚洲综合偷拍欧美一区色| 美女免费视频一区| 波多野结衣精品在线| 欧美三级韩国三级日本一级| 亚洲精品在线三区| 亚洲美女免费视频| 精品黑人一区二区三区久久| 国产精品乱码一区二区三区软件| 亚洲自拍偷拍图区| 极品瑜伽女神91| 97se亚洲国产综合自在线观| 欧美精品乱人伦久久久久久| 国产色产综合色产在线视频| 夜色激情一区二区| 国产一区啦啦啦在线观看| 91影院在线观看| 日韩精品一区二区三区swag| 国产精品国产三级国产普通话99| 婷婷开心激情综合| 成人激情文学综合网| 在线成人午夜影院| 国产精品美女久久久久av爽李琼| 无码av免费一区二区三区试看 | 国产成人综合亚洲91猫咪| 91蜜桃网址入口| 精品国产欧美一区二区| 亚洲另类在线一区| 黄色资源网久久资源365| 91官网在线免费观看| 久久这里都是精品| 午夜av电影一区| 成人午夜av影视| 日韩欧美一卡二卡| 一区二区三区在线视频观看| 国产美女久久久久| 在线观看91av| 亚洲免费观看高清完整版在线| 老司机精品视频在线| 色国产综合视频| 国产校园另类小说区| 日本人妖一区二区| 色欧美日韩亚洲| 国产人成亚洲第一网站在线播放| 丝瓜av网站精品一区二区| 不卡av免费在线观看| 精品嫩草影院久久| 亚洲电影中文字幕在线观看| 不卡的电视剧免费网站有什么| 欧美成人激情免费网| 亚洲成人av福利| 99精品视频一区二区三区| 国产视频一区在线观看| 裸体健美xxxx欧美裸体表演| 欧美色视频在线观看| 亚洲欧美一区二区三区极速播放|