This is not a failing of Qt, but a failing of understanding the data you are handling. The DVD/CD will almost always contain extra padding data at the end of the supplied image to meet requirements of the specifications. You should read (up to) as many bytes from the DVD as are in the image you are trying to compare with. So, for example, a Gentoo image:
// Original image file
chrisw@newton ~ $ dd if=install-amd64-minimal-20110609.iso bs=2048 | md5sum
64900+0 records in // <<< this is the number of blocks in the image
64900+0 records out
132915200 bytes (133 MB) copied, 4.39815 s, 30.2 MB/s
3acf53667fcf1d03e98068ee4af5f4a3 -
// Reading all data from the raw device... fails
chrisw@newton ~ $ dd if=/dev/cdrom bs=2048 | md5sum
64963+0 records in
64963+0 records out
b0700288a316b71dee09ed87dce3b160 - // <<<< Not good
133044224 bytes (133 MB) copied, 39.3402 s, 3.4 MB/s
// reading correct number of blocks from the device matches
chrisw@newton ~ $ dd if=/dev/cdrom bs=2048 count=64900 | md5sum
64900+0 records in
64900+0 records out
3acf53667fcf1d03e98068ee4af5f4a3 - // <<< Sweet :)
132915200 bytes (133 MB) copied, 37.9759 s, 3.5 MB/s
// Original image file
chrisw@newton ~ $ dd if=install-amd64-minimal-20110609.iso bs=2048 | md5sum
64900+0 records in // <<< this is the number of blocks in the image
64900+0 records out
132915200 bytes (133 MB) copied, 4.39815 s, 30.2 MB/s
3acf53667fcf1d03e98068ee4af5f4a3 -
// Reading all data from the raw device... fails
chrisw@newton ~ $ dd if=/dev/cdrom bs=2048 | md5sum
64963+0 records in
64963+0 records out
b0700288a316b71dee09ed87dce3b160 - // <<<< Not good
133044224 bytes (133 MB) copied, 39.3402 s, 3.4 MB/s
// reading correct number of blocks from the device matches
chrisw@newton ~ $ dd if=/dev/cdrom bs=2048 count=64900 | md5sum
64900+0 records in
64900+0 records out
3acf53667fcf1d03e98068ee4af5f4a3 - // <<< Sweet :)
132915200 bytes (133 MB) copied, 37.9759 s, 3.5 MB/s
To copy to clipboard, switch view to plain text mode
Bookmarks