diff options
author | Karel Zak | 2016-04-28 13:54:01 +0200 |
---|---|---|
committer | Karel Zak | 2016-04-28 13:54:01 +0200 |
commit | 55ad13c26fe5d0e606be5a83937f31b8cf576588 (patch) | |
tree | 729bcd0fa08e45d6fc3fa06806670f76bad650a2 | |
parent | Revert "libblkid: check for multi-session CDROMs" (diff) | |
download | kernel-qcow2-util-linux-55ad13c26fe5d0e606be5a83937f31b8cf576588.tar.gz kernel-qcow2-util-linux-55ad13c26fe5d0e606be5a83937f31b8cf576588.tar.xz kernel-qcow2-util-linux-55ad13c26fe5d0e606be5a83937f31b8cf576588.zip |
libblkid: make I/O errors on CDROMs non-fatal
It seems too tricky to get a real size of the data track on hybrid
disks with audio+data. It seems overkill to analyze all header in
libblkid and on some disks it's probably possible to get I/O error
almost everywhere due to crazy copy protection etc.
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r-- | libblkid/src/probe.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c index 63baed33e..5d9f701f7 100644 --- a/libblkid/src/probe.c +++ b/libblkid/src/probe.c @@ -615,7 +615,10 @@ static struct blkid_bufinfo *read_buffer(blkid_probe pr, uint64_t real_off, uint if (ret != (ssize_t) len) { DBG(LOWPROBE, ul_debug("\tread failed: %m")); free(bf); - if (ret >= 0) + + /* I/O errors on CDROMs are non-fatal to work with hybrid + * audio+data disks */ + if (ret >= 0 || blkid_probe_is_cdrom(pr)) errno = 0; return NULL; } |