The patch below allows the user to specify an arbitrary limit to the size of the input in bytes. The following commands generate the same value:
dcfldd if=/dev/sda bs=1234 count=1 | md5sum
dcfldd if=/dev/sda bs=1 count=1234 | md5sum
dcfldd if=/dev/sda bs=1024 limit=1234 | md5sum
This allows for aligned block reads, as required. In particular, this is useful for verifying the hash of a destination drive that is larger than the original source drive.
count and limit are mutually exclusive. Whichever occurs last on the command line takes precedence.