state: backend_bucket_circular: fix old state reads
This ports the following barebox commit:
| commit a0c2642
| Author: Philipp Zabel <p.zabel@pengutronix.de>
| Date: Tue Jul 18 15:14:45 2017 +0200
|
| state: backend_bucket_circular: fix old state reads
|
| When the circular bucket meta magic was not found, it is assumed that
| the whole written state is in the old on-storage format. In that case,
| the size of the circular bucket meta must not be subtracted from the
| read length, or the (complete_len > len) check in the raw backend's
| verify function will fail:
|
| state: Error, invalid data_len 16 in header, have data of len 24
|
| Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
| Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Roland Hieber <rhi@pengutronix.de>