Skip to content

Conversation

@Andrewpini
Copy link
Contributor

@Andrewpini Andrewpini commented Mar 21, 2022

Adds string to numeric conversion utility for shell.
Applies these functions to the Bluetooth Mesh Shell module.

Signed-off-by: Anders Storrø [email protected]

@github-actions github-actions bot added area: Bluetooth area: Bluetooth Mesh area: Tests Issues related to a particular existing or missing test labels Mar 21, 2022
@Andrewpini Andrewpini requested review from PavelVPV and ludvigsj March 21, 2022 11:16
@Andrewpini
Copy link
Contributor Author

For any questions regarding if this belongs here on basis of its generic nature, ref: #43289

@Andrewpini
Copy link
Contributor Author

Andrewpini commented Mar 21, 2022

@alwa-nordic I know that you argued that this should not be moved back here, but I have spent way more time than intended for this task, and the discussion in the original PR does not seem to give a finite solution any time soon. It is a blocker for other tasks that are important for the Mesh team and it has to move forward now. I have cleared this with @carlescufi.

Copy link
Member

@jhedberg jhedberg left a comment

Choose a reason for hiding this comment

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

I really don’t think it makes sense to introduce such generic functionality in a mesh shell-only context. If necessary (to make progress introducing this as a generic API) we can discuss this in some appropriate Zephyr project meeting (like the API one).

@Andrewpini
Copy link
Contributor Author

I really don’t think it makes sense to introduce such generic functionality in a mesh shell-only context. If necessary (to make progress introducing this as a generic API) we can discuss this in some appropriate Zephyr project meeting (like the API one).

Well @jhedberg that would be great. All I know at this point is that this PR is evaluated as to generic to reside in mesh or shell module, while simoutaniously not qualifying as a legit contribution to the general libraries in zephyr, ref: #43289. So I'm not quite sure what to do whit this at this point. Is there anything that you can see which I can do to progress this so that I actually can start utilizing thisfunctionality? I currently do not have the time required to start from scratch on a generic library addition (e.g. sscanf).

ludvigsj
ludvigsj previously approved these changes Mar 22, 2022
ludvigsj
ludvigsj previously approved these changes Mar 29, 2022
@jhedberg
Copy link
Member

@jakub-uC the helpers presented in this PR are not in any way Mesh specific. Would it be possible to move them as part of the shell subsystem, so that any shell module can use them?

Copy link
Member

Choose a reason for hiding this comment

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

Please move these 3 functions to subsys/shell/shell_util.c, that way other shell users can reuse them.

@Andrewpini Andrewpini dismissed stale reviews from ludvigsj and PavelVPV via 478188e March 31, 2022 13:51
@github-actions github-actions bot added area: API Changes to public APIs area: Shell Shell subsystem labels Mar 31, 2022
@Andrewpini Andrewpini changed the title Bluetooth: Mesh: Add checking of shell input args Shell: String to numeric conversion utils Mar 31, 2022
PavelVPV
PavelVPV previously approved these changes Apr 1, 2022
@jhedberg
Copy link
Member

jhedberg commented Apr 1, 2022

You need to split the shell subsystem changes into a separate commit. Otherwise looks fine.

Adds string to numeric conversion utility for shell.

Signed-off-by: Anders Storrø <[email protected]>
Changes parsing of input string args  to provide error checking.
This is to prevent unintentional command execution on garbage input
strings.

Signed-off-by: Anders Storrø <[email protected]>
@carlescufi carlescufi merged commit e4aed1c into zephyrproject-rtos:main Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: API Changes to public APIs area: Bluetooth Mesh area: Bluetooth area: Shell Shell subsystem area: Tests Issues related to a particular existing or missing test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants