]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libblkid: reduce probing area for crazy CDROMs
authorKarel Zak <kzak@redhat.com>
Tue, 19 Apr 2016 10:39:05 +0000 (12:39 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 19 Apr 2016 10:39:05 +0000 (12:39 +0200)
commitbfebe74e3babe8c188a51269acc2673f1aea283f
treeea9ce1e6570d2286ba75ba4e25fc9680661f3270
parent445e6b1ec82642a298419bdd18a81110593bfbaa
libblkid: reduce probing area for crazy CDROMs

Linux kernel reports devices greater than area readable by read(2).
The readable area is usually 2-3 CD blocks smaller (CD block is
2048-bytes) than size returned by BLKGETSIZE. This patch checks for
this issues to avoid I/O errors in probing functions.

Reported-by: Thomas Schmitt <scdbackup@gmx.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid/src/probe.c