亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
午夜精品久久久久久久久久| 亚洲综合在线观看视频| 91麻豆精品视频| 久久国产尿小便嘘嘘| 亚洲精品欧美激情| 国产亚洲一区二区在线观看| 欧美午夜精品理论片a级按摩| 91福利视频久久久久| 精品午夜一区二区三区在线观看 | 欧美一区二区三区四区五区| 成人激情小说网站| 国产一区欧美一区| 五月激情六月综合| 尤物在线观看一区| 国产精品素人一区二区| 亚洲精品一区二区精华| 欧美日韩国产大片| 91福利资源站| 91麻豆福利精品推荐| 国产精品1024久久| 精品一区二区三区欧美| 日韩国产在线一| 一区二区三区精密机械公司| 亚洲国产高清aⅴ视频| 日韩一级片在线观看| 欧美日精品一区视频| 色88888久久久久久影院按摩| 成人一道本在线| 成熟亚洲日本毛茸茸凸凹| 久久国产尿小便嘘嘘| 久久精品国产第一区二区三区| 午夜精品免费在线| 亚洲高清一区二区三区| 夜夜嗨av一区二区三区四季av| 日韩一区日韩二区| 1024成人网| 国产精品久久久久影院| 国产精品婷婷午夜在线观看| 中文av字幕一区| 国产精品久久久久一区二区三区共| 久久精品亚洲国产奇米99| 欧美成人精品高清在线播放| 日韩午夜在线观看视频| 日韩欧美亚洲国产精品字幕久久久| 宅男噜噜噜66一区二区66| 宅男噜噜噜66一区二区66| 欧美一区二区三区免费大片| 日韩免费看的电影| 精品国产乱码久久久久久1区2区| 精品国产一区二区三区四区四 | 亚洲国产aⅴ天堂久久| 亚洲成a人在线观看| 视频在线在亚洲| 蜜臂av日日欢夜夜爽一区| 久久99精品久久久久久动态图| 蓝色福利精品导航| 国产在线播放一区三区四| 国产激情视频一区二区三区欧美| 成人午夜电影网站| 91丨九色丨蝌蚪丨老版| 欧美三级日本三级少妇99| 91精品国产色综合久久| 亚洲精品一区二区三区福利| 中文av一区特黄| 亚洲小少妇裸体bbw| 日韩一区精品字幕| 国内精品久久久久影院薰衣草| 丰满亚洲少妇av| 欧美在线视频全部完| 91超碰这里只有精品国产| 久久精品视频免费| 亚洲欧美日韩国产综合在线| 日本不卡免费在线视频| 国产一区二区中文字幕| 色综合久久久网| 日韩一本二本av| 国产精品视频一二三区| 亚洲国产精品自拍| 国产在线播精品第三| 91蜜桃网址入口| 日韩久久精品一区| 国产精品国产三级国产普通话蜜臀| 一级日本不卡的影视| 精品一区二区成人精品| 99免费精品在线| 日韩欧美专区在线| 中文字幕一区二区5566日韩| 日本aⅴ免费视频一区二区三区| 成人午夜视频福利| 91精品国产色综合久久不卡蜜臀| 国产欧美综合在线| 日韩高清在线观看| 91同城在线观看| 2021国产精品久久精品| 亚洲图片欧美一区| 国产成人精品www牛牛影视| 欧美精品在线一区二区三区| 国产精品美女久久久久久久网站| 日韩av网站免费在线| 97成人超碰视| 久久久综合九色合综国产精品| 亚洲国产一区二区三区| 成人精品一区二区三区四区| 欧美一区二区国产| 亚洲自拍偷拍欧美| www.亚洲激情.com| 2欧美一区二区三区在线观看视频| 亚洲国产综合91精品麻豆| 国产91在线|亚洲| 欧美一级欧美三级| 亚洲福利视频三区| 99v久久综合狠狠综合久久| 亚洲精品一区二区精华| 日本中文在线一区| 欧美日韩免费视频| 六月丁香综合在线视频| 欧美偷拍一区二区| 亚洲女与黑人做爰| 99精品国产99久久久久久白柏| 久久久久久亚洲综合影院红桃| 免费人成精品欧美精品| 欧美精品自拍偷拍| 天天色天天操综合| 欧美天堂亚洲电影院在线播放| 中文字幕一区二区视频| 国产精品亚洲综合一区在线观看| 欧美大片一区二区三区| 日本欧美肥老太交大片| 在线电影一区二区三区| 丝袜亚洲另类欧美综合| 欧美年轻男男videosbes| 一区二区三区不卡视频| 色综合夜色一区| 亚洲综合色区另类av| 在线看日韩精品电影| 亚洲精品亚洲人成人网在线播放| 91在线看国产| 亚洲精品欧美激情| 在线观看日韩精品| 午夜视频在线观看一区| 91精品免费观看| 日本一不卡视频| 精品精品国产高清a毛片牛牛| 国内精品视频666| 欧美国产综合色视频| 成人aa视频在线观看| 亚洲日本在线视频观看| 一本一道久久a久久精品| 亚洲欧美日韩国产中文在线| 欧美午夜视频网站| 日本欧美韩国一区三区| 26uuu精品一区二区在线观看| 国产精品2024| 中文字幕视频一区| 在线观看日韩一区| 免费观看日韩电影| 国产欧美日本一区视频| 99国产精品久久久久久久久久| 亚洲伊人伊色伊影伊综合网| 91麻豆精品国产91久久久久久久久| 男女视频一区二区| 国产欧美一区二区三区在线看蜜臀| 成人激情图片网| 亚洲综合男人的天堂| 欧美一区二区三区视频在线| 国产精品一区二区久久不卡| 中文字幕在线一区| 欧美视频你懂的| 久久99热这里只有精品| 中文成人综合网| 欧美日韩激情在线| 国产aⅴ综合色| 亚洲激情成人在线| 欧美成人伊人久久综合网| 成人美女视频在线观看18| 亚洲午夜免费福利视频| 精品精品国产高清一毛片一天堂| 99综合电影在线视频| 日韩在线一二三区| 国产精品丝袜一区| 欧美一区二区观看视频| 成人精品高清在线| 免费成人在线观看| 国产精品国产三级国产专播品爱网| 欧美日韩亚洲国产综合| 高清免费成人av| 日韩电影在线观看网站| 国产精品久久久久久久久动漫| 欧美日韩高清一区二区三区| 国产成人在线色| 93久久精品日日躁夜夜躁欧美| 亚洲综合自拍偷拍| 国产欧美日韩另类一区| 欧美精品vⅰdeose4hd| 波多野结衣亚洲| 免费在线观看精品| 夜色激情一区二区| 中文字幕va一区二区三区| 日韩视频免费观看高清完整版 | 国产一区二区看久久|