Ticket #12055 (closed enhancement: wontfix)
OFW should sanity-check size of .zd files before starting to write them
|Reported by:||cjb||Owned by:||Quozl|
|Keywords:||Cc:||wmb@…, martin.langhoff, dsd|
|Action Needed:||no action||Verified:||no|
|Deployments affected:||Blocked By:|
The failure mode I'm trying to protect against is the one where you only have a partial download of the file, and you only realize it after fs-update spends five minutes flashing and then says "Short read of zdata file" unexpectedly. It would save time (and wondering about why it failed) for it to immediately tell you that there's no way the .zd file you've provided can be complete, instead of waiting until it runs out of data.
We should store the ultimate file size in bytes in a header of the .zd file, and test it against the file size on disk before doing anything else.