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

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

?? unixdrv.c

?? VXWORKS 源碼
?? 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一区二区三区免费野_久草精品视频
国产日产亚洲精品系列| 日韩一级完整毛片| 毛片不卡一区二区| 国产精品麻豆欧美日韩ww| 欧美日韩一区二区欧美激情| 国产一区二区毛片| 午夜精品在线看| 亚洲欧美综合在线精品| 精品国产精品网麻豆系列| 欧美午夜片在线看| 成人免费毛片高清视频| 蜜桃久久久久久| 亚洲精品大片www| 久久精品人人做| 日韩久久免费av| 91精品一区二区三区久久久久久 | 一区二区三区加勒比av| 久久精品亚洲国产奇米99| 91精品国产黑色紧身裤美女| 色系网站成人免费| 波多野结衣在线aⅴ中文字幕不卡| 秋霞午夜鲁丝一区二区老狼| 亚洲免费三区一区二区| 中文字幕欧美日韩一区| 久久一区二区三区四区| 欧美va在线播放| 欧美色综合影院| 在线免费观看视频一区| 94色蜜桃网一区二区三区| 成人一区二区视频| 国产精品一区二区三区四区| 久久精品国产精品青草| 丝袜a∨在线一区二区三区不卡| 亚洲精品久久久久久国产精华液| 中文字幕精品综合| 国产欧美日韩亚州综合| 国产亚洲自拍一区| 国产三区在线成人av| 久久蜜臀中文字幕| 欧美国产日本韩| 中国av一区二区三区| 国产欧美精品国产国产专区| 久久久久久电影| 亚洲国产精品激情在线观看| 国产欧美日韩视频在线观看| 国产精品久久久久一区| 中文字幕一区二区三| 五月激情综合婷婷| 亚洲已满18点击进入久久| 亚洲精品高清视频在线观看| 日韩一区在线免费观看| 亚洲免费观看在线视频| 亚洲男人的天堂在线观看| 亚洲激情第一区| 日日夜夜精品视频天天综合网| 天使萌一区二区三区免费观看| 日韩av电影免费观看高清完整版在线观看| 日本欧美大码aⅴ在线播放| 日韩av高清在线观看| 久久精品国产99| 高清在线成人网| 91丝袜美女网| 欧美精品视频www在线观看| 日韩欧美精品在线| 中文字幕 久热精品 视频在线 | 久久国产精品一区二区| 国产美女一区二区| 99re热这里只有精品免费视频| 91麻豆swag| 日韩三级精品电影久久久| 2022国产精品视频| 亚洲三级在线免费观看| 轻轻草成人在线| 成人sese在线| 欧美一区二区三区四区在线观看 | 欧美三日本三级三级在线播放| 欧美一二三四区在线| 国产精品青草久久| 亚洲国产精品一区二区尤物区| 精品一区二区三区久久| av资源网一区| 欧美一区二区三区免费观看视频| 国产午夜一区二区三区| 亚洲国产欧美一区二区三区丁香婷| 免费在线观看日韩欧美| 9久草视频在线视频精品| 91精品国产综合久久福利软件 | 欧美午夜精品免费| 久久综合九色综合97婷婷| 亚洲免费电影在线| 精彩视频一区二区三区| 欧美在线视频日韩| 国产亚洲一本大道中文在线| 亚洲一区二区黄色| 国产.欧美.日韩| 在线播放91灌醉迷j高跟美女 | 欧美一区二区久久| 中文字幕在线一区免费| 蜜臀av性久久久久蜜臀aⅴ| 91蜜桃免费观看视频| 精品国产露脸精彩对白| 亚洲高清一区二区三区| 岛国av在线一区| 91精品婷婷国产综合久久性色 | 亚洲欧洲日韩一区二区三区| 久久激五月天综合精品| 欧洲av在线精品| 国产精品污污网站在线观看| 免费看日韩a级影片| 欧美视频在线一区二区三区| 国产日产精品1区| 麻豆国产精品777777在线| 色欧美88888久久久久久影院| 久久久久国产一区二区三区四区 | 亚洲精品一线二线三线无人区| 亚洲一区二区三区在线播放| 99久久国产综合精品色伊| 国产偷国产偷亚洲高清人白洁| 久久精品国产77777蜜臀| 91麻豆精品国产91久久久资源速度 | 精品一区二区三区av| 欧美日韩性生活| 亚洲一区二区三区四区五区中文| 国产成人精品亚洲午夜麻豆| 久久影院视频免费| 精品一区二区三区在线播放| 日韩视频一区二区三区| 午夜欧美在线一二页| 欧美丝袜丝nylons| 亚洲国产一区二区三区青草影视| 91女神在线视频| 亚洲乱码精品一二三四区日韩在线 | 免费美女久久99| 在线综合+亚洲+欧美中文字幕| 亚洲成av人片一区二区| 欧美日韩亚洲综合一区二区三区| 亚洲黄网站在线观看| 欧美中文字幕亚洲一区二区va在线 | 不卡在线视频中文字幕| 亚洲欧洲日产国码二区| 一本一道综合狠狠老| 亚洲国产成人porn| 欧美日韩亚洲综合一区二区三区 | 亚洲sss视频在线视频| 欧美图区在线视频| 天堂久久一区二区三区| 欧美一区二区三区影视| 久久国内精品自在自线400部| 精品国产污污免费网站入口 | 久久99精品国产麻豆不卡| 欧美xxx久久| 麻豆国产精品一区二区三区| 精品国产伦一区二区三区观看体验| 日本少妇一区二区| 精品福利一二区| 成人午夜激情影院| 亚洲精选视频免费看| 欧美男男青年gay1069videost| 日韩电影免费在线看| 国产婷婷精品av在线| 91免费精品国自产拍在线不卡| 亚洲一二三四久久| 欧美一级电影网站| 成人午夜精品在线| 久久国产夜色精品鲁鲁99| 国产丝袜欧美中文另类| 色综合天天综合| 丝袜诱惑亚洲看片| 中文字幕国产一区二区| 在线精品亚洲一区二区不卡| 蜜桃av一区二区三区| 亚洲国产精品成人综合色在线婷婷| 91麻豆产精品久久久久久 | 不卡的av电影| 亚洲国产欧美在线人成| 精品久久国产字幕高潮| 99久久国产综合精品女不卡| 三级一区在线视频先锋 | 91视频在线观看免费| 舔着乳尖日韩一区| 国产精品久久综合| 在线成人小视频| eeuss国产一区二区三区| 美女免费视频一区| 中文字幕在线观看不卡| 日韩三级在线观看| 91九色最新地址| 韩国精品主播一区二区在线观看 | 国产在线国偷精品免费看| 亚洲日穴在线视频| 久久婷婷色综合| 欧美日韩一区中文字幕| 成人免费毛片a| 麻豆精品蜜桃视频网站| 亚洲综合在线免费观看| 久久这里只精品最新地址| 69av一区二区三区| 日本精品视频一区二区| 成人伦理片在线| 久久不见久久见免费视频7|