On 10-03-03 05:23:02, Andre Robatino wrote:
Tony Nelson wrote:
> Reading will never return more than the requested number of bytes.
> It may read past the desired end of a CD or DVD. With that in
> mind, read what I wrote above. If you don't understand it, ask a
> question.
I'm not sure what you mean by "requested number of bytes", since your
command doesn't request a specific number, but relies on the OS to
detect the correct size of both files (which in the case of /dev/dvd
is unreliable).
Every read has a requested number of bytes. That I didn't write such a
number is not important to the various commands that process whole
files. They do that by reading chunks of whatever length they want
until no data is returned. That point is determined by the kernel,
but incorrectly for some CDs and DVDs.
Your description of the possible outputs of the cmp
command seems to imply that the readahead bug would cause /dev/dvd to
be seen as bigger than it actually is, which is the opposite of what
actually happens - there would be read errors on /dev/dvd _before_
reaching the true end of the image (making it impossible to read off
the full ISO, even assuming its exact size is known).
This is completely incorrect. The data on affected CDs and DVDs is
always longer than the data written. You should be able to figure out
for yourself why you must be wrong, and any experiments will prove it
to you. The "readahead bug" causes extra data to be returned after
the end of the intentionally written data. That data is the leadout
added either by the writer software or the DVD writer itself.
--
____________________________________________________________________
TonyN.:' <mailto:tonynelson@georgeanelson.com>
' <
http://www.georgeanelson.com/>