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>
This commit is contained in:
Pali Rohár 2018-05-25 17:52:31 +02:00
parent 7816ee22d5
commit 4c837d4ffe
3 changed files with 20 additions and 0 deletions

View File

@ -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;
}
}
}

View File

@ -0,0 +1,10 @@
ID_FS_LABEL=Label
ID_FS_LABEL_ENC=Label
ID_FS_LOGICAL_VOLUME_ID=Label
ID_FS_TYPE=udf
ID_FS_USAGE=filesystem
ID_FS_UUID=3b4a858dc4b57a72
ID_FS_UUID_ENC=3b4a858dc4b57a72
ID_FS_VERSION=2.60
ID_FS_VOLUME_ID=Label
ID_FS_VOLUME_SET_ID=3B4A858DC4B57A72

Binary file not shown.