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

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

?? doschklib.c

?? vxworks操作系統的文件系統部分原代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
/* dosChkLib.c - DOS file system sanity check utility */ /* Copyright 1999-2002 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01o,10nov01,jkf  SPR#67890, chkdsk writes to RDONLY device01n,18oct01,jkf   warning cleaning.01n,18sep00,nrj   Fixed SPR#34108, check the write mode before synchronzing the                  FAT01m,29feb00,jkf   T3 changes01l,31aug99,jkf   changes for new CBIO API.  Changed date check logic.                  Added docs for date check.  Added global for date                  check.  Default debug global to zero.01k,31jul99,jkf   T2 merge, tidiness & spelling.01j,28sep98,vld   gnu extensions dropped from DBG_MSG/ERR_MSG macros01i,13oct98,vld   fixed message positioning on  screen, - '\b' avoided.01h,23sep98,vld   added usage of reserved FAT32 copy for data buffering		  in reduced memory environments, bit map of FAT entries		  is filled in parallel with 4-byte MAP array in this case01g,23sep98,vld   fixed bug of backward time setting01f,23sep98,vld   disable FAT mirroring while check disk in progress;		  synchronize FAT copies after check disk.01e,17sep98,vld   FAT copy number argument added to calls of		  clustValueSet()/clustValueGet();01d,08jul98,vld   print64Lib.h moved to h/private directory.01c,08jul98,vld   fixed bug in dosFsChkTree() of deletion		  invalid name entry through other file descriptor.01b,02jul98,lrn   review doc and messages01a,18jan98,vld	  written, preliminary*//*DESCRIPTIONThis library is part of dosFsLib, it manages the Consistency Checkingprocedure, which may be invoked automatically during device mountprocedure, or manual by means of the FIOCHKDSK ioctl.be checked which is managed by that particular handler.Check disk requires temporary buffer large enough to store informationon every FAT entry. Memory requirements can be a problem for FAT32volumes. If no enough available, temporary data is buffered insecond (reserved) FAT copy, that can take extremely long time on a slow processors.The minimum acceptable system time & date is set by the global variable(time_t) dosChkMinDate.  If the system time is greater than that value, it is assumed that a hardware clock mechanism is in place and the time setting is honored.  If dosChkLib detects that the system is set to an earlier date than dosChkMinDate, the system date will be adjusted to either the most recent date found on the file system volume or the minimum acceptable system time & date, whichever is later.  A warning indicicating the new system time is displayed on the console when this occurs.Do not set dosChkMinDate prior to 1980!INTERNAL*//* includes */#include "vxWorks.h"#include "private/dosFsVerP.h"#include "stat.h"#include "time.h"#include "dirent.h"#include "stdio.h"#include "stdlib.h"#include "string.h"#include "errnoLib.h"#include "memLib.h"#include "taskLib.h"#include "time.h"#include "timers.h"#include "tickLib.h"#include "dosFsLib.h"#include "private/print64Lib.h"#include "private/dosFsLibP.h"/* defines *//* macros */#undef DBG_MSG#undef ERR_MSG#undef NDEBUG#ifdef DEBUG#   undef LOCAL#   define LOCAL#   undef ERR_SET_SELF#   define ERR_SET_SELF#   define DBG_MSG( lvl, fmt, arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8 )	\	{ if( (lvl) <= dosChkDebug )					\	    printErr( "%s : %d : " fmt,				\	               __FILE__, __LINE__, arg1,arg2,	\		       arg3,arg4,arg5,arg6,arg7,arg8 ); }#   define ERR_MSG( lvl, fmt, a1,a2,a3,a4,a5,a6 )		\        { logMsg( __FILE__ " : " fmt, (int)(a1), (int)(a2),	\		  (int)(a3), (int)(a4), (int)(a5), (int)(a6) ); }#else	/* NO DEBUG */#   define NDEBUG#   define DBG_MSG(lvl,fmt,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) 	{}#   define ERR_MSG( lvl, fmt, a1,a2,a3,a4,a5,a6 )		\	{ if( (lvl) <= dosChkDebug ) 				\            logMsg( __FILE__ " : " fmt, (int)(a1), (int)(a2),	\		  (int)(a3), (int)(a4), (int)(a5), (int)(a6) ); }#endif /* DEBUG */#include "assert.h"#define DOSCHKLIB_YEAR_VALUE (((60*60)*24)*365*21)int dosChkDebug = 0;time_t dosChkMinDate = (time_t) DOSCHKLIB_YEAR_VALUE;/* error messages */#define CHK_CROSS_L_START_MSG	"\"%s\" is cross-linked on first cluster. "#define CHK_START_MSG		"%s  - disk check in progress ..."#define CHK_NOT_ROOM_MSG	"%s - Not enough room to run check disk.\n"#define CHK_LOST_CHAINS_MSG	" - lost chains "#define CHK_DEL_MSG		" Entry will be deleted. "#define CHK_REMAIN_MSG		"Entry remains intact. "#define CHK_CLUST_VAL		"(cluster %lu, value %lu)."#define CHK_SHORT_CHAIN_MSG	"\"%s\" file larger then its chain of clusters"#define CHK_BAD_DIR_MSG		"\"%s\" directory has invalid structure."#define CHK_DIR_LVL_OVERFL "directory nesting limit reached, \"%s\" skipped"#define CHK_ROOT_CHAIN	 "%s - Root directory cluster chain is corrupted.\n"#define CHK_ROOT_TRUNC_MSG	"      Root directory truncated. \n"#define CHK_BAD_NAME		"\"%s\" is an illegal name. "#define CHK_FAIL_MSG		"     Check disk failed. \n"\                                "     Disk should be formatted.\n"#define CHK_NOT_REPAIRED	"%s  - Errors detected. "\				"To correct disk structure, please start "\				"check disk with a permission to repair."#define CHK_RESTORE_FREE	"Errors detected. "\				"All corrections stored to disk "\				"and lost chains recovered."#define CHK_BAD_START_MSG	"\"%s\" has illegal start cluster"#define CHK_CROSS_START_MSG	"\"%s\" cross-linked at start"#define CHK_BAD_CHAIN_MSG	"\"%s\" has illegal cluster in chain"#define CHK_CROSS_LINK_MSG	"\"%s\" cross-linked with another chain"#define CHK_LONG_CHAIN_MSG	"\"%s\" too many clusters in file, adjusted."#define CHK_BAD_CLUST_MSG	"illegal cluster"#define CHK_NO_ERRORS		"%s  - Volume is OK "#define START_CLUST_MASK	0x80000000#define LOST_CHAIN_MARK		0xc0000000#define MARK_SET	1#define MARK_GET	2#define IS_BUSY		3#define MARK_BUF_INIT	255/* typedefs *//* check disk status */ typedef enum {             CHK_OK=OK, CHK_SIZE_ERROR,             CHK_RESTART, CHK_BAD_DIR, CHK_BAD_FILE,             CHK_CROSS_LINK, CHK_BAD_CHAIN, CHK_BAD_START,             CHK_ERROR=ERROR             }  CHK_STATUS;        /* dosChkMsg() argument */typedef enum { CURRENT_PATH, GET_PATH }	MSG_PATH;/* dosChkEntryFind() argument */typedef enum { FIND_BY_CLUST, FIND_BY_NAME }	CHK_SEARCH_KEY_TYPE;/* globals *//* locals *//* forward declarations */LOCAL void dosChkChainUnmark    (    DOS_FILE_DESC_ID    pFd             /* pointer to file descriptor */    );LOCAL STATUS dosChkChainStartGet    (    DOS_FILE_DESC_ID    pFd,            /* pointer to file descriptor */    uint32_t            entNum,    uint32_t *          pParDirStartClust,    uint32_t *          pStartClust    );LOCAL CHK_STATUS dosChkChainVerify    (    DOS_FILE_DESC_ID    pFd            /* pointer to file descriptor */    );LOCAL STATUS dosChkLostFind    (    DOS_FILE_DESC_ID    pFd             /* pointer to file descriptor */    );LOCAL STATUS dosChkLostFree    (    DOS_FILE_DESC_ID    pFd             /* pointer to file descriptor */    );/********************************************************************************* dosChkStatPrint - print statistics.** RETURNS: N/A.*/LOCAL void dosChkStatPrint    (    DOS_FILE_DESC_ID	pFd    )    {    DOS_VOLUME_DESC_ID	pVolDesc = pFd->pVolDesc;    CHK_DSK_DESC_ID	pChkDesc = pFd->pVolDesc->pChkDesc;    fsize_t	valBuf;        if( pVolDesc->chkVerbLevel < (DOS_CHK_VERB_1 >> 8) )    	return;        /* print statistics */        print64Fine(  "\n" "	  total # of clusters:	", 	pVolDesc->nFatEnts, "\n", 10 );    print64Fine( "	   # of free clusters:	", 	pChkDesc->chkNFreeClusts, "\n", 10 );    print64Fine( "	    # of bad clusters:	", 	pChkDesc->chkNBadClusts, "\n", 10 );        valBuf = pChkDesc->chkNFreeClusts;    valBuf = ( valBuf * pVolDesc->secPerClust ) <<    	     pVolDesc->secSizeShift;    print64Mult( "	     total free space:	",	valBuf, "\n", 10 );        valBuf = (fsize_t)pVolDesc->pFatDesc->maxContig( pFd ) <<     	     pVolDesc->secSizeShift;    print64Fine( "     max contiguous free space:  ",	valBuf, " bytes\n", 10 );    print64Fine( "		   # of files:	",	pChkDesc->chkNFiles, "\n", 10 );    print64Fine( "		 # of folders:	",	pChkDesc->chkNDirs, "\n", 10 );    print64Mult( "	 total bytes in files:	",	pChkDesc->chkTotalFSize, "\n", 10 );    print64Fine( "	     # of lost chains:	",	pChkDesc->chkNLostChains, "\n", 10 );    print64Mult( "   total bytes in lost chains:  ",	      pChkDesc->chkTotalBytesInLostChains, "\n", 10 );    }    /********************************************************************************* dosChkFinish - print statistics and deallocate resources.** RETURNS: N/A.*/LOCAL void dosChkFinish    (    DOS_FILE_DESC_ID	pFd    )    {    if( pFd->pVolDesc->pChkDesc->chkFatMap != NULL )    	KHEAP_FREE(((char *)pFd->pVolDesc->pChkDesc->chkFatMap));    KHEAP_FREE(((char *)pFd->pVolDesc->pChkDesc));    pFd->pVolDesc->pChkDesc = NULL;        return;    } /* dosChkFinish() */    /********************************************************************************* dosChkEntryMark - set/get FAT entry marker.** RETURNS: marker value on MARK_GET operation, STATUS on MARK_SET*  and MARK_BUF_INIT operation.*/uint32_t dosChkEntryMark    (    DOS_FILE_DESC_ID	pFd,    u_int	operation,         /* MARK_SET/MARK_GET/MARK_BUF_INIT */    uint32_t	entryNum,    uint32_t	mark    )    {    DOS_VOLUME_DESC_ID	pVolDesc = pFd->pVolDesc;    CHK_DSK_DESC_ID	pChkDesc = pVolDesc->pChkDesc;    uint8_t	fatCopyNum = 0;    if (! pChkDesc->bufToDisk)    	{    	switch (operation)    	    {    	    case MARK_GET :    	    case IS_BUSY :    	    	return pChkDesc->chkFatMap [entryNum];    	    case MARK_SET :    	    	pChkDesc->chkFatMap [entryNum] = mark;    	    	break;    	    case MARK_BUF_INIT :    	    	bzero ((char *)pChkDesc->chkFatMap,   	   	       pVolDesc->nFatEnts *                       sizeof( *pVolDesc->pChkDesc->chkFatMap ));    	    	break;    	    default:    	    	assert (FALSE);    	    }      	return OK;    	}    else	/* use reserved FAT copy as buffer */    	{    	fatCopyNum = pVolDesc->pFatDesc->activeCopyNum + 1;    	switch (operation)    	    {    	    case MARK_GET :            	pVolDesc->pFatDesc->clustValueGet (pFd, fatCopyNum,						   entryNum, &mark );    	    	return mark;    	    case IS_BUSY :    	    	return pChkDesc->chkFatMap [                       entryNum / 8 / sizeof(*pChkDesc->chkFatMap)] &                       (1 <<                        (entryNum & (sizeof(*pChkDesc->chkFatMap) * 8 - 1)));    	    case MARK_SET :    	    	pChkDesc->chkFatMap [			entryNum / 8 / sizeof(*pChkDesc->chkFatMap)] |=	        1 << (entryNum & (sizeof(*pChkDesc->chkFatMap) * 8 - 1));            	return pVolDesc->pFatDesc->clustValueSet (			    pFd, fatCopyNum, entryNum, DOS_FAT_RAW, mark );    	    case MARK_BUF_INIT :    	    	bzero ((char *)pChkDesc->chkFatMap,                       pVolDesc->nFatEnts / 8  + 4);    	    	return pVolDesc->pFatDesc->clustValueSet(                            pFd, fatCopyNum, 0, DOS_FAT_SET_ALL,  0 );    	    default:    	    	assert (FALSE);    	    }    	}    return ERROR;    } /* dosChkEntryMark() *//********************************************************************************* dosChkEntryFind - find entry in directory.** This routine searches directory, that starts from <dirStartClust>,* for entry, by entry name or start cluster. File descriptor* <pFd> is filled for entry found and entry name is placed into* <pChkDesc->chkDir>.** RETURNS: OK or ERROR if disk access error.*/LOCAL STATUS dosChkEntryFind    (    DOS_FILE_DESC_ID	pFd,    UINT32	dirStartClust,    void *	key,	/* start clust value or name buffer */    CHK_SEARCH_KEY_TYPE	keyType    )    {    UINT32	startClust = (UINT32)key;    DIR *	pDir = &pFd->pVolDesc->pChkDesc->chkDir;    DOS_FILE_DESC	fd;    DOS_FILE_HDL	flHdl;        fd = *pFd;    flHdl = *pFd->pFileHdl;    fd.pFileHdl = &flHdl;        if( dirStartClust == 0 )	/* parent is root */    	{    	if( pFd->pVolDesc->pDirDesc->pathLkup( &fd, "", 0 ) == ERROR )    	    return ERROR;    	}    else if( dirStartClust == (UINT32)NONE ) /* search for root */    	{    	if( pFd->pVolDesc->pDirDesc->pathLkup( &fd, "", 0 ) == ERROR )    	    return ERROR;    	strcpy( pDir->dd_dirent.d_name, pFd->pVolDesc->devHdr.name );    	return OK;    	}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
777奇米成人网| 亚洲最快最全在线视频| 亚洲日本va午夜在线影院| 午夜成人免费视频| 东方欧美亚洲色图在线| 欧美片网站yy| 日韩理论片中文av| 精品一区二区三区免费观看| 日本高清不卡aⅴ免费网站| 国产日韩欧美精品电影三级在线| 三级久久三级久久| 一本大道久久a久久综合| 国产日韩视频一区二区三区| 日本va欧美va精品发布| 在线中文字幕不卡| 亚洲欧美激情小说另类| 成人一区二区三区视频在线观看| 精品对白一区国产伦| 午夜影院久久久| 欧美性生活影院| 亚洲黄网站在线观看| 成人sese在线| 一色屋精品亚洲香蕉网站| 粉嫩一区二区三区在线看| 2021中文字幕一区亚洲| 欧美bbbbb| 日韩欧美国产wwwww| 日本欧美肥老太交大片| 欧美一区二区三区的| 日韩经典中文字幕一区| 欧美日产国产精品| 婷婷六月综合网| 欧美日韩高清一区二区不卡| 亚洲成国产人片在线观看| 欧美这里有精品| 亚洲国产精品一区二区尤物区| 97精品久久久午夜一区二区三区| 国产精品护士白丝一区av| 国产不卡在线一区| 国产欧美日韩不卡| 国产91露脸合集magnet| 国产精品拍天天在线| 波多野结衣精品在线| 亚洲视频图片小说| 欧美色区777第一页| 日韩精品亚洲专区| 久久一二三国产| 成人一区二区视频| 亚洲精品免费看| 欧美精品乱码久久久久久按摩| 日本美女视频一区二区| 久久精品人人做| 99vv1com这只有精品| 亚洲一区二区三区小说| 日韩三级免费观看| 国产精品18久久久久久vr| 国产精品久久久久久久久果冻传媒| 色综合久久久久综合体| 天天综合色天天综合色h| 精品国产制服丝袜高跟| www.欧美日韩| 午夜欧美大尺度福利影院在线看| 欧美成人精品福利| eeuss鲁一区二区三区| 亚洲第一二三四区| 2021中文字幕一区亚洲| 日本高清不卡一区| 久久99精品视频| 综合久久久久久| 精品少妇一区二区三区视频免付费 | 色狠狠色狠狠综合| 日本视频免费一区| 最新日韩av在线| 欧美一区二区久久久| 懂色av一区二区三区蜜臀| 午夜不卡av免费| 国产精品久久影院| 欧美高清视频一二三区 | 色悠悠久久综合| 免费观看日韩电影| 最新不卡av在线| 欧美大片在线观看一区二区| 色综合久久综合网欧美综合网| 免费看欧美女人艹b| 亚洲综合在线观看视频| 国产日韩三级在线| 日韩欧美一区在线| 在线视频亚洲一区| 国产不卡一区视频| 另类中文字幕网| 亚洲国产wwwccc36天堂| 中文字幕一区二区三区四区不卡| 久久天堂av综合合色蜜桃网| 欧美丝袜自拍制服另类| www.亚洲激情.com| 国产精品综合二区| 久久国产尿小便嘘嘘| 日日夜夜一区二区| 亚洲福利视频三区| 一二三区精品视频| 成人免费在线观看入口| 日本一区二区三区在线不卡| 日韩精品中文字幕在线不卡尤物| 欧美三级视频在线| 91福利在线观看| 色综合久久88色综合天天免费| 丁香啪啪综合成人亚洲小说| 国产精品538一区二区在线| 精品亚洲porn| 激情五月婷婷综合网| 免费成人在线网站| 久久99国产精品久久| 麻豆精品视频在线观看视频| 日本aⅴ免费视频一区二区三区| 亚洲国产精品久久久男人的天堂 | 国产精品国产三级国产专播品爱网| 久久婷婷一区二区三区| 精品国产不卡一区二区三区| 亚洲精品在线观看网站| 精品国产三级电影在线观看| 久久亚洲一级片| 国产偷国产偷亚洲高清人白洁| 久久美女艺术照精彩视频福利播放| 欧美不卡一区二区三区| 欧美大肚乱孕交hd孕妇| 久久久久久亚洲综合影院红桃| 国产欧美精品一区二区色综合朱莉| 久久久久国色av免费看影院| 国产色综合一区| 一区精品在线播放| 亚洲免费伊人电影| 亚洲永久免费av| 免费观看久久久4p| 国产一区二区三区黄视频| 丁香天五香天堂综合| 在线观看中文字幕不卡| 91麻豆精品国产91久久久 | 91精品国产品国语在线不卡| 26uuu另类欧美亚洲曰本| 国产精品婷婷午夜在线观看| 国产精品久久久久精k8 | 欧美一区三区二区| 国产亚洲欧洲997久久综合| 136国产福利精品导航| 香蕉成人伊视频在线观看| 国产精品乡下勾搭老头1| 91丨porny丨户外露出| 欧美日韩一卡二卡三卡| 精品电影一区二区| 亚洲视频资源在线| 另类小说色综合网站| 成人黄色一级视频| 91精选在线观看| 国产精品素人一区二区| 亚洲国产精品一区二区久久恐怖片| 精品一区二区免费| 91在线国产福利| 久久影视一区二区| 亚洲国产日韩精品| 国产成人精品网址| 欧美精品免费视频| 日韩毛片视频在线看| 国产一区二区成人久久免费影院 | caoporm超碰国产精品| 日韩欧美一二区| 亚洲美女偷拍久久| 国产一区二区三区免费在线观看| 欧美三级资源在线| 1区2区3区欧美| 国产精品1024| 日韩免费观看高清完整版| 一区二区高清免费观看影视大全| 国产精品一级在线| 欧美日韩夫妻久久| 亚洲欧美日韩久久精品| 国产精品一区一区| 日韩视频在线观看一区二区| 亚洲自拍偷拍av| 99久久精品免费看国产| 久久一区二区三区四区| 麻豆一区二区99久久久久| 欧美性xxxxxxxx| 自拍偷拍亚洲综合| 成人久久视频在线观看| 欧美精品一区二区三区在线播放| 丝袜美腿亚洲一区| 欧洲日韩一区二区三区| 亚洲人成在线播放网站岛国| 丁香一区二区三区| 国产欧美日韩综合精品一区二区| 国产在线播放一区三区四| 91精品国产综合久久蜜臀 | 岛国av在线一区| 久久精品日产第一区二区三区高清版 | 久久久久久久久久久久久久久99| 乱一区二区av| 日韩精品资源二区在线| 久久精品国产精品青草| 精品少妇一区二区三区在线播放 | 丝袜美腿亚洲一区|