Skip to content

Fix off-by-one error and add error reporting#1

Open
shadowncs wants to merge 2 commits intoEmilyShepherd:mainfrom
shadowncs:fix
Open

Fix off-by-one error and add error reporting#1
shadowncs wants to merge 2 commits intoEmilyShepherd:mainfrom
shadowncs:fix

Conversation

@shadowncs
Copy link
Copy Markdown

Two changes included:

  1. Fix an off-by-one error causing all partitions to miss the last operation, when applying changes, leading to corruption.
  2. Add error reporting for 'apply' operation, thus making this tool script friendly.

Thank you for this amazing tool! I'm using it to validate Android OTA partial and full packages,

thread_queue[section_i].end is non-inclusive so by substracting 1 from ops_in_part, last partition(aka job) op is never processed.
Tested by adding prints showing queued operations per thread per slot, and confirming it matches partition total ops.
Summary:
When 'apply' fails, the program returns an errorcode.
This mapes ota-tool script friendly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant