summaryrefslogtreecommitdiffstats
path: root/libblkid
diff options
context:
space:
mode:
authorPali Rohár2018-05-25 17:52:31 +0200
committerPali Rohár2018-05-25 17:52:31 +0200
commit4c837d4ffe43c5378da683b8fc63e17eb3afcf46 (patch)
treee4e2ddd9c184e187b99aa113fda3e6aaa56671f8 /libblkid
parentlibblkid: (ntfs) enlarge cluster limit to 2MB (diff)
downloadkernel-qcow2-util-linux-4c837d4ffe43c5378da683b8fc63e17eb3afcf46.tar.gz
kernel-qcow2-util-linux-4c837d4ffe43c5378da683b8fc63e17eb3afcf46.tar.xz
kernel-qcow2-util-linux-4c837d4ffe43c5378da683b8fc63e17eb3afcf46.zip
libblkid: udf: Fix reporting UDF 2.60 revision
According to the UDF 2.60 specification, the Minimum UDF Read Revision value shall be at most #0250 for all media with a UDF 2.60 file system. So in this case use Minimum UDF Write Revision as ID_FS_VERSION to distinguish between UDF 2.50 and UDF 2.60 discs. This commit also adds a testing Blu-Ray Recordable image with UDF revision 2.60 created by Nero which really sets Minimum UDF Read Revision to 2.50. Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Diffstat (limited to 'libblkid')
-rw-r--r--libblkid/src/superblocks/udf.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libblkid/src/superblocks/udf.c b/libblkid/src/superblocks/udf.c
index bd8e0a5c2..97e79dab0 100644
--- a/libblkid/src/superblocks/udf.c
+++ b/libblkid/src/superblocks/udf.c
@@ -446,6 +446,16 @@ real_blksz:
lvidiu_udf_rev = le16_to_cpu(lvidiu->min_udf_read_rev);
if (lvidiu_udf_rev)
udf_rev = lvidiu_udf_rev;
+ /* UDF-2.60: 2. Basic Restrictions & Requirements:
+ * The Minimum UDF Read Revision value shall be at most #0250
+ * for all media with a UDF 2.60 file system.
+ * So in this case use Minimum UDF Write Revision as ID_FS_VERSION
+ * to distinguish between UDF 2.50 and UDF 2.60 discs. */
+ if (lvidiu_udf_rev == 0x250) {
+ lvidiu_udf_rev = le16_to_cpu(lvidiu->min_udf_write_rev);
+ if (lvidiu_udf_rev > 0x250)
+ udf_rev = lvidiu_udf_rev;
+ }
}
}