Fixed dbg scripts to allow explicit trunks without checksums

Note this is intentionally different from how lfsr_rbyd_fetch behaves
in lfs.c. We only call lfsr_rbyd_fetch when we need validated checksums,
otherwise we just don't fetch.

The dbg scripts, on the other hand, always go through fetch, but it is
useful to be able to inspect the state of incomplete trunks when
debugging.

This use to be how the dbg scripts behaved, but they broke because of
some recent script work.
This commit is contained in:
Christopher Haster
2023-11-19 15:41:09 -06:00
parent c94b5f4767
commit 6b82e9fb25
5 changed files with 16 additions and 0 deletions

View File

@@ -981,6 +981,10 @@ def main(disk, blocks=None, *,
# keep track of eoff for best matching trunk
if trunk and j_ + size > trunk:
trunkeoff = j_ + size
eoff = trunkeoff
cksum = cksum_
trunk_ = trunk__
weight = weight_
if not tag & TAG_ALT:
j_ += size