]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libblkid: use correct block size for UDF probe
authorZachary Catlin <z@zc.is>
Sat, 2 Mar 2013 02:34:25 +0000 (21:34 -0500)
committerZachary Catlin <z@zc.is>
Sat, 2 Mar 2013 02:54:00 +0000 (21:54 -0500)
commit5a45eb2d2c70dc7ea2ff4c7b56ab8dba2780f033
tree0d8139dee0474bb78f274b964b8e3d3f66c76144
parent6a83f8ecd7d2f39c8f06c3ef0f4be95c2de76bf1
libblkid: use correct block size for UDF probe

In UDF, Volume Structure Descriptors are always 2048 bytes long (ECMA-167,
3rd ed., §2/9.1), while filesystem sectors are the same size as the sectors
of the underlying media (e.g., UDF 2.01 §1.3.2). Before this commit, the
block size was estimated from VSD offsets, which gives incorrect answers for
non-optical media. Now, the UDF probe uses the device block size by default,
falling back to 2048-byte sectors for the case of optical-disk images.

Signed-off-by: Zachary Catlin <z@zc.is>
AUTHORS
libblkid/src/superblocks/udf.c