[protocol] Convert hello command and libhoth to use the new error#254
Open
esnguyen wants to merge 1 commit into
Open
[protocol] Convert hello command and libhoth to use the new error#254esnguyen wants to merge 1 commit into
esnguyen wants to merge 1 commit into
Conversation
cbf8a2f to
845fdcf
Compare
As a way to centeralize the way we report error through different domains, we are using hello command as a poc. This should make a temporary libhoth exec to be non instrusive and allow for changes. Signed-off-by: Ellis Sarza-Nguyen <sarzanguyen@google.com>
845fdcf to
c7be823
Compare
stevenportley
approved these changes
May 29, 2026
| @@ -57,28 +66,28 @@ enum hoth_host_space { | |||
| // Hoth error code: Low 16 bits of the 32-bit Base Error Code | |||
| // Firmware Error | |||
| enum hoth_fw_error_status { | |||
Collaborator
There was a problem hiding this comment.
I assume this is intended to replace the hoth_status in host_cmd.h?
One thing we should be careful of is that host commands can return one of two different types of errors:
- Dauntless only supports the subset you have here, a u16
- Earlgrey also supports a different type of error that u32 and provides a lot more context
We might want to reserve a 16bit prefix for these old Dauntless error codes, and add it onto the error code whenever we don't get the full u32. We can probably just change HTOOL_ERROR_HOST_COMMAND_START to do this since I don't see it used anywhere outside of libhoth
| // libhoth_hostcmd_exec_v2 is the new core implementation that returns a | ||
| // rich 64-bit libhoth_error. It should be used for all new commands and | ||
| // when migrating existing commands to the centralized status reporting system. | ||
| libhoth_error libhoth_hostcmd_exec_v2(struct libhoth_device* dev, |
Collaborator
There was a problem hiding this comment.
I assume the plan is to complete the migrate to this function and then to just rename everything back to libhoth_hostcm_exec? I don't think we have any consumers of this API outside of this repo so that should be safe.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As a way to centeralize the way we report error through different domains, we are using hello command as a poc. This should make a temporary libhoth exec to be non instrusive and allow for changes.