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>
1 parent d74c4e2 commit f1ae2364a21432237c779e4cc04822eabb76e955
@Ulrich Ölmann Ulrich Ölmann authored on 18 Dec 2018
Roland Hieber committed on 7 Jan 2019
Showing 1 changed file
View
src/barebox-state/backend_bucket_circular.c