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

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

?? unixdrv.c

?? VxWorks BSP框架源代碼包含頭文件和驅(qū)動(dòng)
?? C
?? 第 1 頁 / 共 2 頁
字號(hào):
/* unixDrv.c - UNIX-file disk driver (VxSim for Solaris and VxSim for HP) *//* Copyright 1984-1999 Wind River Systems, Inc. */#include "copyright_wrs.h"/* modification history--------------------01j,16mar99,elg  mention unixDrv is for Solaris and HP simulators (SPR 7719).01i,11jul97,dgp  doc: ad (VxSim) to title line01h,09jan97,pr    added ARCHCVTFLAGS for simsolaris01g,30oct95,ism   added support for simsolaris01f,31oct94,kdl   made conditional for simulator only.01e,18aug93,gae   modified unix_stat for hp.01d,30jul93,gae   doc touchup.01c,23jan93,gae   ANSIfied.01b,20jul92,gae   minor revision.01a,01apr91,smeg  derived from ramDrv.*//*DESCRIPTIONThis driver emulates a VxWorks disk driver, but actually uses the UNIXfile system to store the data.  The VxWorks disk appears underUNIX as a single file.The UNIX file name, and the size of the disk, may be specified during the unixDiskDevCreate() call.USER-CALLABLE ROUTINESMost of the routines in this driver are accessible only through the I/Osystem. The routine unixDrv() must be called to initialize the driver andthe unixDiskDevCreate() routine is used to create devices.CREATING UNIX DISKSBefore a UNIX disk can be used, it must be created.  This is donewith the unixDiskDevCreate() call.  The format of this call is:.CS    BLK_DEV *unixDiskDevCreate	(	char	*unixFile,	/@ name of the UNIX file to use		@/	int	bytesPerBlk,	/@ number of bytes per block		@/	int	blksPerTrack,	/@ number of blocks per track		@/	int	nBlocks		/@ number of blocks on this device	@/	).CEThe UNIX file must be pre-allocated separately.  Thiscan be done using the UNIX mkfile(8) command.  Note that you have tocreate an appropriately sized file.  For example, to create a UNIXfile system that is used as a common floppy dosFs file system, youwould issue the comand:.CS    mkfile 1440k /tmp/floppy.dos.CEThis will create space for a 1.44 Meg DOS floppy (1474560 bytes,or 2880 512-byte blocks).The <bytesPerBlk> parameter specifies the size of each logical blockon the disk.  If <bytesPerBlk> is zero, 512 is the default.The <blksPerTrack> parameter specifies the number of blocks on eachlogical track of the UNIX disk.  If <blksPerTrack> is zero, the count ofblocks per track will be set to <nBlocks> (i.e., the disk will be defined as having only one track).  UNIX disk devices typically are specifiedwith only one track.The <nBlocks> parameter specifies the size of the disk, in blocks.If <nBlocks> is zero the size of the UNIX file specified, divided bythe number of bytes per block, is used.The formatting parameters (<bytesPerBlk>, <blksPerTrack>, and <nBlocks>)are critical only if the UNIX disk already contains the contentsof a disk created elsewhere.  In that case, the formatting parameters must be identical to those used when the image was created.  Otherwise, they may be any convenient number.Once the device has been created it still does not have a name orfile system associated with it.  This must be done by using the file system's device initialization routine (e.g., dosFsDevInit()).  ThedosFs and rt11Fs file systems also provide make-file-system routines(dosFsMkfs() and rt11FsMkfs()), which may be used to associate a nameand file system with the block device and initialize that file systemon the device using default configuration parameters.The unixDiskDevCreate() call returns a pointer to a block devicestructure (BLK_DEV).  This structure contains fields that describe the physical properties of a disk device and specify the addresses of routines within the UNIX disk driver.The BLK_DEV structure address must be passed to the desired file system (dosFs, rt11Fs, or rawFs) during the file system's device initialization or make-file-system routine.  Only then is a name and file system associated with the device, making it available for use.As an example, to create a 200KB disk, 512-byte blocks, and only one track,the proper call would be:.CS    BLK_DEV *pBlkDev;    pBlkDev = unixDiskDevCreate ("/tmp/filesys1",  512,  400,  400,  0);.CEThis will attach the UNIX file /tmp/filesys1 as a block device.A convenience routine, unixDiskInit(), is provided to do theunixDiskDevCreate() followed by either a dosFsMkFs() or dosFsDevInit(),whichever is appropriate.  The format of this call is:.CS    BLK_DEV *unixDiskInit	(	char * unixFile,  /@ name of the UNIX file to use @/	char * volName,   /@ name of the dosFs volume to use @/	int    nBytes     /@ number of bytes in dosFs volume @/	).CEThis call will create the UNIX disk if required.IOCTLOnly the FIODISKFORMAT request is supported; all other ioctl requestsreturn an error, and set the task's errno to S_ioLib_UNKNOWN_REQUEST.SEE ALSO:dosFsDevInit(), dosFsMkfs(), rt11FsDevInit(), rt11FsMkfs(), rawFsDevInit(),.pG "I/O System, Local File Systems"LINTLIBRARY*/#include "vxWorks.h"#include "blkIo.h"#include "ioLib.h"#include "iosLib.h"#include "memLib.h"#include "errno.h"/* #include "stdio.h" */#include "dosFsLib.h"#include "stdlib.h"/* USED ONLY WITH SIMULATOR */#if (CPU_FAMILY==SIMSPARCSUNOS || CPU_FAMILY==SIMHPPA || CPU_FAMILY==SIMSPARCSOLARIS)#include "simLib.h"#include "u_Lib.h"extern int printErr ();int unixRWFlag = O_RDWR;int unixRWMode = 0;int unixCRFlag = O_RDWR | O_CREAT; /* 514 */int unixCRMode = 0644;#define DEFAULT_SEC_SIZE   512#define DEFAULT_DISK_SIZE  (1024*1024)typedef struct		/* UNIXDISK_DEV - UNIX disk device descriptor */    {    BLK_DEV	unixDiskBlkDev; /* generic block device structure */    int		unixFd;	 /* UNIX file descriptor */    } UNIXDISK_DEV;/* forward declarations */LOCAL STATUS unixDiskIoctl ();LOCAL STATUS unixDiskBlkRd ();LOCAL STATUS unixDiskBlkWrt ();/********************************************************************************* unixDrv - install UNIX disk driver** Used in usrConfig.c to cause the UNIX disk driver to be linked in* when building VxWorks.  Otherwise, it is not necessary to call this* routine before using the UNIX disk driver.** This routine is only applicable to VxSim for Solaris and VxSim for HP.** RETURNS: OK (always).*/STATUS unixDrv (void)    {    return (OK);    }/********************************************************************************* unixDiskDevCreate - create a UNIX disk device** This routine creates a UNIX disk device.** The <unixFile> parameter specifies the name of the UNIX file to use* for the disk device.* * The <bytesPerBlk> parameter specifies the size of each logical block* on the disk.  If <bytesPerBlk> is zero, 512 is the default.* * The <blksPerTrack> parameter specifies the number of blocks on each* logical track of the disk.  If <blksPerTrack> is zero, the count of* blocks per track is set to <nBlocks> (i.e., the disk is defined * as having only one track).* * The <nBlocks> parameter specifies the size of the disk, in blocks.* If <nBlocks> is zero, a default size is used.  The default is calculated* as the size of the UNIX disk divided by the number of bytes per block.* * This routine is only applicable to VxSim for Solaris and VxSim for HP.** RETURNS: A pointer to block device (BLK_DEV) structure,* or NULL, if unable to open the UNIX disk.*/BLK_DEV *unixDiskDevCreate    (    char	*unixFile,	/* name of the UNIX file */    int		bytesPerBlk,	/* number of bytes per block */    int		blksPerTrack,	/* number of blocks per track */    int		nBlocks		/* number of blocks on this device */    )    {    FAST UNIXDISK_DEV	*pUnixDiskDev;	/* ptr to created UNIXDISK_DEV struct */    FAST BLK_DEV	*pBlkDev;    /* ptr to BLK_DEV struct in UNIXDISK_DEV */    int fd;    /* Set up defaults for any values not specified */    if (bytesPerBlk == 0)	bytesPerBlk = DEFAULT_SEC_SIZE;    if ((fd = u_open (unixFile, ARCHCVTFLAGS(unixRWFlag), unixRWMode)) < 0)	{	printErr ("unixDiskDevCreate: Could not open %s read/write\n", unixFile);	return (NULL);	}    if (nBlocks == 0)	{	struct unix_stat buf;	if (u_fstat (fd, (char*)&buf) < 0)	    {	    printErr ("unixDiskDevCreate: Could not stat %s\n", unixFile);	    u_close (fd);	    return (NULL);	    }	nBlocks = (int) buf.st_size / bytesPerBlk;	}    if (blksPerTrack == 0)	blksPerTrack = nBlocks;    /* Allocate a UNIXDISK_DEV structure for device */    pUnixDiskDev = (UNIXDISK_DEV *) calloc (1, sizeof (UNIXDISK_DEV));    if (pUnixDiskDev == NULL)	{	u_close (fd);	return (NULL);				/* no memory */	}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产日韩欧美综合一区| 欧美亚洲国产一卡| 亚洲观看高清完整版在线观看| 国产人成亚洲第一网站在线播放| 欧美一级专区免费大片| 日本久久电影网| 成人激情小说网站| 韩国成人精品a∨在线观看| 视频一区二区欧美| 亚洲一区二区黄色| 亚洲免费av高清| 日韩色在线观看| 51午夜精品国产| 欧美理论在线播放| 制服丝袜av成人在线看| 欧美日韩一二区| 欧美伊人久久久久久久久影院| 91高清在线观看| 91国偷自产一区二区使用方法| 91小视频在线| 色偷偷久久人人79超碰人人澡| 色偷偷久久人人79超碰人人澡| 99国产精品久久久久久久久久久| 不卡av在线网| 91免费版pro下载短视频| 97精品久久久午夜一区二区三区| 9色porny自拍视频一区二区| 不卡的av电影在线观看| 成人av午夜影院| 一本色道综合亚洲| 色狠狠av一区二区三区| 欧美午夜精品电影| 69堂精品视频| 久久亚洲捆绑美女| 久久久www成人免费毛片麻豆| 亚洲精品一区二区三区蜜桃下载 | 国产一区二区不卡老阿姨| 黄一区二区三区| 国产激情偷乱视频一区二区三区| 成人网在线播放| 91无套直看片红桃| 欧美亚洲免费在线一区| 欧美高清激情brazzers| 欧美一区二区免费视频| 久久久久亚洲蜜桃| 国产精品网曝门| 久久久亚洲精品一区二区三区| 国产日韩v精品一区二区| 国产精品久久久久毛片软件| 亚洲人吸女人奶水| 日韩精品免费视频人成| 韩国精品久久久| 99热99精品| 欧美日韩国产在线播放网站| 欧美成人乱码一区二区三区| 国产免费久久精品| 亚洲综合无码一区二区| 免费看欧美美女黄的网站| 国产一区二区在线看| 色偷偷一区二区三区| 欧美成人女星排名| 亚洲蜜臀av乱码久久精品蜜桃| 午夜一区二区三区在线观看| 久久se精品一区精品二区| 成人黄色一级视频| 538在线一区二区精品国产| 久久久久久久久久美女| 亚洲欧美日本韩国| 美洲天堂一区二卡三卡四卡视频| 国产suv一区二区三区88区| 91国内精品野花午夜精品 | 亚洲日本在线看| 日本欧美韩国一区三区| 成人sese在线| 日韩一级片在线观看| 国产精品欧美一级免费| 日本成人在线一区| 97精品久久久午夜一区二区三区| 日韩免费看网站| 中文字幕va一区二区三区| 亚洲一区在线视频| 亚洲风情在线资源站| 国产精品一二三在| 欧美日韩一区二区三区视频| 国产欧美视频一区二区三区| 中文字幕第一区| 美女看a上一区| 91福利国产成人精品照片| 欧美精品一区二区精品网| 亚洲国产精品一区二区www| 国产不卡在线一区| 日韩精品一区二区三区视频播放 | 国产视频一区在线观看| 首页亚洲欧美制服丝腿| 91亚洲永久精品| 国产精品丝袜在线| 极品少妇一区二区| 91麻豆精品国产91久久久| 亚洲一区二区三区四区在线免费观看 | 国内精品视频一区二区三区八戒| 在线影院国内精品| 国产精品理伦片| 韩国三级电影一区二区| 8x福利精品第一导航| 亚洲综合网站在线观看| 972aa.com艺术欧美| 国产精品伦理一区二区| 国产一区不卡精品| 亚洲精品在线免费播放| 天堂影院一区二区| 欧美在线观看一区| 一区二区三区高清| 欧美影院午夜播放| 夜夜爽夜夜爽精品视频| 97久久精品人人做人人爽| 国产精品理论片在线观看| 成人免费视频app| 欧美一级黄色片| 奇米888四色在线精品| 在线播放一区二区三区| 亚洲精品国产成人久久av盗摄 | 日韩精品一区二区三区四区| 日本最新不卡在线| 日韩一级高清毛片| 免费成人美女在线观看.| 正在播放一区二区| 美脚の诱脚舐め脚责91| 欧美电视剧在线看免费| 精品一区二区在线视频| 日韩精品中文字幕一区二区三区| 久久精品99国产国产精| 精品少妇一区二区三区免费观看| 蜜臀av一级做a爰片久久| 精品免费国产一区二区三区四区| 精品一区二区三区不卡| 26uuu国产电影一区二区| 国产一区二区在线免费观看| 精品国产电影一区二区| 免费在线观看一区| 亚洲精品一区二区精华| 粉嫩绯色av一区二区在线观看| 国产精品你懂的| 91福利小视频| 欧美aaa在线| 国产嫩草影院久久久久| 97se亚洲国产综合在线| 亚洲成a人片综合在线| 日韩一区二区免费视频| 国产一区二区电影| 久久精品夜色噜噜亚洲aⅴ| 东方欧美亚洲色图在线| 一区二区三区免费| 日韩欧美中文字幕一区| 国产成人小视频| 亚洲老妇xxxxxx| 欧美一卡在线观看| 懂色一区二区三区免费观看| 亚洲精品国产a久久久久久| 3atv在线一区二区三区| 国产尤物一区二区在线| 18欧美亚洲精品| 91精品久久久久久久久99蜜臂| 九一九一国产精品| 国产日韩欧美亚洲| 色94色欧美sute亚洲线路二| 男男成人高潮片免费网站| 中文字幕+乱码+中文字幕一区| av不卡一区二区三区| 首页国产丝袜综合| 国产精品高潮呻吟久久| 欧美蜜桃一区二区三区| 国产成人av一区二区三区在线 | 91蜜桃传媒精品久久久一区二区| 亚洲大片精品永久免费| 精品久久久久久综合日本欧美| 97久久超碰精品国产| 免费观看日韩电影| 中文字幕一区二区三区av| 在线观看91av| 99精品欧美一区二区三区小说 | 高清在线成人网| 日本麻豆一区二区三区视频| 亚洲日本va午夜在线影院| 久久久综合精品| 日韩午夜激情av| 欧美日韩国产经典色站一区二区三区| caoporen国产精品视频| 国产精品影视天天线| 美女视频免费一区| 天天综合天天做天天综合| 亚洲女与黑人做爰| 国产精品久久久久久亚洲伦| 欧美不卡激情三级在线观看| 欧美三级在线播放| 欧美性受xxxx| 欧美在线色视频| 欧美性受xxxx黑人xyx性爽| 色94色欧美sute亚洲线路二| 一本大道久久a久久综合婷婷 | 久久综合给合久久狠狠狠97色69|