Difference between revisions of "UDF 2.01 on Linux"

From ThinkWiki
Jump to: navigation, search
m
Line 10: Line 10:
 
--[[User:Akw|akw]] 17:55, 12 February 2008 (CET)
 
--[[User:Akw|akw]] 17:55, 12 February 2008 (CET)
  
<diff>
+
<source lang="diff">
 
diff -Nur linux-2.6.24-udf/fs/udf/super.c linux-2.6.24-udf-akw/fs/udf/super.c
 
diff -Nur linux-2.6.24-udf/fs/udf/super.c linux-2.6.24-udf-akw/fs/udf/super.c
 
--- linux-2.6.24-udf/fs/udf/super.c 2008-02-12 17:32:51.000000000 +0100
 
--- linux-2.6.24-udf/fs/udf/super.c 2008-02-12 17:32:51.000000000 +0100
Line 34: Line 34:
 
     (le16_to_cpu(((__le16 *)upm2->partIdent.identSuffix)[0]) == 0x0260)) {
 
     (le16_to_cpu(((__le16 *)upm2->partIdent.identSuffix)[0]) == 0x0260)) {
 
  UDF_SB_PARTTYPE(sb,i) = UDF_VIRTUAL_MAP20;
 
  UDF_SB_PARTTYPE(sb,i) = UDF_VIRTUAL_MAP20;
</diff>
+
</source>
  
  
  
 
[[Category:Patches]]
 
[[Category:Patches]]

Revision as of 21:37, 7 February 2012

Mounting DVDs created by Windows Vista with UDF 2.01 or 2.50 filesystem

While UDF 2.01 filesystems created with mkudffs work fine with Linux, UDF media created on different platforms may cause a lot of trouble.

To make Vista UDF DVDs work with Linux, you'll need to patch your kernel with the following patches to your 2.6.24 kernel:

--akw 17:55, 12 February 2008 (CET)

diff -Nur linux-2.6.24-udf/fs/udf/super.c linux-2.6.24-udf-akw/fs/udf/super.c
--- linux-2.6.24-udf/fs/udf/super.c	2008-02-12 17:32:51.000000000 +0100
+++ linux-2.6.24-udf-akw/fs/udf/super.c	2008-02-12 17:22:01.000000000 +0100
@@ -1015,9 +1015,9 @@
 			  UDF_SB_PARTMAPS(sb)[i].s_partition_num, le16_to_cpu(p->partitionNumber));
  		/* workaround problems caused by Vista */
  		if (UDF_SB_PARTMAPS(sb)[i].s_partition_num >= UDF_SB_NUMPARTS(sb)) {
- 			udf_debug("Changing parition# from %d to ", UDF_SB_PARTMAPS(sb)[i].s_partition_num);
+ 			int old_partnum = UDF_SB_PARTMAPS(sb)[i].s_partition_num;
  			UDF_SB_PARTMAPS(sb)[i].s_partition_num %= (UDF_SB_NUMPARTS(sb));
- 			udf_debug("%d\n", UDF_SB_PARTMAPS(sb)[i].s_partition_num);
+ 			udf_debug("Changing partition# from %d to %d\n", old_partnum, UDF_SB_PARTMAPS(sb)[i].s_partition_num);
  		} else {
  			udf_debug("Keeping partition# %d out of %d partitions\n",
  					UDF_SB_PARTMAPS(sb)[i].s_partition_num, UDF_SB_NUMPARTS(sb));
@@ -1148,6 +1148,7 @@
 					UDF_SB_PARTTYPE(sb,i) = UDF_VIRTUAL_MAP15;
 					UDF_SB_PARTFUNC(sb,i) = udf_get_pblock_virt15;
 				} else if ((le16_to_cpu(((__le16 *)upm2->partIdent.identSuffix)[0]) == 0x0200) ||
+ 					 	  (le16_to_cpu(((__le16 *)upm2->partIdent.identSuffix)[0]) == 0x0201) ||
  					 	  (le16_to_cpu(((__le16 *)upm2->partIdent.identSuffix)[0]) == 0x0250) ||
  						  (le16_to_cpu(((__le16 *)upm2->partIdent.identSuffix)[0]) == 0x0260)) {
 					UDF_SB_PARTTYPE(sb,i) = UDF_VIRTUAL_MAP20;