Skip to content

lib: introduce errors for control commands - #101

Open
jlrivasp wants to merge 1 commit into
intel:mainfrom
jlrivasp:dev/control_cmd_error
Open

lib: introduce errors for control commands#101
jlrivasp wants to merge 1 commit into
intel:mainfrom
jlrivasp:dev/control_cmd_error

Conversation

@jlrivasp

Copy link
Copy Markdown
Contributor

This patch introduces custom errors when the control commands are executed.

The logic is using the return codes from the PMT linux driver to indicate why the Crash Log control commands failed and include that information in the Crash Log tool debug log.

There is a change made on how a PMT device executes a control command, which is relevant when a PMT device comprehends more than one endpoint:

  • The control command will be executed in all endpoints, independently of their return values
  • If at least one endpoint returns Ok() the control command of that PMT device will return Ok() as well
  • If all the endpoints returned Err() the error of the first failed endpoint will be returned as the Err() of the control command

This patch introduces custom errors when the control commands are
executed.

The logic is using the return codes from the PMT linux driver
to indicate why the Crash Log control commands failed and include that
information in the Crash Log tool debug log.

There is a change made on how a PMT device executes a control command,
which is relevant when a PMT device comprehends more than one endpoint:
- The control command will be executed in all endpoints, independently
  of their return values
- If at least one endpoint returns `Ok()` the control command of that
  PMT device will return `Ok()` as well
- If all the endpoints returned `Err()` the error of the first failed
  endpoint will be returned as the `Err()` of the control command

Signed-off-by: Rivas Paz, Jose L <jose.l.rivas.paz@intel.com>
@jlrivasp
jlrivasp requested a review from psurply August 26, 2026 07:40
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