Skip to content

Conversation

@pdgendt
Copy link
Contributor

@pdgendt pdgendt commented Dec 1, 2025

Allow passing some context to the shell bypass callback function by providing a void pointer user data argument.

Re-submission from #97187
Fixes #97476

Allow passing some context to the shell bypass callback function by
providing a void pointer user data argument.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
jukkar
jukkar previously approved these changes Dec 1, 2025
de-nordic
de-nordic previously approved these changes Dec 2, 2025
Copy link
Contributor

@de-nordic de-nordic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flash shell changes look ok.

@henrikbrixandersen henrikbrixandersen added the Architecture Review Discussion in the Architecture WG required label Dec 2, 2025
@henrikbrixandersen henrikbrixandersen moved this from Todo to Done in Architecture Review Dec 2, 2025
@henrikbrixandersen
Copy link
Member

This was discussed in the Arch WG without any objections raised, see comment on #97476 (comment)

@henrikbrixandersen henrikbrixandersen removed the Architecture Review Discussion in the Architecture WG required label Dec 2, 2025
@kartben kartben requested a review from keith-zephyr December 2, 2025 13:20
ubieda
ubieda previously approved these changes Dec 2, 2025
* @param[in] user_data Bypass callback user data.
*/
void shell_set_bypass(const struct shell *sh, shell_bypass_cb_t bypass);
void shell_set_bypass(const struct shell *sh, shell_bypass_cb_t bypass, void *user_data);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test that uses shell_set_bypass? Even a build-only test can potentially catch future API changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a test.

@pdgendt pdgendt force-pushed the shell-bypass-userdata branch from b30515a to d6d7d63 Compare December 3, 2025 07:33
@zephyrbot zephyrbot added the area: Tests Issues related to a particular existing or missing test label Dec 3, 2025
jukkar
jukkar previously approved these changes Dec 3, 2025
Add a test to the shell testsuite for validating shell_set_bypass.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Add an entry for the shell API change for shell_set_bypass.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
@pdgendt
Copy link
Contributor Author

pdgendt commented Dec 3, 2025

Simplified the test so SonarQube doesn't block.

@zephyrbot zephyrbot requested a review from jukkar December 3, 2025 07:59
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 3, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: CAN area: Flash area: Networking area: Samples Samples area: Shell Shell subsystem area: Tests Issues related to a particular existing or missing test Breaking API Change Breaking changes to stable, public APIs Release Notes To be mentioned in the release notes

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

RFC: Breaking API Change: Shell: Allow passing an opaque user data pointer to the bypass callback function

8 participants