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

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

?? mkboot.c

?? Kontron的ETX-P3T的BSP的源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
	        {	        printErr ("ctrl is out of range (0-%d).\n", ATA_MAX_CTRLS -1);                free (dosVolBootSec);                free (lbaSectorOne);	        return (ERROR);	        }            if ((UINT)drive >= ATA_MAX_DRIVES)	        {	        printErr ("drive is out of range(0-%d).\n", ATA_MAX_DRIVES -1);                free (dosVolBootSec);                free (lbaSectorOne);	        return (ERROR);	        }	            /*                                                                     * ATA disks formatted via Windows always have partitions.             * ATA disks formatted via vxWorks may have partitions or              * they may have the dosFs volume start on LBA sector one             * without any partition.             *             * If the dosFs volume starts on LBA sector one, then                  * the VXDOS, or VXEXT strings will be present there.           	     *             * If the partition table (Master Boot Record) resides                 * on LBA sector one, these strings will not be present.	     *	     * MSDOS compatible hard discs always have FDISK style              * partitions. For those we must find the bootable partition              * sector and modify the dosFs volumes boot sector therein.	     * The master boot record, the initial partition table,	     * is always found on LBA sector one on MSDOS hard discs.	     *	     * Note that the partition should have a FAT12 or FAT16	     * dosFs volume formatted upon it.  FAT32 will not work. 	     */            ataRaw.cylinder   = 0;            ataRaw.head       = 0;            ataRaw.sector     = 1;            ataRaw.pBuf       = lbaSectorOne;            ataRaw.nSecs      = 1;            ataRaw.direction  = 0;            ataRawio (ctrl, drive, &ataRaw);	    pSys	= &lbaSectorOne[DOS_BOOT_SYS_ID];	    pPart	= (DOS_PART_TBL *)&lbaSectorOne[DOS_BOOT_PART_TBL];    	    if ((strncmp(pSys, VXDOS, strlen(VXDOS)) != 0) &&        	(strncmp(pSys, VXEXT, strlen(VXEXT)) != 0))        	{	        for (ix = 0; ix < 4; ix++)		    {	            /* 		     * Note that we are supporting partitions		     * that could have FAT32 filesystems upon them.		     * vxLd 1.x will ONLY work on FAT12 and FAT16		     * filesystem, it will NOT work on FAT32,		     * but we should still accept the partition types.		     * Note that dosFsVolFormat can force FAT type.		     */		    if (pPart->dospt_status == PART_IS_BOOTABLE)		        if ((pPart->dospt_type == PART_TYPE_DOS12 ) ||		            (pPart->dospt_type == PART_TYPE_DOS3  ) ||		            (pPart->dospt_type == PART_TYPE_DOS4  ) ||		            (pPart->dospt_type == PART_TYPE_DOS32 ) ||		            (pPart->dospt_type == PART_TYPE_DOS32X) ||		            (pPart->dospt_type == PART_TYPE_WIN95_D4))			    {			    found = TRUE;			    break;			    }		    pPart++;		    }	    	        if (!found)		    {                    printErr ("Can't find the primary DOS partition.\n");                    free (dosVolBootSec);                    free (lbaSectorOne);	            return (ERROR);		    }	        ataRaw.cylinder	= (pPart->dospt_startSec & 0xf0) >> 4;	        ataRaw.head    	= pPart->dospt_startHead;                ataRaw.sector  	= pPart->dospt_startSec & 0x0f;                ataRaw.pBuf	= dosVolBootSec;                ataRawio (ctrl, drive, &ataRaw); /* read the boot sector */		offset = pPart->dospt_absSec;	        if (strncmp((char *)&dosVolBootSec[3], VXEXT, 					 strlen(VXEXT)) == 0)		    {		    useLongNames = TRUE;		    }                if (vxsysDebug)            	    printErr ("UseLongNames is %s\n", 			      (useLongNames) ? "TRUE":"FALSE");		}	    else  /* disk is formatted with vxWorks without partition */		{	        if (strncmp(pSys, VXEXT, strlen(VXEXT)) == 0)		    {		    useLongNames = TRUE;		    }                if (vxsysDebug)            	    printErr ("UseLongNames is %s\n", 			      (useLongNames) ? "TRUE":"FALSE");                ataRaw.cylinder   = 0;	/* read the dosFs volume boot sector */                ataRaw.head       = 0;                ataRaw.sector     = 1;                ataRaw.pBuf       = dosVolBootSec;                ataRaw.nSecs      = 1;                ataRaw.direction  = 0;                ataRawio (ctrl, drive, &ataRaw);		}	                /*             * Below, we attempt to avoid corrupting a FAT32 image.             * For FAT32, the 16bit sectors per FAT field (at offset             * 0x16 in a MSDOS FAT volumes boot record) will allways             * be zero.  For FAT12, FAT16 it is always non-zero.             * We will not continue if this offset is zero.             */            if ((UINT16) (0x0000) == (UINT16)(dosVolBootSec [0x16]))                 {                printErr ("\nThis appears to be a FAT32 volume.\n");                printErr ("Sectors per FAT, offset 0x16 in the volumes "                          "boot record is zero.\n");                printErr ("mkbootAta supports only FAT16 or FAT12.\n");                printErr ("dosFsVolFormat can force a FAT type.\n");                free (dosVolBootSec);                free (lbaSectorOne);                return (ERROR);                }            if (vxsysBootsec)	        {	        dosVolBootSec[0] = 0xeb;	/* modify the boot sector */	        dosVolBootSec[1] = 0x3c;	        dosVolBootSec[2] = 0x90;                bcopy (bootStrap, (char *)&dosVolBootSec[0x3e], 				sizeof (bootStrap));                ataRaw.direction  = 1;		/* write the boot sector */                ataRawio (ctrl, drive, &ataRaw);	        }	    if ((pBlkDev = ataDevCreate (ctrl, drive, 0, offset)) == NULL)		{		printErr ("Error during fdDevCreate: %x\n", errnoGet ());                free (dosVolBootSec);                free (lbaSectorOne);		return (ERROR);		}	    break;#ifdef INCLUDE_TFFS	case VXSYS_TFFS:            if ((UINT)drive >= TFFS_MAX_DRIVES)	        {	        printErr ("drive is out of range (0-%d).\n", 				TFFS_MAX_DRIVES-1);                free (dosVolBootSec);                free (lbaSectorOne);	        return (ERROR);	        }	    /* mount the TFFS */	    if ((pBlkDev = tffsDevCreate (drive, removable)) == NULL)		{		printErr ("Error during fdDevCreate: %x\n", errnoGet ());                free (dosVolBootSec);                free (lbaSectorOne);		return (ERROR);		}            /* read the partition table */            tffsRawio (drive, TFFS_ABS_READ, 0, 1, (int)&lbaSectorOne);	    offset	= 0;	    pSys	= &lbaSectorOne[DOS_BOOT_SYS_ID];	    pPart	= (DOS_PART_TBL *)&lbaSectorOne[DOS_BOOT_PART_TBL];    	    if ((strncmp(pSys, VXDOS, strlen(VXDOS)) != 0) &&        	(strncmp(pSys, VXEXT, strlen(VXEXT)) != 0))        	{	        for (ix = 0; ix < 4; ix++)		    {		    if (pPart->dospt_status == PART_IS_BOOTABLE)		        if ((pPart->dospt_type == PART_TYPE_DOS12 ) ||		            (pPart->dospt_type == PART_TYPE_DOS3  ) ||		            (pPart->dospt_type == PART_TYPE_DOS4  ) ||		            (pPart->dospt_type == PART_TYPE_DOS32 ) ||		            (pPart->dospt_type == PART_TYPE_DOS32X) ||		            (pPart->dospt_type == PART_TYPE_WIN95_D4))			    {			    found = TRUE;			    break;			    }		    pPart++;		    }	    	        if (found)		    offset = pPart->dospt_absSec;		}            /* read the boot sector */            tffsRawio (drive, TFFS_ABS_READ, offset, 1, (int)&dosVolBootSec);	    if (strncmp((char *)&dosVolBootSec[3], VXEXT, strlen(VXEXT)) == 0)		{		useLongNames = TRUE;		}            if (vxsysDebug)                printErr ("UseLongNames is %s\n", 			  (useLongNames) ? "TRUE":"FALSE");            /*             * Below, we attempt to avoid corrupting a FAT32 image.             * For FAT32, the 16bit sectors per FAT field (at offset             * 0x16 in a MSDOS FAT volumes boot record) will allways             * be zero.  For FAT12, FAT16 it is always non-zero.             * We will not continue if this offset is zero.             */            if ((UINT16)(0x0000) == (UINT16)(dosVolBootSec [0x16]))                 {                printErr ("\nThis appears to be a FAT32 volume.\n");                printErr ("Sectors per FAT, offset 0x16 in the volumes "                          "boot record is zero.\n");                printErr ("mkbootTffs supports only FAT16 or FAT12.\n");                printErr ("dosFsVolFormat can force a FAT type.\n");                free (dosVolBootSec);                free (lbaSectorOne);                return (ERROR);                }            if (vxsysBootsec)	        {	        dosVolBootSec[0] = 0xeb;	/* modify the boot sector */	        dosVolBootSec[1] = 0x3c;	        dosVolBootSec[2] = 0x90;                bcopy (bootStrap, (char *)&dosVolBootSec[0x3e], 				sizeof (bootStrap));                /* write the boot sector */                tffsRawio (drive, TFFS_ABS_WRITE, offset, 1, 				(int)&dosVolBootSec);	        }	    break;#endif /*INCLUDE_TFFS */	default:	    printErr ("unknown device (0-1).\n");            free (dosVolBootSec);            free (lbaSectorOne);	    return (ERROR);	}    if (vxsysBootrom)	{        /* read the header to get a text-size and a data-size */        if ((inFd = open (in, O_RDONLY, 0644)) == ERROR)            {            printErr ("Can't open \"%s\"\n", in);            free (dosVolBootSec);            free (lbaSectorOne);	    return (ERROR);	    }        if ((read (inFd, (char *)&hdr, sizeof(hdr))) == ERROR)	    {	    printErr ("Error during read header: %x\n", errnoGet ());            free (dosVolBootSec);            free (lbaSectorOne);	    return (ERROR);	    }        if (vxsysDebug)            printErr ("text=0x%x data=0x%x\n", hdr.a_text, hdr.a_data);	/* check the magic number to find out if it is a.out or binary */	if ((hdr.a_magic & AOUT_MAGIC_MASK) == AOUT_MAGIC)	/* a.out */	    {            bytes = hdr.a_text + hdr.a_data;	    }	else							/* binary */	    {            bytes = ROM_SIZE;	    close (inFd);	    if ((inFd = open (in, O_RDONLY, 0644)) == ERROR)		{		printErr ("Can't open \"%s\"\n", in);                free (dosVolBootSec);                free (lbaSectorOne);		return (ERROR);		}	    }                                                                               if (NULL == dosFsVolDescGet(VXSYS_DOSDEV, (u_char **)&pSys))            {            if ((dosFsDevInit (VXSYS_DOSDEV, pBlkDev, NULL)) == NULL)	        {	        printErr ("Error during dosFsDevInit: %x\n", errnoGet ());                free (dosVolBootSec);                free (lbaSectorOne);	        return (ERROR);	        }            }	if (useLongNames == FALSE)	    {            if ((outFd = open (VXSYS_FILE, O_CREAT | O_RDWR, 0644)) == ERROR)	        {                close (inFd);                printErr ("Can't open \"%s\"\n", VXSYS_FILE);                free (dosVolBootSec);                free (lbaSectorOne);	        return (ERROR);	        }	    }	else /* useLongNames file name */	    {            if ((outFd = open (VXSYS_FILE_VXEXT, O_CREAT | O_RDWR, 0644)) 		== ERROR)	        {                close (inFd);                printErr ("Can't open \"%s\"\n", VXSYS_FILE);                free (dosVolBootSec);                free (lbaSectorOne);	        return (ERROR);	        }	    }        if (ioctl (outFd, FIOCONTIG, bytes) == ERROR)	    {	    printErr ("Error during ioctl FIOCONTIG: %x\n", errnoGet ());            free (dosVolBootSec);            free (lbaSectorOne);	    return (ERROR);	    }        /* read text and data, write them to the diskette */        for (ix = 0; ix < bytes; ix += MAX_SECTOR_SIZE)	    {	    if (read (inFd, dosVolBootSec, MAX_SECTOR_SIZE) == ERROR)	        {	        printErr ("Error during read file: %x\n", errnoGet ());                free (dosVolBootSec);                free (lbaSectorOne);	        return (ERROR);	        }	    if (write (outFd, dosVolBootSec, MAX_SECTOR_SIZE) == ERROR)	        {	        printErr ("Error during write fd: %x\n", errnoGet ());                free (dosVolBootSec);                free (lbaSectorOne);	        return (ERROR);	        }	    }        free (dosVolBootSec);        free (lbaSectorOne);	iosDevDelete (iosDevFind (VXSYS_DOSDEV,&pSys));        close (inFd);        close (outFd);        }    return (OK);    }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人丝袜高跟foot| 亚洲国产经典视频| 中文一区一区三区高中清不卡| 亚洲精品乱码久久久久久| 毛片av一区二区| 欧洲一区在线电影| 国产精品少妇自拍| 精品一区二区在线观看| 欧美视频三区在线播放| 亚洲国产精品激情在线观看| 另类欧美日韩国产在线| 欧美影院午夜播放| 综合色天天鬼久久鬼色| 国产精品一卡二卡在线观看| 在线播放欧美女士性生活| 亚洲精品写真福利| 99国产麻豆精品| 日本一区二区三区在线观看| 蜜臀a∨国产成人精品| 欧美色综合网站| 有码一区二区三区| 91麻豆精东视频| 亚洲欧洲精品一区二区三区不卡| 国产精品一区在线观看乱码| 欧美r级电影在线观看| 蜜臀99久久精品久久久久久软件| 欧美精三区欧美精三区| 日日夜夜精品视频免费| 欧美性高清videossexo| 亚洲第一主播视频| 欧美日韩国产综合一区二区三区 | 国产乱妇无码大片在线观看| 精品国免费一区二区三区| 蜜臀av一区二区三区| 欧美一区二区三区视频免费 | 椎名由奈av一区二区三区| 高清在线观看日韩| 亚洲欧美综合色| 色综合久久天天| 亚洲综合在线视频| 欧美一级生活片| 久久99国产精品久久99| 亚洲精品在线三区| 成人av资源下载| 一区二区三区精品在线观看| 欧美在线999| 免费高清在线视频一区·| 精品国产凹凸成av人网站| 国产成人午夜电影网| 最近日韩中文字幕| 欧美少妇性性性| 精品一区二区久久久| 亚洲国产成人午夜在线一区| 色综合久久久久综合| 日韩在线卡一卡二| 国产午夜精品一区二区三区嫩草 | 欧美一区二区视频观看视频 | 青娱乐精品视频在线| 国产亚洲人成网站| 91福利小视频| 麻豆成人在线观看| 1000精品久久久久久久久| 欧美日韩一区三区四区| 韩国欧美一区二区| 一区二区三区中文字幕电影 | 国产精品538一区二区在线| 亚洲欧洲精品一区二区三区不卡| 欧美在线不卡一区| 国产成人在线视频免费播放| 亚洲欧美一区二区三区孕妇| 日韩视频在线观看一区二区| www.成人网.com| 日本欧美大码aⅴ在线播放| 国产精品超碰97尤物18| 91麻豆精品91久久久久久清纯| 国产不卡在线一区| 视频一区欧美日韩| 亚洲色图清纯唯美| 久久久久国产免费免费| 欧美日韩精品一区二区| 成人免费观看视频| 精品亚洲免费视频| 亚洲va欧美va人人爽午夜| 18欧美亚洲精品| 精品日韩在线观看| 在线电影一区二区三区| 色综合久久九月婷婷色综合| 国产麻豆日韩欧美久久| 青青草视频一区| 亚洲一区二区三区四区五区中文 | 欧美国产亚洲另类动漫| 欧美高清你懂得| 在线免费精品视频| 不卡在线视频中文字幕| 国产一区二区三区| 捆绑调教一区二区三区| 午夜欧美一区二区三区在线播放| 国产精品美女久久久久高潮| 久久美女艺术照精彩视频福利播放| 在线成人av影院| 欧美日韩国产大片| 日本高清不卡在线观看| 91免费国产在线| 99久久亚洲一区二区三区青草| 国产激情一区二区三区四区| 韩国成人福利片在线播放| 精品综合久久久久久8888| 蜜桃精品视频在线观看| 欧美aa在线视频| 久久99国产精品麻豆| 韩国毛片一区二区三区| 国产乱国产乱300精品| 国产麻豆视频精品| 成人涩涩免费视频| 国产成人超碰人人澡人人澡| 国产美女精品一区二区三区| 极品少妇xxxx精品少妇偷拍| 美女视频黄 久久| 久久99精品久久久久久国产越南| 激情六月婷婷综合| 国产高清不卡二三区| 不卡电影免费在线播放一区| 色中色一区二区| 欧美在线免费观看视频| 欧美高清视频在线高清观看mv色露露十八| 欧美性三三影院| 日韩欧美一区二区免费| 国产午夜精品一区二区| 中文字幕一区二区三中文字幕| 亚洲人成7777| 婷婷久久综合九色综合绿巨人| 日韩国产欧美三级| 久久精品99国产精品日本| 国产成人鲁色资源国产91色综| 99re8在线精品视频免费播放| 日本精品视频一区二区| 日韩视频一区二区三区在线播放 | 成人av中文字幕| 欧美在线视频全部完| 欧美岛国在线观看| 欧美国产精品久久| 秋霞电影一区二区| 岛国av在线一区| 欧美日韩国产a| 久久九九全国免费| 一区二区在线看| 精品一区二区三区影院在线午夜| 高清国产一区二区| 欧美日韩一区不卡| 欧美激情一区二区三区四区| 一区二区视频在线看| 久久97超碰国产精品超碰| 色综合咪咪久久| 26uuu亚洲| 一区二区三区在线视频免费观看| 久久国产精品99精品国产| 91麻豆免费观看| 久久久久久久精| 午夜精品成人在线视频| jiyouzz国产精品久久| 日韩精品一区二| 性久久久久久久久久久久| 国产精品996| 制服.丝袜.亚洲.另类.中文 | 精品日韩99亚洲| 亚洲欧美日韩国产一区二区三区| 另类小说一区二区三区| 色综合天天在线| 欧美国产精品一区二区| 麻豆一区二区三| 欧美精品久久99| 亚洲精品国产高清久久伦理二区| 国产呦萝稀缺另类资源| 欧美一区二区在线观看| 午夜一区二区三区在线观看| 成人教育av在线| 久久久午夜精品理论片中文字幕| 日韩 欧美一区二区三区| 欧洲av在线精品| 一区二区高清视频在线观看| 成人av电影免费观看| 久久亚洲欧美国产精品乐播| 奇米色一区二区| 欧美精品日韩一区| 一区二区三区四区中文字幕| av在线免费不卡| 中文字幕中文在线不卡住| 风间由美性色一区二区三区| 久久精品人人做人人爽人人 | 日韩国产精品91| 欧美乱妇20p| 亚洲v中文字幕| 678五月天丁香亚洲综合网| 亚欧色一区w666天堂| 欧美日韩视频不卡| 三级欧美在线一区| 欧美一级艳片视频免费观看| 美女爽到高潮91| 久久一留热品黄| 国产mv日韩mv欧美|