⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1011.udf.patch

📁 sm86xx内核源包括补丁( GPL )的
💻 PATCH
📖 第 1 页 / 共 3 页
字号:
diff -Naur --exclude=CVS --exclude='*.o' --exclude='*.a' --exclude='*.so' --exclude='*.elf' --exclude=System.map --exclude=Makefile.d --exclude='*log' --exclude='*log2' --exclude='*~' --exclude='.*~' --exclude='.#*' --exclude='*.bak' --exclude='*.orig' --exclude='*.rej' --exclude='core.[0-9]*' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=vmlinux --exclude=vmlinux.bin --exclude=yamon-02.06-SIGMADESIGNS-01_el.bin linux-2.6.15.ref/fs/udf/inode.c linux-2.6.15/fs/udf/inode.c--- linux-2.6.15.ref/fs/udf/inode.c	2006-01-25 20:51:54.000000000 -0800+++ linux-2.6.15/fs/udf/inode.c	2007-05-10 10:23:02.000000000 -0700@@ -1176,6 +1176,7 @@ 		case ICBTAG_FILE_TYPE_REALTIME: 		case ICBTAG_FILE_TYPE_REGULAR: 		case ICBTAG_FILE_TYPE_UNDEF:+		case ICBTAG_FILE_TYPE_VAT20: 		{ 			if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_IN_ICB) 				inode->i_data.a_ops = &udf_adinicb_aops;@@ -1213,6 +1214,21 @@ 			inode->i_mode = S_IFLNK|S_IRWXUGO; 			break; 		}+		case ICBTAG_FILE_TYPE_MAIN:+		{+			udf_debug("METADATA FILE-----\n");+			break;+		}+		case ICBTAG_FILE_TYPE_MIRROR:+		{+			udf_debug("METADATA MIRROR FILE-----\n");+			break;+		}+		case ICBTAG_FILE_TYPE_BITMAP:+		{+			udf_debug("METADATA BITMAP FILE-----\n");+			break;+		} 		default: 		{ 			printk(KERN_ERR "udf: udf_fill_inode(ino %ld) failed unknown file type=%d\n",@@ -1826,6 +1842,14 @@ 			*elen = le32_to_cpu(lad->extLength) & UDF_EXTENT_LENGTH_MASK; 			break; 		}+		case ICBTAG_FLAG_AD_IN_ICB:+		{+			etype = EXT_RECORDED_ALLOCATED;+			eloc->logicalBlockNum = UDF_I_LOCATION(inode).logicalBlockNum;+			eloc->partitionReferenceNum = UDF_I_LOCATION(inode).partitionReferenceNum;+			*elen = UDF_I_LENALLOC(inode);+			break;+		} 		default: 		{ 			udf_debug("alloc_type = %d unsupported\n", UDF_I_ALLOCTYPE(inode));diff -Naur --exclude=CVS --exclude='*.o' --exclude='*.a' --exclude='*.so' --exclude='*.elf' --exclude=System.map --exclude=Makefile.d --exclude='*log' --exclude='*log2' --exclude='*~' --exclude='.*~' --exclude='.#*' --exclude='*.bak' --exclude='*.orig' --exclude='*.rej' --exclude='core.[0-9]*' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=vmlinux --exclude=vmlinux.bin --exclude=yamon-02.06-SIGMADESIGNS-01_el.bin linux-2.6.15.ref/fs/udf/misc.c linux-2.6.15/fs/udf/misc.c--- linux-2.6.15.ref/fs/udf/misc.c	2006-01-25 20:51:54.000000000 -0800+++ linux-2.6.15/fs/udf/misc.c	2007-05-10 10:23:02.000000000 -0700@@ -219,10 +219,10 @@ 	if (block == 0xFFFFFFFF) 		return NULL; -	bh = udf_tread(sb, block + UDF_SB_SESSION(sb));+	bh = udf_tread(sb, block /*+ UDF_SB_SESSION(sb)*/); 	if (!bh) 	{-		udf_debug("block=%d, location=%d: read failed\n", block + UDF_SB_SESSION(sb), location);+		udf_debug("block=%d, location=%d: read failed\n", block /*+ UDF_SB_SESSION(sb)*/, location); 		return NULL; 	} @@ -233,7 +233,7 @@ 	if ( location != le32_to_cpu(tag_p->tagLocation) ) 	{ 		udf_debug("location mismatch block %u, tag %u != %u\n",-			block + UDF_SB_SESSION(sb), le32_to_cpu(tag_p->tagLocation), location);+			block /*+ UDF_SB_SESSION(sb)*/, le32_to_cpu(tag_p->tagLocation), location); 		goto error_out; 	} 	@@ -265,7 +265,7 @@ 		return bh; 	} 	udf_debug("Crc failure block %d: crc = %d, crclen = %d\n",-		block + UDF_SB_SESSION(sb), le16_to_cpu(tag_p->descCRC), le16_to_cpu(tag_p->descCRCLength));+		block /*+ UDF_SB_SESSION(sb)*/, le16_to_cpu(tag_p->descCRC), le16_to_cpu(tag_p->descCRCLength));  error_out: 	brelse(bh);diff -Naur --exclude=CVS --exclude='*.o' --exclude='*.a' --exclude='*.so' --exclude='*.elf' --exclude=System.map --exclude=Makefile.d --exclude='*log' --exclude='*log2' --exclude='*~' --exclude='.*~' --exclude='.#*' --exclude='*.bak' --exclude='*.orig' --exclude='*.rej' --exclude='core.[0-9]*' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=vmlinux --exclude=vmlinux.bin --exclude=yamon-02.06-SIGMADESIGNS-01_el.bin linux-2.6.15.ref/fs/udf/osta_udf.h linux-2.6.15/fs/udf/osta_udf.h--- linux-2.6.15.ref/fs/udf/osta_udf.h	2006-01-25 20:51:54.000000000 -0800+++ linux-2.6.15/fs/udf/osta_udf.h	2007-05-10 10:23:02.000000000 -0700@@ -149,7 +149,7 @@ 	__le32		locSparingTable[4]; } __attribute__ ((packed)); -/* Metadata Partition Map (UDF 2.4.0 2.2.10) */+/* Metadata Partition Map (UDF 2.50 2.2.10) */ struct metadataPartitionMap { 	uint8_t		partitionMapType;diff -Naur --exclude=CVS --exclude='*.o' --exclude='*.a' --exclude='*.so' --exclude='*.elf' --exclude=System.map --exclude=Makefile.d --exclude='*log' --exclude='*log2' --exclude='*~' --exclude='.*~' --exclude='.#*' --exclude='*.bak' --exclude='*.orig' --exclude='*.rej' --exclude='core.[0-9]*' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=vmlinux --exclude=vmlinux.bin --exclude=yamon-02.06-SIGMADESIGNS-01_el.bin linux-2.6.15.ref/fs/udf/partition.c linux-2.6.15/fs/udf/partition.c--- linux-2.6.15.ref/fs/udf/partition.c	2006-01-25 20:51:54.000000000 -0800+++ linux-2.6.15/fs/udf/partition.c	2007-05-10 10:23:02.000000000 -0700@@ -224,3 +224,155 @@  	return 0; }++static uint32_t udf_get_addr_from_short_ad(struct super_block *sb, short_ad *p, int desc_count, int block)+{+	int i;+	int crt_blocks=0;++	if (p == NULL)+		return 0xFFFFFFFF;+	+	udf_debug("SHORT AD SEARCHING BLOCK %d\n",block);+	+	for (i=0; i<desc_count; i++)+	{+		uint32_t extent_len;+		int blocks_in_extent;++		extent_len = le32_to_cpu(p[i].extLength);+		/* keep least 30 sign bits (ecma 167 14.14.1.1) */+		extent_len &= ((1<<30) - 1);+	+		blocks_in_extent = extent_len>>sb->s_blocksize_bits;+		if ((crt_blocks + blocks_in_extent) > block)+			break;+		crt_blocks += blocks_in_extent;+	}++	/* not found */+	if (i == desc_count)+	{+		udf_debug("block %d not found in allocation desc\n",block);+		return 0xFFFFFFFF;+	}++	/* block offset in current extent */+	block -= crt_blocks;++	block = le32_to_cpu(p[i].extPosition) + block;+	return block;+}++static uint32_t udf_try_read_meta(struct super_block *sb, uint32_t block, uint16_t partition, uint32_t offset, struct inode* inode)+{+	uint32_t metad_blk;+	uint32_t phy_blk;+	struct buffer_head *bh = NULL;+	+	metad_blk = 0;+	+	switch(UDF_I_ALLOCTYPE(inode))+	{+		case ICBTAG_FLAG_AD_SHORT:+		{+			short_ad *sa;+			int len;+			udf_debug("ICB flag is ICBTAG_FLAG_AD_SHORT\n");+			len = UDF_I_LENALLOC(inode)/sizeof(short_ad);+			if (len == 0)+			{+				udf_error(sb, __FUNCTION__, "Inode has 0 alloc\n");+				return 0xFFFFFFFF;+			}+			sa = (short_ad*)(UDF_I_DATA(inode) + UDF_I_LENEATTR(inode));+			if (sa == NULL)+			{+				udf_error(sb, __FUNCTION__, "Inode has null alloc desc\n");+				return 0xFFFFFFFF;+			}+				+			metad_blk = udf_get_addr_from_short_ad(sb, sa, len, block);+		}+		break;+		case ICBTAG_FLAG_AD_LONG:+			udf_debug("ICB flag is ICBTAG_FLAG_AD_LONG\n");+			return 0xFFFFFFFF;+			break;+		case ICBTAG_FLAG_AD_IN_ICB:+			udf_debug("ICB flag is ICBTAG_FLAG_AD_IN_ICB\n");+			break;+		case ICBTAG_FLAG_AD_EXTENDED:+			udf_debug("ICB flag is ICBTAG_FLAG_AD_EXTENDED !!!!!!!\n");+			return 0xFFFFFFFF;+			break;+	}+++	/* map to sparable/physical partition desc */+	phy_blk = udf_get_pblock(sb, metad_blk, UDF_SB_PARTNUM(sb, partition), offset);++	udf_debug("block=%d partition=%d realblk=%d physical=%d\n",block, partition, metad_blk, phy_blk);++	/* try to read from the physical location */+	bh = udf_tread(sb, phy_blk);++	if (bh)+	{+		udf_debug("udf_try_read_meta SUCCEEDED\n");+		udf_release_data(bh);+		return phy_blk;+	}+	else+	{+		udf_debug("udf_try_read_meta FAILED\n");+		return 0xFFFFFFFF;+	}+}++uint32_t udf_get_pblock_meta25(struct super_block *sb, uint32_t block, uint16_t partition, uint32_t offset)+{+	uint32_t retblk;+	struct inode *inode;++	udf_debug("READING from METADATA\n");++	inode = UDF_SB_TYPEMETA(sb,partition).s_metadata_fe;++	if (inode)+	{+		retblk = udf_try_read_meta(sb, block, partition, offset, inode);++		if(retblk == 0xFFFFFFFF)+		{+			udf_warning(sb, __FUNCTION__, "OOOOPS ... error reading from METADATA, trying to read from MIRROR");++			inode = UDF_SB_TYPEMETA(sb,partition).s_mirror_fe;++			if (inode == NULL)+			{+				udf_error(sb, __FUNCTION__, "mirror inode is null");+				return 0xFFFFFFFF;+			}++			retblk = udf_try_read_meta(sb, block, partition, offset, inode);+		}+	}+	else 	/* metadata inode is NULL */+	{+		udf_warning(sb, __FUNCTION__, "metadata inode is null. hmmm, will try reading from mirror file");++		inode = UDF_SB_TYPEMETA(sb,partition).s_mirror_fe;++		if (inode == NULL)+		{+			udf_error(sb, __FUNCTION__, "mirror inode null too??? bad, bad, bad! how did we get here???");+			return 0xFFFFFFFF;+		}++		retblk = udf_try_read_meta(sb, block, partition, offset, inode);+	}++	return retblk;+}+diff -Naur --exclude=CVS --exclude='*.o' --exclude='*.a' --exclude='*.so' --exclude='*.elf' --exclude=System.map --exclude=Makefile.d --exclude='*log' --exclude='*log2' --exclude='*~' --exclude='.*~' --exclude='.#*' --exclude='*.bak' --exclude='*.orig' --exclude='*.rej' --exclude='core.[0-9]*' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=vmlinux --exclude=vmlinux.bin --exclude=yamon-02.06-SIGMADESIGNS-01_el.bin linux-2.6.15.ref/fs/udf/super.c linux-2.6.15/fs/udf/super.c--- linux-2.6.15.ref/fs/udf/super.c	2006-01-25 20:51:54.000000000 -0800+++ linux-2.6.15/fs/udf/super.c	2007-05-10 10:25:37.000000000 -0700@@ -334,6 +334,7 @@ 		{ 			case Opt_novrs: 				uopt->novrs = 1;+				break; 			case Opt_bs: 				if (match_int(&args[0], &option)) 					return 0;@@ -510,6 +511,9 @@ 	return sb->s_blocksize; } +/* Only search for VRS within this range */+#define VRS_SECTOR_LIMIT 0x8000+ static int udf_vrs(struct super_block *sb, int silent) {@@ -520,6 +524,7 @@ 	int iso9660=0; 	int nsr02=0; 	int nsr03=0;+	int i=0;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -