Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/modules/xo4/kspost.50.xo4-tweaks.inc
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2012-12-17 07:34:20 (GMT)
committer Daniel Drake <dsd@laptop.org>2012-12-17 07:57:15 (GMT)
commit4d71a3c391f53cefdb1abfceac698d1f8d68a49c (patch)
tree28c3855236643e2bf00950779a097a3c72a1bf3c /modules/xo4/kspost.50.xo4-tweaks.inc
parentb54f96d3fc54854da7bb71a03e2de69a3a544811 (diff)
zhashfs: correct output when last block is not occupied (#12402)HEADmaster
zhashfs was writing the eblocks: count line based on the file size of the input. However, this assumes that the last block of the input file had data in it, which is not necessarily true. Resultant .zd images flashed OK but caused OFW to produce a warning. WARNING: The file said highest block 15911 but wrote only as high as block 15903 Adjust the calculation to look at the last occupied data block to fix this. Test case, last block used is in the middle of the file: rm -f testfile dd if=/dev/zero of=testfile count=0 seek=128M bs=1 dd if=/dev/zero of=testfile count=1 seek=64M bs=1 conv=notrunc ./bin/zhashfs 0x20000 sha256 testfile testfile.zsp testfile.zd The output used to trigger the OFW warning, now it does not. Test case, last block used is at the end of the file: rm -f testfile dd if=/dev/zero of=testfile count=0 seek=128M bs=1 dd if=/dev/zero of=testfile count=1 seek=134217727 bs=1 ./bin/zhashfs 0x20000 sha256 testfile testfile.zsp testfile.zd The output here is unchanged by this patch - good.
Diffstat (limited to 'modules/xo4/kspost.50.xo4-tweaks.inc')
0 files changed, 0 insertions, 0 deletions