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

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

?? unixdrv.c

?? VxWorks BSP框架源代碼包含頭文件和驅動
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* 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 */	}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久亚洲免费视频| 色综合天天性综合| 久久久久久电影| 日韩欧美国产三级| 69av一区二区三区| 欧美精品一二三四| 91精品在线观看入口| 99久久综合99久久综合网站| 国产精一品亚洲二区在线视频| 蜜臀久久99精品久久久久久9| 午夜a成v人精品| 五月天欧美精品| 午夜精品久久久久久不卡8050| 亚洲一区二区三区爽爽爽爽爽| 一区二区三区在线播| 一区二区高清视频在线观看| 亚洲一区二三区| 日本欧美大码aⅴ在线播放| 日韩va欧美va亚洲va久久| 老司机免费视频一区二区| 激情国产一区二区| 中文字幕亚洲一区二区va在线| 国产精品国产三级国产有无不卡| 亚洲色图丝袜美腿| 亚洲欧洲综合另类| 亚洲成人动漫在线免费观看| 日韩电影在线观看一区| 国产在线一区二区| 东方欧美亚洲色图在线| 一本一道波多野结衣一区二区| 91麻豆精东视频| 欧美久久一区二区| 精品国产乱子伦一区| 国产精品久久久久久久久果冻传媒 | 久久精品亚洲麻豆av一区二区| 国产亚洲一区二区三区四区| 最新国产成人在线观看| 五月综合激情网| 国产原创一区二区| 成人动漫一区二区| 欧美色爱综合网| 亚洲欧洲国产日韩| 日韩精品一区二区三区在线观看| 国产女人水真多18毛片18精品视频| 亚洲免费资源在线播放| 日韩国产成人精品| 成人动漫一区二区| 欧美一级日韩不卡播放免费| 欧美高清在线一区| 婷婷综合五月天| www.久久久久久久久| 在线电影院国产精品| 中文字幕第一区| 免费成人小视频| 91视频在线观看| 久久综合九色综合97婷婷| 一区二区三区产品免费精品久久75| 麻豆精品一区二区综合av| 91免费国产视频网站| 精品国产一区二区在线观看| 一区二区三区 在线观看视频 | 欧美日韩综合在线免费观看| 精品国产伦一区二区三区观看体验| 一区二区三区四区亚洲| 国产黄色91视频| 在线不卡欧美精品一区二区三区| 国产精品第一页第二页第三页| 看片网站欧美日韩| 欧美日本韩国一区二区三区视频 | 一区二区成人在线观看| 国产乱码精品一品二品| 欧美精品18+| 亚洲精品乱码久久久久久| 国产一区福利在线| 欧美一区二区视频观看视频| 综合久久给合久久狠狠狠97色| 经典三级在线一区| 5858s免费视频成人| 一片黄亚洲嫩模| 91丝袜美女网| 中文在线一区二区| 国产在线精品一区二区 | 亚洲一区二区三区四区五区黄| 国产91露脸合集magnet| 精品国产1区二区| 免费欧美在线视频| 欧美猛男超大videosgay| 亚洲18影院在线观看| 蜜臀av性久久久久蜜臀aⅴ四虎 | 风间由美一区二区av101| 精品国产一区二区三区四区四| 日韩不卡在线观看日韩不卡视频| 蜜臀av国产精品久久久久 | 亚洲精品综合在线| 成人免费av网站| 国产日韩欧美电影| 国产在线播精品第三| 亚洲精品在线观| 狠狠色丁香久久婷婷综合丁香| 欧美大片拔萝卜| 久久99深爱久久99精品| 欧美成人精精品一区二区频| 奇米影视在线99精品| 777久久久精品| 美国十次了思思久久精品导航| 日韩一区二区电影在线| 蜜桃视频一区二区| www国产精品av| 国产成人午夜99999| 色婷婷av一区二区三区大白胸| 亚洲色图丝袜美腿| 欧美性猛交xxxx乱大交退制版 | 美女免费视频一区| 在线播放亚洲一区| 日本免费新一区视频| 日韩你懂的在线观看| 韩国毛片一区二区三区| 欧美精品一区男女天堂| 国产乱码精品一区二区三区av| 国产精品久久久久一区 | 精品久久五月天| 国产成人免费视频一区| 国产农村妇女精品| 亚洲自拍偷拍九九九| 99久久综合精品| 亚洲.国产.中文慕字在线| 欧美一级在线视频| 国产精品系列在线播放| 亚洲日本丝袜连裤袜办公室| 欧美色精品天天在线观看视频| 捆绑调教一区二区三区| 国产日韩精品一区二区三区在线| 91丝袜美女网| 日韩va亚洲va欧美va久久| 亚洲精品在线电影| 91啪在线观看| 亚洲免费在线播放| 日韩欧美一区在线| 粉嫩aⅴ一区二区三区四区五区 | 天堂av在线一区| 精品精品欲导航| heyzo一本久久综合| 亚洲综合一区二区三区| 日韩精品在线一区二区| 成人深夜福利app| 午夜精品成人在线| 久久精品视频一区| 欧洲亚洲国产日韩| 精品无人码麻豆乱码1区2区 | 亚洲第一主播视频| 久久久综合视频| 日本国产一区二区| 六月丁香综合在线视频| 亚洲人成人一区二区在线观看| 欧美一级搡bbbb搡bbbb| 99久久综合色| 国模冰冰炮一区二区| 一区二区三区精品在线观看| 久久婷婷色综合| 欧美日韩电影在线播放| 国产传媒欧美日韩成人| 亚洲伊人色欲综合网| 日本一区二区三区在线不卡| 欧美老肥妇做.爰bbww| 成人理论电影网| 午夜欧美大尺度福利影院在线看 | 九九**精品视频免费播放| **性色生活片久久毛片| 精品国产一区二区三区久久久蜜月 | 欧美一级电影网站| 99re亚洲国产精品| 国产一区美女在线| 偷偷要91色婷婷| 亚洲激情自拍视频| 欧美极品美女视频| 欧美va在线播放| 欧美蜜桃一区二区三区| 91精彩视频在线| av一区二区不卡| 国产成人综合视频| 久久 天天综合| 日本成人在线电影网| 亚洲在线观看免费视频| 国产精品白丝在线| 日本一区二区三区在线不卡| 精品国产一区二区三区久久久蜜月 | 欧美一级日韩一级| 欧美高清hd18日本| 欧美综合欧美视频| 色综合一个色综合| 波多野结衣在线aⅴ中文字幕不卡| 国内不卡的二区三区中文字幕| 日日摸夜夜添夜夜添亚洲女人| 亚洲精品va在线观看| 亚洲六月丁香色婷婷综合久久 | 久久先锋影音av鲁色资源网| 国产精品一线二线三线精华| 蜜臀va亚洲va欧美va天堂| 视频一区中文字幕| 亚洲小说欧美激情另类|