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

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

?? usrfslib.c

?? vxworks的完整的源代碼
?? 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一区二区三区免费野_久草精品视频
一区二区三区在线视频观看| 91精品在线一区二区| 国产精品久久久久三级| 国产激情视频一区二区在线观看| 久久视频一区二区| 国产成人av电影在线观看| 中文字幕欧美国产| 91小宝寻花一区二区三区| 一区二区日韩av| 欧美福利一区二区| 精品一区精品二区高清| 久久老女人爱爱| 成人av网在线| 亚洲福利视频三区| 精品日韩一区二区| 99天天综合性| 日韩成人精品在线| 一区二区三区四区高清精品免费观看| 色欧美片视频在线观看| 舔着乳尖日韩一区| 欧美精品一区男女天堂| 99久久国产综合色|国产精品| 亚洲综合色在线| 日韩欧美国产综合在线一区二区三区| 国产欧美一区二区精品忘忧草| 成人丝袜高跟foot| 亚洲精品国产一区二区精华液| 欧美日本一道本在线视频| 国产福利精品导航| 亚洲制服欧美中文字幕中文字幕| 欧美大度的电影原声| 成人美女视频在线观看18| 亚洲综合小说图片| 久久女同性恋中文字幕| 在线免费不卡电影| 成人涩涩免费视频| 亚洲1区2区3区视频| 国产精品无人区| 日韩一级成人av| 色呦呦日韩精品| 免费人成网站在线观看欧美高清| 亚洲视频一二区| 久久久久久亚洲综合影院红桃| 欧美四级电影网| 成人a免费在线看| 国内精品写真在线观看| 亚洲影视资源网| 久久天堂av综合合色蜜桃网| 91福利视频在线| av高清不卡在线| 国产麻豆视频一区| 日本v片在线高清不卡在线观看| 亚洲美女屁股眼交3| 国产日本一区二区| 欧美成人乱码一区二区三区| 国产精品久久夜| 精品国产污污免费网站入口| 91超碰这里只有精品国产| 一本色道a无线码一区v| 成人av电影免费在线播放| 美脚の诱脚舐め脚责91 | 日本va欧美va精品发布| 一区二区在线观看视频| 国产精品三级视频| 久久人人97超碰com| 精品少妇一区二区三区在线播放| 欧美乱妇15p| 欧美美女bb生活片| 欧美无乱码久久久免费午夜一区| 99久久久久免费精品国产| 日本v片在线高清不卡在线观看| 亚洲精品五月天| 亚洲美女视频在线观看| 国产三级精品三级| 2014亚洲片线观看视频免费| 欧美日韩国产综合草草| 欧美久久一二区| 91精品欧美一区二区三区综合在| 欧美日韩精品免费| 欧美高清视频在线高清观看mv色露露十八| 国产美女视频一区| 国产呦萝稀缺另类资源| 亚洲一区影音先锋| 亚洲高清不卡在线| 亚洲一区二区三区爽爽爽爽爽| 一区二区三区久久| 丝袜美腿亚洲色图| 激情另类小说区图片区视频区| 91性感美女视频| 日本电影欧美片| 欧美性色综合网| 欧美一区二区精品在线| 91精品综合久久久久久| 欧美大片在线观看| 中文字幕欧美日韩一区| 亚洲精品五月天| 亚洲成人综合在线| 九九久久精品视频| www.成人网.com| 欧美午夜精品免费| 精品国产伦一区二区三区观看方式| 久久综合色8888| 综合色天天鬼久久鬼色| 亚洲柠檬福利资源导航| 三级久久三级久久久| 精品在线播放免费| 波多野结衣中文字幕一区| 欧美日韩一卡二卡| 日韩一级大片在线观看| 国产精品久久久久一区| 图片区日韩欧美亚洲| 九九视频精品免费| 91丨porny丨蝌蚪视频| 欧美日韩aaaaaa| 国产欧美日韩在线看| 一个色妞综合视频在线观看| 久久av中文字幕片| 色噜噜久久综合| 欧美xxxx在线观看| 亚洲色图另类专区| 久久国产尿小便嘘嘘尿| 色哟哟日韩精品| 亚洲精品在线网站| 亚洲靠逼com| 丁香婷婷综合激情五月色| 欧美图区在线视频| 欧美国产精品一区二区三区| 日韩高清中文字幕一区| 成人av在线一区二区| 日韩一级成人av| 亚洲成人免费影院| 国产+成+人+亚洲欧洲自线| 色域天天综合网| 久久免费美女视频| 日本不卡一二三区黄网| 91精品福利视频| 国产日韩av一区| 黄色日韩三级电影| 欧美日本乱大交xxxxx| 国产精品成人一区二区艾草| 激情综合色播五月| 日本一区二区三区高清不卡| 同产精品九九九| 色爱区综合激月婷婷| 国产欧美一区在线| 久久精品国产999大香线蕉| 欧美调教femdomvk| 亚洲人一二三区| 成人黄色片在线观看| 精品粉嫩超白一线天av| 久久国产欧美日韩精品| 欧美精品第1页| 亚洲国产精品影院| 国产成人精品免费| 精品国精品自拍自在线| 欧美aaa在线| 欧美一级黄色片| 日韩精品一二区| 欧美高清视频www夜色资源网| 亚洲国产日韩a在线播放性色| 91视频一区二区| 国产精品网站导航| 日本女人一区二区三区| 欧美色国产精品| 亚洲国产aⅴ天堂久久| 欧美视频一区二区三区四区 | 精品视频免费在线| 亚洲制服丝袜在线| 在线一区二区视频| 亚洲二区视频在线| 91精品欧美综合在线观看最新| 亚洲一区自拍偷拍| 欧美亚洲愉拍一区二区| 亚洲成人av福利| 91麻豆精品国产| 久久国产综合精品| 国产亚洲精品精华液| 粉嫩av亚洲一区二区图片| 久久精品男人天堂av| 成人国产亚洲欧美成人综合网 | 亚洲蜜臀av乱码久久精品蜜桃| 色婷婷久久久综合中文字幕| 亚洲一区二区在线观看视频| 欧美性猛交xxxx黑人交| 婷婷开心激情综合| 精品日产卡一卡二卡麻豆| 国产在线不卡一区| 国产精品不卡一区二区三区| 色婷婷综合久久| 日韩综合一区二区| 久久综合视频网| 不卡区在线中文字幕| 亚洲一级电影视频| 日韩欧美国产wwwww| 国产一区二区0| 一区二区三区成人| 精品噜噜噜噜久久久久久久久试看| 东方aⅴ免费观看久久av| 樱花草国产18久久久久| 精品国产一区久久|