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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? usrfslib.c

?? vxwork源代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
/* 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"

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久超级碰视频| 久久激情五月激情| 欧美性高清videossexo| 亚洲精品久久久蜜桃| 色94色欧美sute亚洲线路二| 亚洲伦理在线免费看| 欧美亚洲国产bt| 人人爽香蕉精品| 337p粉嫩大胆色噜噜噜噜亚洲| 国产一区二区在线观看免费| 国产精品美女一区二区| 色哟哟精品一区| 日韩成人一级片| 国产亚洲欧美中文| 99久久99久久综合| 国产一区二区三区蝌蚪| 亚洲欧洲另类国产综合| 欧美网站一区二区| 激情综合网最新| 国产精品成人午夜| 欧美美女喷水视频| 精品一区二区三区视频在线观看| 欧美激情一区二区三区全黄| 91久久精品午夜一区二区| 日本美女一区二区| 亚洲国产精华液网站w| 91久久精品一区二区| 久久成人av少妇免费| 成人欧美一区二区三区小说| 在线不卡a资源高清| 国产成人一区二区精品非洲| 一区二区三区在线免费播放| 日韩精品一区二区三区在线| 99久久er热在这里只有精品66| 爽好久久久欧美精品| 中文字幕精品一区二区三区精品| 欧美在线三级电影| 国产一区二区调教| 亚洲一区精品在线| 久久麻豆一区二区| 欧美视频在线播放| 国产成人三级在线观看| 亚洲成av人片一区二区梦乃| 久久免费午夜影院| 欧美性欧美巨大黑白大战| 国产美女精品人人做人人爽| 亚洲一区二区精品3399| 国产偷国产偷亚洲高清人白洁| 欧美视频你懂的| 成人伦理片在线| 蜜桃一区二区三区四区| 亚洲手机成人高清视频| 精品国产sm最大网站免费看| 欧洲精品一区二区| 成人性生交大片| 免费欧美日韩国产三级电影| 亚洲啪啪综合av一区二区三区| 欧美va日韩va| 欧美亚洲精品一区| 国产成人av自拍| 日韩成人精品视频| 亚洲欧美日韩国产一区二区三区 | 成人教育av在线| 日韩av不卡在线观看| 亚洲欧洲日韩av| 久久久精品影视| 91麻豆精品91久久久久同性| 91麻豆高清视频| 国产成人免费视频网站高清观看视频 | 精品国产乱码久久久久久影片| 国产精品―色哟哟| 日韩欧美国产小视频| 欧美午夜电影网| 99re免费视频精品全部| 国产盗摄视频一区二区三区| 蜜桃精品视频在线| 午夜不卡av免费| 中文字幕永久在线不卡| 国产亚洲精品aa| 日韩精品中午字幕| 欧美精品乱码久久久久久按摩| 一本色道a无线码一区v| 成人一级视频在线观看| 国内外成人在线视频| 青青草成人在线观看| 亚洲成a天堂v人片| 一区二区三区国产精品| 亚洲特黄一级片| 国产精品国产馆在线真实露脸| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 欧美日产在线观看| 色偷偷一区二区三区| 99久久er热在这里只有精品66| 国产成人精品www牛牛影视| 精品一区二区在线视频| 日韩av一区二| 日韩中文字幕一区二区三区| 亚洲一二三专区| 亚洲一区二区三区视频在线| 亚洲精品亚洲人成人网| 亚洲欧洲av一区二区三区久久| 国产精品入口麻豆原神| 亚洲国产精品成人综合| 久久精品夜夜夜夜久久| 久久精品视频一区二区三区| 欧美不卡视频一区| 日韩精品一区二区三区视频播放 | 午夜一区二区三区视频| 亚洲最新视频在线观看| 亚洲理论在线观看| 亚洲欧美激情一区二区| 亚洲精品成人a在线观看| 一区二区三区国产精华| 亚洲综合激情小说| 亚洲第一福利一区| 日韩精品亚洲专区| 男女男精品网站| 另类专区欧美蜜桃臀第一页| 美国毛片一区二区| 国精产品一区一区三区mba视频| 韩国在线一区二区| 国产成人精品在线看| 成人听书哪个软件好| 99精品欧美一区二区三区综合在线| 成+人+亚洲+综合天堂| 成人国产精品免费网站| aaa欧美色吧激情视频| 99精品欧美一区二区三区小说 | 在线电影一区二区三区| 日韩午夜电影av| 欧美tk—视频vk| 国产精品美女一区二区在线观看| 亚洲手机成人高清视频| 亚洲人成精品久久久久| 亚洲成av人影院| 老司机午夜精品| 国产成人午夜视频| 91免费观看视频在线| 欧美性猛交xxxxxx富婆| 欧美成人a在线| 中文字幕乱码一区二区免费| 亚洲美女屁股眼交| 污片在线观看一区二区| 九一久久久久久| 久久久综合激的五月天| 国产精品美女久久久久aⅴ | 久久99国产精品免费| 国产69精品久久久久毛片| 一本久久精品一区二区| 欧美精品久久久久久久多人混战 | 日韩一级黄色片| 久久久久久久综合色一本| 亚洲欧美在线aaa| 午夜精品福利一区二区蜜股av| 久久99精品久久久久久国产越南| 成人av网站在线| 欧美精品三级在线观看| 国产网红主播福利一区二区| 亚洲精选在线视频| 捆绑变态av一区二区三区| 成人免费视频app| 欧美日韩国产123区| 国产亚洲女人久久久久毛片| 一区二区三区精密机械公司| 狠狠色丁香久久婷婷综| 色8久久精品久久久久久蜜| 日韩欧美区一区二| 亚洲情趣在线观看| 精品亚洲国内自在自线福利| 91啪亚洲精品| 日韩欧美色电影| 一区二区三区免费| 人人超碰91尤物精品国产| 成人午夜电影网站| 欧美一区二区三区系列电影| 国产精品不卡视频| 另类的小说在线视频另类成人小视频在线 | 日韩精品在线看片z| 中文字幕一区二区不卡| 美女视频一区二区| 91蜜桃免费观看视频| 欧美精品一区二区三区在线播放| 亚洲嫩草精品久久| 国产乱子伦视频一区二区三区| 欧美三级视频在线观看| 欧美国产1区2区| 青青草成人在线观看| 色综合久久久久综合| 日韩视频一区二区在线观看| 国产精品免费aⅴ片在线观看| 久久成人18免费观看| 欧美日韩国产不卡| 亚洲柠檬福利资源导航| 国产电影精品久久禁18| 欧美成人精品3d动漫h| 亚洲综合成人在线| 成人一区二区三区在线观看| 欧美成人一区二区三区 | 亚洲女人小视频在线观看| 国产高清视频一区|