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

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

?? msdos.c

?? linux和2410結合開發 用他可以生成2410所需的zImage文件
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* *  fs/partitions/msdos.c * *  Code extracted from drivers/block/genhd.c *  Copyright (C) 1991-1998  Linus Torvalds * *  Thanks to Branko Lankester, lankeste@fwi.uva.nl, who found a bug *  in the early extended-partition checks and added DM partitions * *  Support for DiskManager v6.0x added by Mark Lord, *  with information provided by OnTrack.  This now works for linux fdisk *  and LILO, as well as loadlin and bootln.  Note that disks other than *  /dev/hda *must* have a "DOS" type 0x51 partition in the first slot (hda1). * *  More flexible handling of extended partitions - aeb, 950831 * *  Check partition table on IDE disks for common CHS translations * *  Re-organised Feb 1998 Russell King */#include <linux/config.h>#include <linux/fs.h>#include <linux/genhd.h>#include <linux/kernel.h>#include <linux/major.h>#include <linux/string.h>#include <linux/blk.h>#ifdef CONFIG_BLK_DEV_IDE#include <linux/ide.h>	/* IDE xlate */#endif /* CONFIG_BLK_DEV_IDE */#include <asm/system.h>#include "check.h"#include "msdos.h"#if CONFIG_BLK_DEV_MDextern void md_autodetect_dev(kdev_t dev);#endif/* * Many architectures don't like unaligned accesses, which is * frequently the case with the nr_sects and start_sect partition * table entries. */#include <asm/unaligned.h>#define SYS_IND(p)	(get_unaligned(&p->sys_ind))#define NR_SECTS(p)	({ __typeof__(p->nr_sects) __a =	\				get_unaligned(&p->nr_sects);	\				le32_to_cpu(__a); \			})#define START_SECT(p)	({ __typeof__(p->start_sect) __a =	\				get_unaligned(&p->start_sect);	\				le32_to_cpu(__a); \			})static inline int is_extended_partition(struct partition *p){	return (SYS_IND(p) == DOS_EXTENDED_PARTITION ||		SYS_IND(p) == WIN98_EXTENDED_PARTITION ||		SYS_IND(p) == LINUX_EXTENDED_PARTITION);}/* * partition_name() formats the short partition name into the supplied * buffer, and returns a pointer to that buffer. * Used by several partition types which makes conditional inclusion messy, * use __attribute__ ((unused)) instead. */static char __attribute__ ((unused))	*partition_name (struct gendisk *hd, int minor, char *buf){#ifdef CONFIG_DEVFS_FS	sprintf(buf, "p%d", (minor & ((1 << hd->minor_shift) - 1)));	return buf;#else	return disk_name(hd, minor, buf);#endif}#define MSDOS_LABEL_MAGIC1	0x55#define MSDOS_LABEL_MAGIC2	0xAAstatic inline intmsdos_magic_present(unsigned char *p){	return (p[0] == MSDOS_LABEL_MAGIC1 && p[1] == MSDOS_LABEL_MAGIC2);}/* * Create devices for each logical partition in an extended partition. * The logical partitions form a linked list, with each entry being * a partition table with two entries.  The first entry * is the real data partition (with a start relative to the partition * table start).  The second is a pointer to the next logical partition * (with a start relative to the entire extended partition). * We do not create a Linux partition for the partition tables, but * only for the actual data partitions. */static void extended_partition(struct gendisk *hd, struct block_device *bdev,			int minor, unsigned long first_size, int *current_minor){	struct partition *p;	Sector sect;	unsigned char *data;	unsigned long first_sector, this_sector, this_size;	int mask = (1 << hd->minor_shift) - 1;	int sector_size = get_hardsect_size(to_kdev_t(bdev->bd_dev)) / 512;	int loopct = 0;		/* number of links followed				   without finding a data partition */	int i;	this_sector = first_sector = hd->part[minor].start_sect;	this_size = first_size;	while (1) {		if (++loopct > 100)			return;		if ((*current_minor & mask) == 0)			return;		data = read_dev_sector(bdev, this_sector, &sect);		if (!data)			return;		if (!msdos_magic_present(data + 510))			goto done; 		p = (struct partition *) (data + 0x1be);		/*		 * Usually, the first entry is the real data partition,		 * the 2nd entry is the next extended partition, or empty,		 * and the 3rd and 4th entries are unused.		 * However, DRDOS sometimes has the extended partition as		 * the first entry (when the data partition is empty),		 * and OS/2 seems to use all four entries.		 */		/* 		 * First process the data partition(s)		 */		for (i=0; i<4; i++, p++) {			unsigned long offs, size, next;			if (!NR_SECTS(p) || is_extended_partition(p))				continue;			/* Check the 3rd and 4th entries -			   these sometimes contain random garbage */			offs = START_SECT(p)*sector_size;			size = NR_SECTS(p)*sector_size;			next = this_sector + offs;			if (i >= 2) {				if (offs + size > this_size)					continue;				if (next < first_sector)					continue;				if (next + size > first_sector + first_size)					continue;			}			add_gd_partition(hd, *current_minor, next, size);#if CONFIG_BLK_DEV_MD			if (SYS_IND(p) == LINUX_RAID_PARTITION) {			    md_autodetect_dev(MKDEV(hd->major,*current_minor));			}#endif			(*current_minor)++;			loopct = 0;			if ((*current_minor & mask) == 0)				goto done;		}		/*		 * Next, process the (first) extended partition, if present.		 * (So far, there seems to be no reason to make		 *  extended_partition()  recursive and allow a tree		 *  of extended partitions.)		 * It should be a link to the next logical partition.		 * Create a minor for this just long enough to get the next		 * partition table.  The minor will be reused for the next		 * data partition.		 */		p -= 4;		for (i=0; i<4; i++, p++)			if (NR_SECTS(p) && is_extended_partition(p))				break;		if (i == 4)			goto done;	 /* nothing left to do */		this_sector = first_sector + START_SECT(p) * sector_size;		this_size = NR_SECTS(p) * sector_size;		minor = *current_minor;		put_dev_sector(sect);	}done:	put_dev_sector(sect);}/* james@bpgc.com: Solaris has a nasty indicator: 0x82 which also   indicates linux swap.  Be careful before believing this is Solaris. */static voidsolaris_x86_partition(struct gendisk *hd, struct block_device *bdev,		int minor, int *current_minor){#ifdef CONFIG_SOLARIS_X86_PARTITION	long offset = hd->part[minor].start_sect;	Sector sect;	struct solaris_x86_vtoc *v;	struct solaris_x86_slice *s;	int mask = (1 << hd->minor_shift) - 1;	int i;	char buf[40];	v = (struct solaris_x86_vtoc *)read_dev_sector(bdev, offset+1, &sect);	if (!v)		return;	if (le32_to_cpu(v->v_sanity) != SOLARIS_X86_VTOC_SANE) {		put_dev_sector(sect);		return;	}	printk(" %s: <solaris:", partition_name(hd, minor, buf));	if (le32_to_cpu(v->v_version) != 1) {		printk("  cannot handle version %d vtoc>\n",			le32_to_cpu(v->v_version));		put_dev_sector(sect);		return;	}	for (i=0; i<SOLARIS_X86_NUMSLICE; i++) {		if ((*current_minor & mask) == 0)			break;		s = &v->v_slice[i];		if (s->s_size == 0)			continue;		printk(" [s%d]", i);		/* solaris partitions are relative to current MS-DOS		 * one but add_gd_partition starts relative to sector		 * zero of the disk.  Therefore, must add the offset		 * of the current partition */		add_gd_partition(hd, *current_minor,				 le32_to_cpu(s->s_start)+offset,				 le32_to_cpu(s->s_size));		(*current_minor)++;	}	put_dev_sector(sect);	printk(" >\n");#endif}#ifdef CONFIG_BSD_DISKLABELstatic voidcheck_and_add_bsd_partition(struct gendisk *hd, struct bsd_partition *bsd_p,	int baseminor, int *current_minor){	int i, bsd_start, bsd_size;	bsd_start = le32_to_cpu(bsd_p->p_offset);	bsd_size = le32_to_cpu(bsd_p->p_size);	/* check relative position of already allocated partitions */	for (i = baseminor+1; i < *current_minor; i++) {		int start = hd->part[i].start_sect;		int size = hd->part[i].nr_sects;		if (start+size <= bsd_start || start >= bsd_start+bsd_size)			continue;	/* no overlap */		if (start == bsd_start && size == bsd_size)			return;		/* equal -> no need to add */		if (start <= bsd_start && start+size >= bsd_start+bsd_size) {			/* bsd living within dos partition */#ifdef DEBUG_BSD_DISKLABEL			printk("w: %d %ld+%ld,%d+%d", 			       i, start, size, bsd_start, bsd_size);#endif			break;		/* ok */		}		/* ouch: bsd and linux overlap */#ifdef DEBUG_BSD_DISKLABEL		printk("???: %d %ld+%ld,%d+%d",		       i, start, size, bsd_start, bsd_size);#endif		printk("???");		return;	}	add_gd_partition(hd, *current_minor, bsd_start, bsd_size);	(*current_minor)++;}/*  * Create devices for BSD partitions listed in a disklabel, under a * dos-like partition. See extended_partition() for more information. */static void do_bsd_partition(struct gendisk *hd, struct block_device *bdev,	int minor, int *current_minor, char *name, int max_partitions){	long offset = hd->part[minor].start_sect;	Sector sect;	struct bsd_disklabel *l;	struct bsd_partition *p;	int mask = (1 << hd->minor_shift) - 1;	int baseminor = (minor & ~mask);	char buf[40];	l = (struct bsd_disklabel *)read_dev_sector(bdev, offset+1, &sect);	if (!l)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美久久一二三四区| 国产色爱av资源综合区| 久久久久青草大香线综合精品| 亚洲天堂av一区| 九色综合国产一区二区三区| 91在线porny国产在线看| 精品999久久久| 日本aⅴ精品一区二区三区| 成人91在线观看| www欧美成人18+| 蜜桃视频在线观看一区| 欧美艳星brazzers| 亚洲天堂精品在线观看| 国产盗摄精品一区二区三区在线| 欧美一区二区三区四区五区| 亚洲精品第1页| 91免费看片在线观看| 国产午夜精品美女毛片视频| 精品中文字幕一区二区小辣椒| 欧美日韩国产小视频在线观看| 亚洲欧美另类综合偷拍| 成人av在线资源网| 国产情人综合久久777777| 久久精品国产网站| 欧美一区二区高清| 日韩精品欧美精品| 制服丝袜一区二区三区| 亚洲成人av免费| 欧美三级中文字| 亚洲第一搞黄网站| 欧美绝品在线观看成人午夜影视| 亚洲香蕉伊在人在线观| 欧美日韩一区二区欧美激情| 一区二区三区四区中文字幕| 91麻豆免费看片| 亚洲免费在线电影| 欧美在线视频全部完| 一区二区视频免费在线观看| 欧美怡红院视频| 日韩在线观看一区二区| 日韩天堂在线观看| 国内精品写真在线观看| 久久久久久久电影| 白白色 亚洲乱淫| 亚洲精品中文字幕乱码三区| 欧美在线观看视频在线| 日韩精品成人一区二区在线| 精品欧美一区二区在线观看 | 亚洲天堂成人网| 成人av电影免费观看| 亚洲另类春色校园小说| 欧美高清激情brazzers| 久久精品国产99国产| 欧美国产成人精品| 色综合夜色一区| 日韩精品午夜视频| 欧美高清在线一区| 欧美亚洲日本一区| 蜜桃视频一区二区| 中文字幕成人av| 欧美三级日韩在线| 国模少妇一区二区三区| 亚洲猫色日本管| 日韩三级电影网址| 91丨九色丨国产丨porny| 日韩电影在线免费观看| 国产农村妇女精品| 欧美精品一卡两卡| 国产91在线|亚洲| 亚洲第一会所有码转帖| 国产日韩精品视频一区| 欧美色区777第一页| 国产精选一区二区三区| 亚洲第一电影网| 国产欧美精品一区二区三区四区| 精品视频在线免费看| 国产成人免费在线视频| 日日摸夜夜添夜夜添国产精品| 国产午夜精品久久久久久免费视 | 亚洲女与黑人做爰| 日韩女优av电影在线观看| 99九九99九九九视频精品| 精品国产欧美一区二区| 一区二区三区蜜桃| 欧美日韩一区二区欧美激情| 国产老肥熟一区二区三区| 亚洲一区二区三区四区在线免费观看| 亚洲精品一线二线三线| 欧美精品久久99久久在免费线| 成人免费av在线| 国产一区二区三区综合| 水野朝阳av一区二区三区| 亚洲精品老司机| 亚洲精品免费在线| 久久久五月婷婷| 日韩欧美资源站| 欧美日韩免费一区二区三区| 91在线观看美女| 成人精品高清在线| 国产一区二区三区电影在线观看| 亚洲成人一区二区在线观看| 樱花影视一区二区| 亚洲欧美自拍偷拍| 国产精品久久久久婷婷| 国产人妖乱国产精品人妖| 久久综合狠狠综合| 精品国内片67194| 日韩精品一区二区三区视频| 日韩午夜激情视频| 欧美一级日韩不卡播放免费| 欧美精品一级二级| 欧美嫩在线观看| 这里只有精品电影| 3751色影院一区二区三区| 欧美人与性动xxxx| 欧美绝品在线观看成人午夜影视 | 国产成人久久精品77777最新版本| 日韩成人精品在线观看| 日韩av二区在线播放| 蜜臀va亚洲va欧美va天堂| 青娱乐精品在线视频| 美脚の诱脚舐め脚责91| 激情六月婷婷综合| 国产成人综合自拍| 91小视频在线免费看| 色综合久久天天综合网| 欧美日韩中文字幕一区| 777午夜精品免费视频| 欧美变态tickling挠脚心| 2019国产精品| 亚洲视频综合在线| 亚洲影院在线观看| 美国三级日本三级久久99| 九一九一国产精品| a亚洲天堂av| 欧美日韩中文字幕一区二区| 日韩免费福利电影在线观看| 久久久国产精品麻豆| 亚洲欧美日韩国产另类专区| 亚洲最色的网站| 麻豆一区二区三| 成人黄动漫网站免费app| 在线一区二区三区做爰视频网站| 欧美巨大另类极品videosbest| 精品国产乱码久久| 亚洲va在线va天堂| 国产一区二区不卡在线 | 成人免费福利片| 在线观看日韩电影| 精品国免费一区二区三区| 国产精品久久久久久妇女6080| 亚洲综合一区二区精品导航| 精品在线免费观看| 在线亚洲高清视频| 欧美精品一区二区三区很污很色的| 中文字幕在线不卡国产视频| 日韩二区三区在线观看| 成人久久视频在线观看| 91精品啪在线观看国产60岁| 欧美激情一区在线| 欧美96一区二区免费视频| thepron国产精品| 日韩精品一区二区三区四区| 一区二区三区精品在线| 国产一区二区免费视频| 欧美日韩另类一区| 亚洲欧洲成人自拍| 国内外成人在线视频| 欧美精品一级二级三级| 亚洲欧美日韩精品久久久久| 国产伦精品一区二区三区视频青涩 | 色综合久久99| 2020国产精品自拍| 日韩高清一区在线| 在线看国产日韩| 国产精品成人免费| 国产成人精品影视| 欧美成人在线直播| 婷婷成人综合网| 欧美性色aⅴ视频一区日韩精品| 欧美激情一区二区三区| 久久aⅴ国产欧美74aaa| 精品视频一区二区不卡| 樱花影视一区二区| 99热99精品| 中文字幕一区二区三区精华液 | 日本在线不卡一区| 欧美天堂亚洲电影院在线播放| 国产精品免费视频一区| 国产高清不卡一区二区| 欧美tk—视频vk| 久久99热这里只有精品| 日韩一区二区影院| 日本成人中文字幕在线视频 | 国产精品网友自拍| 成人午夜免费视频| 国产精品久久久久久久第一福利 | 国产精品欧美久久久久一区二区| 国产精品一品二品| 中文字幕av在线一区二区三区|